ALSA: hda - fix DigEn for Valleyview2 display codec
PATCH 1/1 ALSA: hda - fix DigEn for Valleyview2 display codec
From: Mengdong Lin <[email protected]>
On some Baytrail/Vallleyview platforms, DigEn is disabled on convertors. Thus audio data is blocked from passing through the node and no sound can be heard over HDMI/DP.
This patch fixes the covertor's DigEn when setting up a stream.
sound/pci/hda/patch_hdmi.c +18 -0
@@ -45,6 +45,7 @@ module_param(static_hdmi_pcm, bool, 0644);MODULE_PARM_DESC (static_hdmi_pcm,"Don't restrict PCM parameters per ELD info" );#define is_haswell (codec) ((codec)->vendor_id == 0x80862807) +#define is_valleyview (codec) ((codec)->vendor_id == 0x80862882)struct hdmi_spec_per_cvt {hda_nid_t cvt_nid;
@@ -1061,6 +1062,20 @@ static void haswell_verify_D0(struct hda_codec *codec, } } +static void vlv_verify_digen (struct hda_codec *codec,hda_nid_t cvt_nid) +{ +unsigned int digi1; + + digi1 =snd_hda_codec_read (codec, cvt_nid,0 , +AC_VERB_GET_DIGI_CONVERT_1 ,0 ); + +if (!(digi1 &AC_DIG1_ENABLE )) +snd_hda_codec_write_cache (codec, cvt_nid,0 , +AC_VERB_SET_DIGI_CONVERT_1 , + (digi1 |AC_DIG1_ENABLE ) &0xff ); + +} +/* * Callbacks */
@@ -1078,6 +1093,9 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,if (is_haswell (codec))haswell_verify_D0 (codec, cvt_nid, pin_nid); +if (is_valleyview (codec)) +vlv_verify_digen (codec, cvt_nid); +if (snd_hda_query_pin_caps (codec, pin_nid) &AC_PINCAP_HBR ) { pinctl =snd_hda_codec_read (codec, pin_nid,0 ,AC_VERB_GET_PIN_WIDGET_CONTROL ,0 );
Signature · 1 line
1.8.1.2
At Thu, 24 Oct 2013 18:02:40 -0400,
Quoted 6 lines · [email protected] wrote:
From: Mengdong Lin <[email protected]>
On some Baytrail/Vallleyview platforms, DigEn is disabled on convertors. Thus audio data is blocked from passing through the node and no sound can be heard over HDMI/DP.
The DigEn bit is controlled via "IEC958 Playback Switch", so it's user's intention even if it's turned off.
thanks,
Takashi
Quoted 51 lines
This patch fixes the covertor's DigEn when setting up a stream.
Signed-off-by Mengdong Lin <[email protected]>sound/pci/hda/patch_hdmi.c +18
-0@@ -45,6 +45,7 @@ module_param(static_hdmi_pcm, bool, 0644);MODULE_PARM_DESC (static_hdmi_pcm,"Don't restrict PCM parameters per ELD info" );#define is_haswell (codec) ((codec)->vendor_id == 0x80862807) +#define is_valleyview (codec) ((codec)->vendor_id == 0x80862882)struct hdmi_spec_per_cvt {hda_nid_t cvt_nid;@@ -1061,6 +1062,20 @@ static void haswell_verify_D0(struct hda_codec *codec, } } +static void vlv_verify_digen (struct hda_codec *codec,hda_nid_t cvt_nid) +{ +unsigned int digi1; + + digi1 =snd_hda_codec_read (codec, cvt_nid,0 , +AC_VERB_GET_DIGI_CONVERT_1 ,0 ); + +if (!(digi1 &AC_DIG1_ENABLE )) +snd_hda_codec_write_cache (codec, cvt_nid,0 , +AC_VERB_SET_DIGI_CONVERT_1 , + (digi1 |AC_DIG1_ENABLE ) &0xff ); + +} +/* * Callbacks */ @@ -1078,6 +1093,9 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,if (is_haswell (codec))haswell_verify_D0 (codec, cvt_nid, pin_nid); +if (is_valleyview (codec)) +vlv_verify_digen (codec, cvt_nid); +if (snd_hda_query_pin_caps (codec, pin_nid) &AC_PINCAP_HBR ) { pinctl =snd_hda_codec_read (codec, pin_nid,0 ,AC_VERB_GET_PIN_WIDGET_CONTROL ,0 );Signature · 1 line
1.8.1.2