All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell
@ 2014-01-08 20:55 mengdong.lin
  2014-01-08 20:55 ` [PATCH 1/3] ALSA: hda - add device ID for Broadwell display audio controller mengdong.lin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mengdong.lin @ 2014-01-08 20:55 UTC (permalink / raw
  To: alsa-devel, tiwai; +Cc: Mengdong Lin

From: Mengdong Lin <mengdong.lin@intel.com>

The following patches enable HDMI/DP audio for Intel Broadwell platform from
audio driver side. Gfx driver just reuses Haswell audio enabling code.

Mengdong Lin (3):
  ALSA: hda - add device ID for Broadwell display audio controller
  ALSA: hda - add codec ID for Broadwell display audio codec
  ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec

 sound/pci/hda/hda_intel.c  |  3 +++
 sound/pci/hda/patch_hdmi.c | 17 +++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

-- 
1.8.1.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ALSA: hda - add device ID for Broadwell display audio controller
  2014-01-08 20:55 [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell mengdong.lin
@ 2014-01-08 20:55 ` mengdong.lin
  2014-01-08 20:55 ` [PATCH 2/3] ALSA: hda - add codec ID for Broadwell display audio codec mengdong.lin
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mengdong.lin @ 2014-01-08 20:55 UTC (permalink / raw
  To: alsa-devel, tiwai; +Cc: Mengdong Lin

From: Mengdong Lin <mengdong.lin@intel.com>

This patch adds the device ID for Intel Broadwell display HD-Audio controller,
and applies Haswell properties to this device.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 53937de..fa2879a 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -4009,6 +4009,9 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	  .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
 	{ PCI_DEVICE(0x8086, 0x0d0c),
 	  .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
+	/* Broadwell */
+	{ PCI_DEVICE(0x8086, 0x160c),
+	  .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
 	/* 5 Series/3400 */
 	{ PCI_DEVICE(0x8086, 0x3b56),
 	  .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ALSA: hda - add codec ID for Broadwell display audio codec
  2014-01-08 20:55 [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell mengdong.lin
  2014-01-08 20:55 ` [PATCH 1/3] ALSA: hda - add device ID for Broadwell display audio controller mengdong.lin
