1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /********************************************* 2 /***************************************************************************** 3 * 3 * 4 * Copyright (C) 2008 Cedric Bregardis <cedric 4 * Copyright (C) 2008 Cedric Bregardis <cedric.bregardis@free.fr> and 5 * Jean-Christian Hassler <jhassler@free.fr> 5 * Jean-Christian Hassler <jhassler@free.fr> 6 * 6 * 7 * This file is part of the Audiowerk2 ALSA dr 7 * This file is part of the Audiowerk2 ALSA driver 8 * 8 * 9 ********************************************* 9 *****************************************************************************/ 10 10 11 #ifndef AW2_SAA7146_H 11 #ifndef AW2_SAA7146_H 12 #define AW2_SAA7146_H 12 #define AW2_SAA7146_H 13 13 14 #define NB_STREAM_PLAYBACK 2 14 #define NB_STREAM_PLAYBACK 2 15 #define NB_STREAM_CAPTURE 1 15 #define NB_STREAM_CAPTURE 1 16 16 17 #define NUM_STREAM_PLAYBACK_ANA 0 17 #define NUM_STREAM_PLAYBACK_ANA 0 18 #define NUM_STREAM_PLAYBACK_DIG 1 18 #define NUM_STREAM_PLAYBACK_DIG 1 19 19 20 #define NUM_STREAM_CAPTURE_ANA 0 20 #define NUM_STREAM_CAPTURE_ANA 0 21 21 22 struct snd_pcm_substream; !! 22 typedef void (*snd_aw2_saa7146_it_cb) (void *); 23 typedef void (*snd_aw2_saa7146_it_cb) (struct << 24 23 25 struct snd_aw2_saa7146_cb_param { 24 struct snd_aw2_saa7146_cb_param { 26 snd_aw2_saa7146_it_cb p_it_callback; 25 snd_aw2_saa7146_it_cb p_it_callback; 27 struct snd_pcm_substream *p_callback_p !! 26 void *p_callback_param; 28 }; 27 }; 29 28 30 /* definition of the chip-specific record */ 29 /* definition of the chip-specific record */ 31 30 32 struct snd_aw2_saa7146 { 31 struct snd_aw2_saa7146 { 33 void __iomem *base_addr; 32 void __iomem *base_addr; 34 }; 33 }; 35 34 36 extern void snd_aw2_saa7146_setup(struct snd_a 35 extern void snd_aw2_saa7146_setup(struct snd_aw2_saa7146 *chip, 37 void __iomem 36 void __iomem *pci_base_addr); 38 extern int snd_aw2_saa7146_free(struct snd_aw2 37 extern int snd_aw2_saa7146_free(struct snd_aw2_saa7146 *chip); 39 38 40 extern void snd_aw2_saa7146_pcm_init_playback( 39 extern void snd_aw2_saa7146_pcm_init_playback(struct snd_aw2_saa7146 *chip, 41 40 int stream_number, 42 41 unsigned long dma_addr, 43 42 unsigned long period_size, 44 43 unsigned long buffer_size); 45 extern void snd_aw2_saa7146_pcm_init_capture(s 44 extern void snd_aw2_saa7146_pcm_init_capture(struct snd_aw2_saa7146 *chip, 46 i 45 int stream_number, 47 u 46 unsigned long dma_addr, 48 u 47 unsigned long period_size, 49 u 48 unsigned long buffer_size); 50 extern void snd_aw2_saa7146_define_it_playback 49 extern void snd_aw2_saa7146_define_it_playback_callback(unsigned int 51 50 stream_number, 52 51 snd_aw2_saa7146_it_cb 53 52 p_it_callback, 54 53 void *p_callback_param); 55 extern void snd_aw2_saa7146_define_it_capture_ 54 extern void snd_aw2_saa7146_define_it_capture_callback(unsigned int 56 55 stream_number, 57 56 snd_aw2_saa7146_it_cb 58 57 p_it_callback, 59 58 void *p_callback_param); 60 extern void snd_aw2_saa7146_pcm_trigger_start_ 59 extern void snd_aw2_saa7146_pcm_trigger_start_capture(struct snd_aw2_saa7146 61 60 *chip, int stream_number); 62 extern void snd_aw2_saa7146_pcm_trigger_stop_c 61 extern void snd_aw2_saa7146_pcm_trigger_stop_capture(struct snd_aw2_saa7146 63 62 *chip, int stream_number); 64 63 65 extern void snd_aw2_saa7146_pcm_trigger_start_ 64 extern void snd_aw2_saa7146_pcm_trigger_start_playback(struct snd_aw2_saa7146 66 65 *chip, 67 66 int stream_number); 68 extern void snd_aw2_saa7146_pcm_trigger_stop_p 67 extern void snd_aw2_saa7146_pcm_trigger_stop_playback(struct snd_aw2_saa7146 69 68 *chip, int stream_number); 70 69 71 extern irqreturn_t snd_aw2_saa7146_interrupt(i 70 extern irqreturn_t snd_aw2_saa7146_interrupt(int irq, void *dev_id); 72 extern unsigned int snd_aw2_saa7146_get_hw_ptr 71 extern unsigned int snd_aw2_saa7146_get_hw_ptr_playback(struct snd_aw2_saa7146 73 72 *chip, 74 73 int stream_number, 75 74 unsigned char 76 75 *start_addr, 77 76 unsigned int 78 77 buffer_size); 79 extern unsigned int snd_aw2_saa7146_get_hw_ptr 78 extern unsigned int snd_aw2_saa7146_get_hw_ptr_capture(struct snd_aw2_saa7146 80 79 *chip, 81 80 int stream_number, 82 81 unsigned char 83 82 *start_addr, 84 83 unsigned int 85 84 buffer_size); 86 85 87 extern void snd_aw2_saa7146_use_digital_input( 86 extern void snd_aw2_saa7146_use_digital_input(struct snd_aw2_saa7146 *chip, 88 87 int use_digital); 89 88 90 extern int snd_aw2_saa7146_is_using_digital_in 89 extern int snd_aw2_saa7146_is_using_digital_input(struct snd_aw2_saa7146 91 90 *chip); 92 91 93 #endif 92 #endif 94 93
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.