diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-11-08 11:12:10 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-11-08 11:13:59 -0500 |
commit | ee81abb623cb5e03c182d16871bb4fb34fdc9b4f (patch) | |
tree | 74499d19b6cc75343da95899e93a69ad56541323 /sound/pci/hda/patch_conexant.c | |
parent | f37bc7a88d374448a1f4bba9267d308606d78bf2 (diff) |
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.c | 5 |
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 = { | |||
337 | }, | 337 | }, |
338 | }; | 338 | }; |
339 | 339 | ||
340 | static bool is_2_1_speaker(struct conexant_spec *spec); | ||
341 | |||
340 | static int conexant_build_pcms(struct hda_codec *codec) | 342 | static int conexant_build_pcms(struct hda_codec *codec) |
341 | { | 343 | { |
342 | struct conexant_spec *spec = codec->spec; | 344 | struct conexant_spec *spec = codec->spec; |
@@ -351,6 +353,9 @@ static int conexant_build_pcms(struct hda_codec *codec) | |||
351 | spec->multiout.max_channels; | 353 | spec->multiout.max_channels; |
352 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = | 354 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = |
353 | spec->multiout.dac_nids[0]; | 355 | spec->multiout.dac_nids[0]; |
356 | if (is_2_1_speaker(spec)) | ||
357 | info->stream[SNDRV_PCM_STREAM_PLAYBACK].chmap = | ||
358 | snd_pcm_2_1_chmaps; | ||
354 | if (spec->capture_stream) | 359 | if (spec->capture_stream) |
355 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = *spec->capture_stream; | 360 | info->stream[SNDRV_PCM_STREAM_CAPTURE] = *spec->capture_stream; |
356 | else { | 361 | else { |