summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_conexant.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-08 17:12:10 +0100
committerTakashi Iwai <tiwai@suse.de>2012-11-08 17:13:59 +0100
commitee81abb623cb5e03c182d16871bb4fb34fdc9b4f (patch)
tree74499d19b6cc75343da95899e93a69ad56541323 /sound/pci/hda/patch_conexant.c
parentf37bc7a88d374448a1f4bba9267d308606d78bf2 (diff)
downloadlinux-stable-ee81abb623cb5e03c182d16871bb4fb34fdc9b4f.tar.gz
linux-stable-ee81abb623cb5e03c182d16871bb4fb34fdc9b4f.tar.bz2
linux-stable-ee81abb623cb5e03c182d16871bb4fb34fdc9b4f.zip
ALSA: hda - Apply a proper chmap for built-in 2.1 speakers
When 2.1 speakers are detected, use the corresponding channel map instead of the standard map with front+rear surrounds. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_conexant.c')
-rw-r--r--sound/pci/hda/patch_conexant.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index f8e9ff493dc7..3401a087de80 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -337,6 +337,8 @@ static const struct hda_pcm_stream cx5051_pcm_analog_capture = {
},
};
+static bool is_2_1_speaker(struct conexant_spec *spec);
+
static int conexant_build_pcms(struct hda_codec *codec)
{
struct conexant_spec *spec = codec->spec;
@@ -351,6 +353,9 @@ static int conexant_build_pcms(struct hda_codec *codec)
spec->multiout.max_channels;
info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
spec->multiout.dac_nids[0];
+ if (is_2_1_speaker(spec))
+ info->stream[SNDRV_PCM_STREAM_PLAYBACK].chmap =
+ snd_pcm_2_1_chmaps;
if (spec->capture_stream)
info->stream[SNDRV_PCM_STREAM_CAPTURE] = *spec->capture_stream;
else {