aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_hdmi.c
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@intel.com>2013-10-31 18:31:51 -0400
committerTakashi Iwai <tiwai@suse.de>2013-11-01 05:47:16 -0400
commit023838542dc8a4eac9650f98942671078a4ce73d (patch)
tree9b57594055f1a1862d2d5670fbde113cdae72e8b /sound/pci/hda/patch_hdmi.c
parent8e38395360844806041ea69ab9690f5f174bc40c (diff)
ALSA: hda - not choose assigned converters for unused pins of Valleyview
For Valleyview display codec, if an unused pin chooses an assgined converter selected by a used pin, playback on the unused pin can also give sound to the output device of the used pin. It's because data flows from the same convertor to the display port of the used pin. This issue is same as Haswell. So this patch avoids using assinged convertors for unused pins. The related function haswell_config_cvts() is renamed for code reuse. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_hdmi.c')
-rw-r--r--sound/pci/hda/patch_hdmi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 772827b9fb20..d61cc2ab52af 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -46,6 +46,7 @@ module_param(static_hdmi_pcm, bool, 0644);
46MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info"); 46MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
47 47
48#define is_haswell(codec) ((codec)->vendor_id == 0x80862807) 48#define is_haswell(codec) ((codec)->vendor_id == 0x80862807)
49#define is_valleyview(codec) ((codec)->vendor_id == 0x80862882)
49 50
50struct hdmi_spec_per_cvt { 51struct hdmi_spec_per_cvt {
51 hda_nid_t cvt_nid; 52 hda_nid_t cvt_nid;
@@ -1327,7 +1328,7 @@ static int hdmi_choose_cvt(struct hda_codec *codec,
1327 return 0; 1328 return 0;
1328} 1329}
1329 1330
1330static void haswell_config_cvts(struct hda_codec *codec, 1331static void not_share_unassigned_cvt(struct hda_codec *codec,
1331 hda_nid_t pin_nid, int mux_idx) 1332 hda_nid_t pin_nid, int mux_idx)
1332{ 1333{
1333 struct hdmi_spec *spec = codec->spec; 1334 struct hdmi_spec *spec = codec->spec;
@@ -1406,8 +1407,8 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
1406 mux_idx); 1407 mux_idx);
1407 1408
1408 /* configure unused pins to choose other converters */ 1409 /* configure unused pins to choose other converters */
1409 if (is_haswell(codec)) 1410 if (is_haswell(codec) || is_valleyview(codec))
1410 haswell_config_cvts(codec, per_pin->pin_nid, mux_idx); 1411 not_share_unassigned_cvt(codec, per_pin->pin_nid, mux_idx);
1411 1412
1412 snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid); 1413 snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid);
1413 1414