Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Copyright 2003 Vivien Chappelier <vivien.chappelier@linux-mips.org>
0007  * Copyright 2008 Thomas Bogendoerfer <tsbogend@franken.de>
0008  */
0009 
0010 #ifndef __SOUND_AD1843_H
0011 #define __SOUND_AD1843_H
0012 
0013 struct snd_ad1843 {
0014     void *chip;
0015     int (*read)(void *chip, int reg);
0016     int (*write)(void *chip, int reg, int val);
0017 };
0018 
0019 #define AD1843_GAIN_RECLEV 0
0020 #define AD1843_GAIN_LINE   1
0021 #define AD1843_GAIN_LINE_2 2
0022 #define AD1843_GAIN_MIC    3
0023 #define AD1843_GAIN_PCM_0  4
0024 #define AD1843_GAIN_PCM_1  5
0025 #define AD1843_GAIN_SIZE   (AD1843_GAIN_PCM_1+1)
0026 
0027 int ad1843_get_gain_max(struct snd_ad1843 *ad1843, int id);
0028 int ad1843_get_gain(struct snd_ad1843 *ad1843, int id);
0029 int ad1843_set_gain(struct snd_ad1843 *ad1843, int id, int newval);
0030 int ad1843_get_recsrc(struct snd_ad1843 *ad1843);
0031 int ad1843_set_recsrc(struct snd_ad1843 *ad1843, int newsrc);
0032 void ad1843_setup_dac(struct snd_ad1843 *ad1843,
0033               unsigned int id,
0034               unsigned int framerate,
0035               snd_pcm_format_t fmt,
0036               unsigned int channels);
0037 void ad1843_shutdown_dac(struct snd_ad1843 *ad1843,
0038              unsigned int id);
0039 void ad1843_setup_adc(struct snd_ad1843 *ad1843,
0040               unsigned int framerate,
0041               snd_pcm_format_t fmt,
0042               unsigned int channels);
0043 void ad1843_shutdown_adc(struct snd_ad1843 *ad1843);
0044 int ad1843_init(struct snd_ad1843 *ad1843);
0045 
0046 #endif /* __SOUND_AD1843_H */