@ 2014-01-08 20:55 ` mengdong.lin
  2014-01-08 20:55 ` [PATCH 3/3] ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec mengdong.lin
  2014-01-09  6:32 ` [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: mengdong.lin @ 2014-01-08 20:55 UTC (permalink / raw
  To: alsa-devel, tiwai; +Cc: Mengdong Lin

From: Mengdong Lin <mengdong.lin@intel.com>

This patch adds codec ID (0x80862808) and module alias for Broadwell
display codec.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 59b83f4..670da3e 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -3273,6 +3273,7 @@ static const struct hda_codec_preset snd_hda_preset_hdmi[] = {
 { .id = 0x80862805, .name = "CougarPoint HDMI",	.patch = patch_generic_hdmi },
 { .id = 0x80862806, .name = "PantherPoint HDMI", .patch = patch_generic_hdmi },
 { .id = 0x80862807, .name = "Haswell HDMI",	.patch = patch_generic_hdmi },
+{ .id = 0x80862808, .name = "Broadwell HDMI",	.patch = patch_generic_hdmi },
 { .id = 0x80862880, .name = "CedarTrail HDMI",	.patch = patch_generic_hdmi },
 { .id = 0x80862882, .name = "Valleyview2 HDMI",	.patch = patch_generic_hdmi },
 { .id = 0x808629fb, .name = "Crestline HDMI",	.patch = patch_generic_hdmi },
@@ -3328,6 +3329,7 @@ MODULE_ALIAS("snd-hda-codec-id:80862804");
 MODULE_ALIAS("snd-hda-codec-id:80862805");
 MODULE_ALIAS("snd-hda-codec-id:80862806");
 MODULE_ALIAS("snd-hda-codec-id:80862807");
+MODULE_ALIAS("snd-hda-codec-id:80862808");
 MODULE_ALIAS("snd-hda-codec-id:80862880");
 MODULE_ALIAS("snd-hda-codec-id:80862882");
 MODULE_ALIAS("snd-hda-codec-id:808629fb");
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec
  2014-01-08 20:55 [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell mengdong.lin
  2014-01-08 20:55 ` [PATCH 1/3] ALSA: hda - add device ID for Broadwell display audio controller mengdong.lin
  2014-01-08 20:55 ` [PATCH 2/3] ALSA: hda - add codec ID for Broadwell display audio codec mengdong.lin
@ 2014-01-08 20:55 ` mengdong.lin
  2014-01-09  6:32 ` [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: mengdong.lin @ 2014-01-08 20:55 UTC (permalink / raw
  To: alsa-devel, tiwai; +Cc: Mengdong Lin

From: Mengdong Lin <mengdong.lin@intel.com>

Broadwell and Haswell have the same behavior on display audio. So this patch
defines is_haswell_plus() to include codecs for both Haswell and its successor
Broadwell, and apply all Haswell fix-ups to Broadwell.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 670da3e..64f0a5e 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -46,6 +46,9 @@ 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_broadwell(codec)    ((codec)->vendor_id == 0x80862808)
+#define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec))
+
 #define is_valleyview(codec) ((codec)->vendor_id == 0x80862882)
 
 struct hdmi_spec_per_cvt {
@@ -1101,7 +1104,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
 	if (!channels)
 		return;
 
-	if (is_haswell(codec))
+	if (is_haswell_plus(codec))
 		snd_hda_codec_write(codec, pin_nid, 0,
 					    AC_VERB_SET_AMP_GAIN_MUTE,
 					    AMP_OUT_UNMUTE);
@@ -1280,7 +1283,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
 	struct hdmi_spec *spec = codec->spec;
 	int err;
 
-	if (is_haswell(codec))
+	if (is_haswell_plus(codec))
 		haswell_verify_D0(codec, cvt_nid, pin_nid);
 
 	err = spec->ops.pin_hbr_setup(codec, pin_nid, is_hbr_format(format));
@@ -1421,7 +1424,7 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,
 			    mux_idx);
 
 	/* configure unused pins to choose other converters */
-	if (is_haswell(codec) || is_valleyview(codec))
+	if (is_haswell_plus(codec) || is_valleyview(codec))
 		intel_not_share_assigned_cvt(codec, per_pin->pin_nid, mux_idx);
 
 	snd_hda_spdif_ctls_assign(codec, pin_idx, per_cvt->cvt_nid);
@@ -1611,7 +1614,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
 	if (get_defcfg_connect(config) == AC_JACK_PORT_NONE)
 		return 0;
 
-	if (is_haswell(codec))
+	if (is_haswell_plus(codec))
 		intel_haswell_fixup_connect_list(codec, pin_nid);
 
 	pin_idx = spec->num_pins;
@@ -2249,7 +2252,7 @@ static int patch_generic_hdmi(struct hda_codec *codec)
 	codec->spec = spec;
 	hdmi_array_init(spec, 4);
 
-	if (is_haswell(codec)) {
+	if (is_haswell_plus(codec)) {
 		intel_haswell_enable_all_pins(codec, true);
 		intel_haswell_fixup_enable_dp12(codec);
 	}
@@ -2264,7 +2267,7 @@ static int patch_generic_hdmi(struct hda_codec *codec)
 		return -EINVAL;
 	}
 	codec->patch_ops = generic_hdmi_patch_ops;
-	if (is_haswell(codec)) {
+	if (is_haswell_plus(codec)) {
 		codec->patch_ops.set_power_state = haswell_set_power_state;
 		codec->dp_mst = true;
 	}
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell
  2014-01-08 20:55 [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell mengdong.lin
                   ` (2 preceding siblings ...)
  2014-01-08 20:55 ` [PATCH 3/3] ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec mengdong.lin
@ 2014-01-09  6:32 ` Takashi Iwai
  3 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2014-01-09  6:32 UTC (permalink / raw
  To: mengdong.lin; +Cc: alsa-devel

At Wed,  8 Jan 2014 15:55:07 -0500,
mengdong.lin@intel.com wrote:
> 
> From: Mengdong Lin <mengdong.lin@intel.com>
> 
> The following patches enable HDMI/DP audio for Intel Broadwell platform from
> audio driver side. Gfx driver just reuses Haswell audio enabling code.

Thanks, applied all patches now.


Takashi

> 
> Mengdong Lin (3):
>   ALSA: hda - add device ID for Broadwell display audio controller
>   ALSA: hda - add codec ID for Broadwell display audio codec
>   ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec
> 
>  sound/pci/hda/hda_intel.c  |  3 +++
>  sound/pci/hda/patch_hdmi.c | 17 +++++++++++------
>  2 files changed, 14 insertions(+), 6 deletions(-)
> 
> -- 
> 1.8.1.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-01-09  6:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-08 20:55 [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell mengdong.lin
2014-01-08 20:55 ` [PATCH 1/3] ALSA: hda - add device ID for Broadwell display audio controller mengdong.lin
2014-01-08 20:55 ` [PATCH 2/3] ALSA: hda - add codec ID for Broadwell display audio codec mengdong.lin
2014-01-08 20:55 ` [PATCH 3/3] ALSA: hda/hdmi - apply all Haswell fix-ups to Broadwell display codec mengdong.lin
2014-01-09  6:32 ` [PATCH 0/3] ALSA: hda - enable display audio for Intel Broadwell Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.