aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-05 08:18:16 -0500
committerTakashi Iwai <tiwai@suse.de>2009-03-05 08:18:26 -0500
commitf03d3115a6bcb814019d945c50c2ef91e5f14477 (patch)
treef064c1e8a4227543952133701dafd378501be37b /sound/pci/hda/patch_realtek.c
parent37db623ae2a7bde234a8ed683d0d13d6f939199c (diff)
ALSA: Fix sample rate of Lenovo Ideapad to 44.1kHz
Noises can be heard on analog outputs of (some model of) Lenovo Ideapad due to the hardware problem, and the only workaround right now is to fix the sample rate to 44.1kHz. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c34
1 files changed, 31 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 6325ea43cf08..b794cba494c3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -12845,6 +12845,27 @@ static int alc269_auto_create_analog_input_ctls(struct alc_spec *spec,
12845#define alc269_pcm_digital_playback alc880_pcm_digital_playback 12845#define alc269_pcm_digital_playback alc880_pcm_digital_playback
12846#define alc269_pcm_digital_capture alc880_pcm_digital_capture 12846#define alc269_pcm_digital_capture alc880_pcm_digital_capture
12847 12847
12848static struct hda_pcm_stream alc269_44k_pcm_analog_playback = {
12849 .substreams = 1,
12850 .channels_min = 2,
12851 .channels_max = 8,
12852 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
12853 /* NID is set in alc_build_pcms */
12854 .ops = {
12855 .open = alc880_playback_pcm_open,
12856 .prepare = alc880_playback_pcm_prepare,
12857 .cleanup = alc880_playback_pcm_cleanup
12858 },
12859};
12860
12861static struct hda_pcm_stream alc269_44k_pcm_analog_capture = {
12862 .substreams = 1,
12863 .channels_min = 2,
12864 .channels_max = 2,
12865 .rates = SNDRV_PCM_RATE_44100, /* fixed rate */
12866 /* NID is set in alc_build_pcms */
12867};
12868
12848/* 12869/*
12849 * BIOS auto configuration 12870 * BIOS auto configuration
12850 */ 12871 */
@@ -13060,9 +13081,16 @@ static int patch_alc269(struct hda_codec *codec)
13060 setup_preset(spec, &alc269_presets[board_config]); 13081 setup_preset(spec, &alc269_presets[board_config]);
13061 13082
13062 spec->stream_name_analog = "ALC269 Analog"; 13083 spec->stream_name_analog = "ALC269 Analog";
13063 spec->stream_analog_playback = &alc269_pcm_analog_playback; 13084 if (codec->subsystem_id == 0x17aa3bf8) {
13064 spec->stream_analog_capture = &alc269_pcm_analog_capture; 13085 /* Due to a hardware problem on Lenovo Ideadpad, we need to
13065 13086 * fix the sample rate of analog I/O to 44.1kHz
13087 */
13088 spec->stream_analog_playback = &alc269_44k_pcm_analog_playback;
13089 spec->stream_analog_capture = &alc269_44k_pcm_analog_capture;
13090 } else {
13091 spec->stream_analog_playback = &alc269_pcm_analog_playback;
13092 spec->stream_analog_capture = &alc269_pcm_analog_capture;
13093 }
13066 spec->stream_name_digital = "ALC269 Digital"; 13094 spec->stream_name_digital = "ALC269 Digital";
13067 spec->stream_digital_playback = &alc269_pcm_digital_playback; 13095 spec->stream_digital_playback = &alc269_pcm_digital_playback;
13068 spec->stream_digital_capture = &alc269_pcm_digital_capture; 13096 spec->stream_digital_capture = &alc269_pcm_digital_capture;