Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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