* [alsa-devel] [PATCH] ALSA: hda: hdmi - fix pin setup on Tigerlake
@ 2019-11-11 13:38 Kai Vehmanen
2019-11-11 13:54 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Kai Vehmanen @ 2019-11-11 13:38 UTC (permalink / raw)
To: alsa-devel, tiwai; +Cc: kai.vehmanen
Apply same logic to pin setup as on previous platforms. Fixes
errors in HDMI/DP playback.
Tested with both snd-hda-intel and SOF drivers.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
sound/pci/hda/patch_hdmi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index bda4c2b1bfcc..d883719b1546 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -46,10 +46,12 @@ MODULE_PARM_DESC(static_hdmi_pcm, "Don't restrict PCM parameters per ELD info");
((codec)->core.vendor_id == 0x80862800))
#define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c)
#define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f)
+#define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812)
#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \
|| is_skylake(codec) || is_broxton(codec) \
|| is_kabylake(codec) || is_geminilake(codec) \
- || is_cannonlake(codec) || is_icelake(codec))
+ || is_cannonlake(codec) || is_icelake(codec) \
+ || is_tigerlake(codec))
#define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882)
#define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883)
#define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
--
2.17.1
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] ALSA: hda: hdmi - fix pin setup on Tigerlake
2019-11-11 13:38 [alsa-devel] [PATCH] ALSA: hda: hdmi - fix pin setup on Tigerlake Kai Vehmanen
@ 2019-11-11 13:54 ` Takashi Iwai
2019-11-11 14:15 ` Kai Vehmanen
0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2019-11-11 13:54 UTC (permalink / raw)
To: Kai Vehmanen; +Cc: alsa-devel
On Mon, 11 Nov 2019 14:38:38 +0100,
Kai Vehmanen wrote:
>
> Apply same logic to pin setup as on previous platforms. Fixes
> errors in HDMI/DP playback.
>
> Tested with both snd-hda-intel and SOF drivers.
>
> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Just to be sure: does Tigerlake need the fixed number of 3 dev_num?
is_haswell_plus() is applied in a few places, and one place is for
that check.
thanks,
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] ALSA: hda: hdmi - fix pin setup on Tigerlake
2019-11-11 13:54 ` Takashi Iwai
@ 2019-11-11 14:15 ` Kai Vehmanen
2019-11-11 14:43 ` Takashi Iwai
0 siblings, 1 reply; 4+ messages in thread
From: Kai Vehmanen @ 2019-11-11 14:15 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Kai Vehmanen
Hey Takashi,
On Mon, 11 Nov 2019, Takashi Iwai wrote:
> On Mon, 11 Nov 2019 14:38:38 +0100, Kai Vehmanen wrote:
>> Apply same logic to pin setup as on previous platforms. Fixes
>> errors in HDMI/DP playback.
>
> Just to be sure: does Tigerlake need the fixed number of 3 dev_num?
> is_haswell_plus() is applied in a few places, and one place is for
> that check.
yes, that applies as well.
Br, Kai
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [alsa-devel] [PATCH] ALSA: hda: hdmi - fix pin setup on Tigerlake
2019-11-11 14:15 ` Kai Vehmanen
@ 2019-11-11 14:43 ` Takashi Iwai
0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2019-11-11 14:43 UTC (permalink / raw)
To: Kai Vehmanen; +Cc: alsa-devel
On Mon, 11 Nov 2019 15:15:57 +0100,
Kai Vehmanen wrote:
>
> Hey Takashi,
>
> On Mon, 11 Nov 2019, Takashi Iwai wrote:
>
> > On Mon, 11 Nov 2019 14:38:38 +0100, Kai Vehmanen wrote:
> >> Apply same logic to pin setup as on previous platforms. Fixes
> >> errors in HDMI/DP playback.
> >
> > Just to be sure: does Tigerlake need the fixed number of 3 dev_num?
> > is_haswell_plus() is applied in a few places, and one place is for
> > that check.
>
> yes, that applies as well.
OK, applied now.
BTW, I think we can clean up these stuff, something like below...
Takashi
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -37,25 +37,6 @@ static bool static_hdmi_pcm;
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)->core.vendor_id == 0x80862807)
-#define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808)
-#define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809)
-#define is_broxton(codec) ((codec)->core.vendor_id == 0x8086280a)
-#define is_kabylake(codec) ((codec)->core.vendor_id == 0x8086280b)
-#define is_geminilake(codec) (((codec)->core.vendor_id == 0x8086280d) || \
- ((codec)->core.vendor_id == 0x80862800))
-#define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c)
-#define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f)
-#define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812)
-#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \
- || is_skylake(codec) || is_broxton(codec) \
- || is_kabylake(codec) || is_geminilake(codec) \
- || is_cannonlake(codec) || is_icelake(codec) \
- || is_tigerlake(codec))
-#define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882)
-#define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883)
-#define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec))
-
struct hdmi_spec_per_cvt {
hda_nid_t cvt_nid;
int assigned;
@@ -162,6 +143,7 @@ struct hdmi_spec {
bool dyn_pin_out;
bool dyn_pcm_assign;
+ bool intel_pin_fixup;
/*
* Non-generic VIA/NVIDIA specific
*/
@@ -925,7 +907,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
return err;
}
- if (is_haswell_plus(codec)) {
+ if (spec->intel_pin_fixup) {
/*
* on recent platforms IEC Coding Type is required for HBR
@@ -1709,7 +1691,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
* To simplify the implementation, malloc all
* the virtual pins in the initialization statically
*/
- if (is_haswell_plus(codec)) {
+ if (spec->intel_pin_fixup) {
/*
* On Intel platforms, device entries number is
* changed dynamically. If there is a DP MST
@@ -1758,7 +1740,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
per_pin->dev_id = i;
per_pin->non_pcm = false;
snd_hda_set_dev_select(codec, pin_nid, i);
- if (is_haswell_plus(codec))
+ if (spec->intel_pin_fixup)
intel_haswell_fixup_connect_list(codec, pin_nid);
err = hdmi_read_pin_conn(codec, pin_idx);
if (err < 0)
@@ -2825,6 +2807,7 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
spec->vendor_nid = vendor_nid;
spec->port_map = port_map;
spec->port_num = port_num;
+ spec->intel_pin_fixup = true;
intel_haswell_enable_all_pins(codec, true);
intel_haswell_fixup_enable_dp12(codec);
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-11 14:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-11 13:38 [alsa-devel] [PATCH] ALSA: hda: hdmi - fix pin setup on Tigerlake Kai Vehmanen
2019-11-11 13:54 ` Takashi Iwai
2019-11-11 14:15 ` Kai Vehmanen
2019-11-11 14:43 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).