^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * This file is subject to the terms and conditions of the GNU General Public
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * License. See the file "COPYING" in the main directory of this archive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) * for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * Copyright 2003 Vivien Chappelier <vivien.chappelier@linux-mips.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright 2008 Thomas Bogendoerfer <tsbogend@franken.de>
^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) #ifndef __SOUND_AD1843_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define __SOUND_AD1843_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct snd_ad1843 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) void *chip;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) int (*read)(void *chip, int reg);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) int (*write)(void *chip, int reg, int val);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define AD1843_GAIN_RECLEV 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define AD1843_GAIN_LINE 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define AD1843_GAIN_LINE_2 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #define AD1843_GAIN_MIC 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #define AD1843_GAIN_PCM_0 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #define AD1843_GAIN_PCM_1 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #define AD1843_GAIN_SIZE (AD1843_GAIN_PCM_1+1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) int ad1843_get_gain_max(struct snd_ad1843 *ad1843, int id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) int ad1843_get_gain(struct snd_ad1843 *ad1843, int id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) int ad1843_set_gain(struct snd_ad1843 *ad1843, int id, int newval);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) int ad1843_get_recsrc(struct snd_ad1843 *ad1843);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) int ad1843_set_recsrc(struct snd_ad1843 *ad1843, int newsrc);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) void ad1843_setup_dac(struct snd_ad1843 *ad1843,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) unsigned int id,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) unsigned int framerate,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) snd_pcm_format_t fmt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) unsigned int channels);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) void ad1843_shutdown_dac(struct snd_ad1843 *ad1843,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) unsigned int id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) void ad1843_setup_adc(struct snd_ad1843 *ad1843,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) unsigned int framerate,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) snd_pcm_format_t fmt,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) unsigned int channels);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) void ad1843_shutdown_adc(struct snd_ad1843 *ad1843);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) int ad1843_init(struct snd_ad1843 *ad1843);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #endif /* __SOUND_AD1843_H */