diff options
author | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2023-06-12 21:13:24 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-06-13 07:47:16 +0200 |
commit | 3ac251420be2bbc9f5e83281661dbfaf05983f69 (patch) | |
tree | 5c0ee711179bd496ced8758667d1393c5be45fe3 | |
parent | ALSA: emu10k1: fix timer for E-MU cards at 44.1 kHz word clock (diff) | |
download | linux-3ac251420be2bbc9f5e83281661dbfaf05983f69.tar.xz linux-3ac251420be2bbc9f5e83281661dbfaf05983f69.zip |
ALSA: emu10k1: add support for 12 kHz capture on Audigy
Fixes a tentative FIXME. Because we can.
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230612191325.1315854-9-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/emu10k1/emupcm.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 3ef9130a9577..387288d623d7 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -177,12 +177,22 @@ static unsigned int snd_emu10k1_capture_rate_reg(unsigned int rate) } } +static const unsigned int audigy_capture_rates[9] = { + 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 +}; + +static const struct snd_pcm_hw_constraint_list hw_constraints_audigy_capture_rates = { + .count = 9, + .list = audigy_capture_rates, + .mask = 0 +}; + static unsigned int snd_emu10k1_audigy_capture_rate_reg(unsigned int rate) { switch (rate) { case 8000: return A_ADCCR_SAMPLERATE_8; case 11025: return A_ADCCR_SAMPLERATE_11; - case 12000: return A_ADCCR_SAMPLERATE_12; /* really supported? */ + case 12000: return A_ADCCR_SAMPLERATE_12; case 16000: return ADCCR_SAMPLERATE_16; case 22050: return ADCCR_SAMPLERATE_22; case 24000: return ADCCR_SAMPLERATE_24; @@ -209,7 +219,8 @@ static void snd_emu10k1_constrain_capture_rates(struct snd_emu10k1 *emu, return; } snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, - &hw_constraints_capture_rates); + emu->audigy ? &hw_constraints_audigy_capture_rates : + &hw_constraints_capture_rates); } static void snd_emu1010_constrain_efx_rate(struct snd_emu10k1 *emu, |