aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_cs8409.c
diff options
context:
space:
mode:
authorStefan Binding <sbinding@opensource.cirrus.com>2021-08-11 19:56:50 +0100
committerTakashi Iwai <tiwai@suse.de>2021-08-12 13:41:57 +0200
commitfed0aaca0b0f204ca40b89b22b0e493ceb27d48e (patch)
treec478087edec1d58701db6222cb967748486ce4d2 /sound/pci/hda/patch_cs8409.c
parente4e6c584f516880a5c3e0963159e201e83d86be7 (diff)
ALSA: hda/cs8409: Set fixed sample rate of 48kHz for CS42L42
CS42L42 is configured to use a fixed sample rate of 48kHz. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Vitaly Rodionov <vitalyr@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210811185654.6837-24-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_cs8409.c')
-rw-r--r--sound/pci/hda/patch_cs8409.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_cs8409.c b/sound/pci/hda/patch_cs8409.c
index daf9c07d10c4..897c48140d8b 100644
--- a/sound/pci/hda/patch_cs8409.c
+++ b/sound/pci/hda/patch_cs8409.c
@@ -912,6 +912,9 @@ void cs8409_cs42l42_fixups(struct hda_codec *codec, const struct hda_fixup *fix,
break;
case HDA_FIXUP_ACT_PROBE:
+ /* Fix Sample Rate to 48kHz */
+ spec->gen.stream_analog_playback = &cs42l42_48k_pcm_analog_playback;
+ spec->gen.stream_analog_capture = &cs42l42_48k_pcm_analog_capture;
/* Set initial DMIC volume to -26 dB */
snd_hda_codec_amp_init_stereo(codec, CS8409_CS42L42_DMIC_ADC_PIN_NID,
HDA_INPUT, 0, 0xff, 0x19);
@@ -1105,6 +1108,9 @@ void dolphin_fixups(struct hda_codec *codec, const struct hda_fixup *fix, int ac
break;
case HDA_FIXUP_ACT_PROBE:
+ /* Fix Sample Rate to 48kHz */
+ spec->gen.stream_analog_playback = &cs42l42_48k_pcm_analog_playback;
+ spec->gen.stream_analog_capture = &cs42l42_48k_pcm_analog_capture;
snd_hda_gen_add_kctl(&spec->gen, "Headphone Playback Volume",
&cs42l42_dac_volume_mixer);
snd_hda_gen_add_kctl(&spec->gen, "Mic Capture Volume", &cs42l42_adc_volume_mixer);