support DP MST audio
Subsystems (2)
v5 cover support DP MST audio
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
change log:
v4: refine some comments in 0001 and 0002 patches.
refine the 0003 patch for the new ALSA-Configuration document
v5: add Takashi's Reviewed-by
Libin Yang (3):
ALSA: hda - add DP mst verb support
ALSA: hda - add DP MST audio support
ALSA: Documentation about HDA DP MST pin init and connection
Documentation/sound/hd-audio/dp-mst.rst | 17 +++ sound/pci/hda/hda_codec.c | 76 +++++++++- sound/pci/hda/hda_codec.h | 3 + sound/pci/hda/patch_hdmi.c | 245 +++++++++++++++++++++++++------- 4 files changed, 285 insertions(+), 56 deletions(-)
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 1/3 ALSA: hda - add DP mst verb support
From: Libin Yang <[email protected]>
Add snd_hda_get_dev_select() and snd_hda_set_dev_select() functions for DP MST audio support.
--- sound/pci/hda/hda_codec.c | 72 ++++++++++++++++++++++++++++++++++++++++++++--- sound/pci/hda/hda_codec.h | 3 ++ 2 files changed, 71 insertions(+), 4 deletions(-)
sound/pci/hda/hda_codec.c +68 -4
@@ -311,9 +311,15 @@ int snd_hda_get_conn_index(struct hda_codec *codec, hda_nid_t mux, }EXPORT_SYMBOL_GPL (snd_hda_get_conn_index); - -/* return DEVLIST_LEN parameter of the given widget */ -static unsigned int get_num_devices (struct hda_codec *codec,hda_nid_t nid) +/** +* snd_hda_get_num_devices - get DEVLIST_LEN parameter of the given widget +* @codec: the HDA codec +* @nid: NID of the pin to parse +* +* Get the device entry number on the given widget. This is a feature of +* DP MST audio. Each pin can have several device entries in it. +*/ +unsigned int snd_hda_get_num_devices (struct hda_codec *codec,hda_nid_t nid) {unsigned int wcaps =get_wcaps (codec, nid);unsigned int parm;
@@ -327,6 +333,7 @@ static unsigned int get_num_devices(struct hda_codec *codec, hda_nid_t nid) parm =0 ;return parm &AC_DEV_LIST_LEN_MASK ; } +EXPORT_SYMBOL_GPL (snd_hda_get_num_devices);/** * snd_hda_get_devices - copy device list without cache
@@ -344,7 +351,7 @@ int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid,unsigned int parm;int i, dev_len, devices; - parm =get_num_devices (codec, nid); + parm =snd_hda_get_num_devices (codec, nid);if (!parm)/* not multi-stream capable */ return 0 ;
@@ -368,6 +375,63 @@ int snd_hda_get_devices(struct hda_codec *codec, hda_nid_t nid,return devices; } +/** +* snd_hda_get_dev_select - get device entry select on the pin +* @codec: the HDA codec +* @nid: NID of the pin to get device entry select +* +* Get the devcie entry select on the pin. Return the device entry +* id selected on the pin. Return 0 means the first device entry +* is selected or MST is not supported. +*/ +int snd_hda_get_dev_select (struct hda_codec *codec,hda_nid_t nid) +{ +/* not support dp_mst will always return 0, using first dev_entry */ +if (!codec->dp_mst) +return 0 ; + +return snd_hda_codec_read (codec, nid,0 ,AC_VERB_GET_DEVICE_SEL ,0 ); +} +EXPORT_SYMBOL_GPL (snd_hda_get_dev_select); + +/** +* snd_hda_set_dev_select - set device entry select on the pin +* @codec: the HDA codec +* @nid: NID of the pin to set device entry select +* @dev_id: device entry id to be set +* +* Set the device entry select on the pin nid. +*/ +int snd_hda_set_dev_select (struct hda_codec *codec,hda_nid_t nid,int dev_id) +{ +int ret, num_devices; + +/* not support dp_mst will always return 0, using first dev_entry */ +if (!codec->dp_mst) +return 0 ; + +/* AC_PAR_DEVLIST_LEN is 0 based. */ + num_devices =snd_hda_get_num_devices (codec, nid) +1 ; +/* If Device List Length is 0 (num_device = 1), +* the pin is not multi stream capable. +* Do nothing in this case. +*/ +if (num_devices ==1 ) +return 0 ; + +/* Behavior of setting index being equal to or greater than +* Device List Length is not predictable +*/ +if (num_devices <= dev_id) +return -EINVAL ; + + ret =snd_hda_codec_write (codec, nid,0 , +AC_VERB_SET_DEVICE_SEL , dev_id); + +return ret; +} +EXPORT_SYMBOL_GPL (snd_hda_set_dev_select); +/* * read widget caps for each widget and store in cache */
sound/pci/hda/hda_codec.h +3 -0
@@ -347,8 +347,11 @@ int snd_hda_override_conn_list(struct hda_codec *codec, hda_nid_t nid, int nums, const hda_nid_t *list);int snd_hda_get_conn_index (struct hda_codec *codec,hda_nid_t mux,hda_nid_t nid,int recursive); +unsigned int snd_hda_get_num_devices (struct hda_codec *codec,hda_nid_t nid);int snd_hda_get_devices (struct hda_codec *codec,hda_nid_t nid,u8 *dev_list,int max_devices); +int snd_hda_get_dev_select (struct hda_codec *codec,hda_nid_t nid); +int snd_hda_set_dev_select (struct hda_codec *codec,hda_nid_t nid,int dev_id);struct hda_verb {hda_nid_t nid;
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 2/3 ALSA: hda - add DP MST audio support
In reply to [email protected]From: Libin Yang <[email protected]>
This patch adds the DP MST audio support on i915 platform and it will enable dyn_pcm_assign feature.
DP MST supports several device entry on the same port and each device entry can map to one pcm stream. For example, on i915, there are 3 pins, and each pin has 3 device entries. This means there should be 3x3 pcms. However, there is only 3 pipe lines in i915. This means 3 pcms are actived at most at the same moment. We will create 5 pcms (pin number + dev entry num - 1) in this case. For the details, please refer commit a76056f2e57e
("ALSA: hda - hdmi dynamically bind PCM to pin when monitor hotplug")
Each device entry is a virtual pin. It is described by pin_nid and dev_id in struct hdmi_spec_per_pin.
--- sound/pci/hda/hda_codec.c | 4 + sound/pci/hda/patch_hdmi.c | 245 +++++++++++++++++++++++++++++++++++---------- 2 files changed, 197 insertions(+), 52 deletions(-)
sound/pci/hda/hda_codec.c +4 -0
@@ -467,6 +467,10 @@ static int read_pin_defaults(struct hda_codec *codec) pin->nid = nid; pin->cfg =snd_hda_codec_read (codec, nid,0 ,AC_VERB_GET_CONFIG_DEFAULT ,0 ); +/* +* all device entries are the same widget control so far +* fixme: if any codec is different, need fix here +*/ pin->ctrl =snd_hda_codec_read (codec, nid,0 ,AC_VERB_GET_PIN_WIDGET_CONTROL ,0 );
sound/pci/hda/patch_hdmi.c +193 -52
471 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v5 3/3 ALSA: Documentation about HDA DP MST pin init and connection
In reply to [email protected]From: Libin Yang <[email protected]>
Add the documentation about HD-audio DP MST:
1. pin initialization
2. device entry connection list
--- Documentation/sound/hd-audio/dp-mst.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
Documentation/sound/hd-audio/dp-mst.rst +17 -0
@@ -19,6 +19,23 @@ PCM === To be added +Pin Initialization +================== +Each pin may have several device entries (virtual pins). On Intel platform, +the device entries number is dynamically changed. If DP MST hub is connected, +it is in DP MST mode, and the device entries number is 3. Otherwise, the +device entries number is 1. + +To simplify the implementation, all the device entries will be initialized +when bootup no matter whether it is in DP MST mode or not. + +Connection list +=============== +DP MST reuses connection list code. The code can be reused because +device entries on the same pin have the same connection list. + +This means DP MST gets the device entry connection list without the +device entry setting. Jack ====
Signature · 6 lines
2.7.4 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 3 lines · On Thu, 12 Jan 2017, [email protected] wrote:
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
Given that this is only sent to intel-gfx, I *presume* this is now intended to be merged via drm-intel. Is that right?
Please don't assume your poor maintainers remember everything!
BR,
Jani.
Quoted 16 lines
change log:
v4: refine some comments in 0001 and 0002 patches.
refine the 0003 patch for the new ALSA-Configuration document
v5: add Takashi's Reviewed-byLibin Yang (3):
ALSA: hda - add DP mst verb support
ALSA: hda - add DP MST audio support
ALSA: Documentation about HDA DP MST pin init and connectionDocumentation/sound/hd-audio/dp-mst.rst | 17 +++ sound/pci/hda/hda_codec.c | 76 +++++++++- sound/pci/hda/hda_codec.h | 3 + sound/pci/hda/patch_hdmi.c | 245 +++++++++++++++++++++++++------- 4 files changed, 285 insertions(+), 56 deletions(-)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Thursday, January 12, 2017 4:19 PM
To: Yang, Libin <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; Pandiyan, Dhinakaran <[email protected]>; [email protected]
Cc: Yang, Libin <[email protected]>
Subject: Re: [PATCH v5 0/3] support DP MST audioOn Thu, 12 Jan 2017, [email protected] wrote:
Quoted 8 lines
Quoted 3 lines
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
Given that this is only sent to intel-gfx, I *presume* this is now intended to be merged via drm-intel. Is that right?
Please don't assume your poor maintainers remember everything!
These patches are for drm-tip.
Which mail list I should send? I found the mail addresses are:
[email protected] and [email protected]. from https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.html
Thanks,
Libin
Quoted 20 lines
BR,
Jani.Quoted 11 lines
change log:
v4: refine some comments in 0001 and 0002 patches.
refine the 0003 patch for the new ALSA-Configuration document
v5: add Takashi's Reviewed-byLibin Yang (3):
ALSA: hda - add DP mst verb support
ALSA: hda - add DP MST audio support
ALSA: Documentation about HDA DP MST pin init and connectionQuoted 4 lines
Documentation/sound/hd-audio/dp-mst.rst | 17 +++ sound/pci/hda/hda_codec.c | 76 +++++++++- sound/pci/hda/hda_codec.h | 3 + sound/pci/hda/patch_hdmi.c | 245 +++++++++++++++++++++++++---
Quoted 5 lines
----
Quoted 1 line
4 files changed, 285 insertions(+), 56 deletions(-)--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 17 lines · Libin
Quoted 17 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Thursday, January 12, 2017 4:19 PM
To: Yang, Libin <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; Pandiyan, Dhinakaran <[email protected]>; [email protected]
Cc: Yang, Libin <[email protected]>
Subject: Re: [PATCH v5 0/3] support DP MST audioQuoted 3 lines · On Thu, 12 Jan 2017, [email protected] wrote:
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
Given that this is only sent to intel-gfx, I *presume* this is now intended to be merged via drm-intel. Is that right?
Quoted 7 lines
Quoted 1 line
Please don't assume your poor maintainers remember everything!
These patches are for drm-tip.
Which mail list I should send? I found the mail addresses are:
[email protected] and [email protected]. from https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.html
What I'm trying and apparently failing to say is that regardless of the tree and the mailing list, the patches only touch stuff under sound/, so it would be great to have a hint that these are really meant to be merged via us.
BR,
Jani.
Quoted 29 lines
Thanks,
LibinQuoted 25 lines
BR,
Jani.Quoted 11 lines
change log:
v4: refine some comments in 0001 and 0002 patches.
refine the 0003 patch for the new ALSA-Configuration document
v5: add Takashi's Reviewed-byLibin Yang (3):
ALSA: hda - add DP mst verb support
ALSA: hda - add DP MST audio support
ALSA: Documentation about HDA DP MST pin init and connectionQuoted 4 lines
Documentation/sound/hd-audio/dp-mst.rst | 17 +++ sound/pci/hda/hda_codec.c | 76 +++++++++- sound/pci/hda/hda_codec.h | 3 + sound/pci/hda/patch_hdmi.c | 245 +++++++++++++++++++++++++-------
Quoted 1 line
4 files changed, 285 insertions(+), 56 deletions(-)--
Jani Nikula, Intel Open Source Technology Center
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 23 lines · Jani Nikula
Quoted 21 lines · Libin
Quoted 10 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Thursday, January 12, 2017 4:19 PM
To: Yang, Libin <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; Pandiyan, Dhinakaran <[email protected]>; [email protected]
Cc: Yang, Libin <[email protected]>
Subject: Re: [PATCH v5 0/3] support DP MST audioOn Thu, 12 Jan 2017, [email protected] wrote:
Quoted 8 lines
Quoted 3 lines
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
Given that this is only sent to intel-gfx, I *presume* this is now intended to be merged via drm-intel. Is that right?
Please don't assume your poor maintainers remember everything!
These patches are for drm-tip.
Quoted 8 lines
Quoted 3 lines
Which mail list I should send? I found the mail addresses are:
[email protected] and [email protected]. from https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.htmlWhat I'm trying and apparently failing to say is that regardless of the tree and the mailing list, the patches only touch stuff under
sound/, so it would be great to have a hint that these are really meant to be merged via us.
Yes, feel free to take these patches through drm or i915 tree. There was a discussion in the previous thread, and I agreed with it, since there is a heavy dependency on the recent drm stuff.
thanks,
Takashi
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Jani Nikula
Quoted 21 lines · Libin
Quoted 10 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Thursday, January 12, 2017 4:19 PM
To: Yang, Libin <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; Pandiyan, Dhinakaran <[email protected]>; [email protected]
Cc: Yang, Libin <[email protected]>
Subject: Re: [PATCH v5 0/3] support DP MST audioOn Thu, 12 Jan 2017, [email protected] wrote:
Quoted 8 lines
Quoted 3 lines
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
Given that this is only sent to intel-gfx, I *presume* this is now intended to be merged via drm-intel. Is that right?
Please don't assume your poor maintainers remember everything!
These patches are for drm-tip.
Quoted 8 lines
Quoted 3 lines
Which mail list I should send? I found the mail addresses are:
[email protected] and [email protected]. from https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.htmlWhat I'm trying and apparently failing to say is that regardless of the tree and the mailing list, the patches only touch stuff under
sound/, so it would be great to have a hint that these are really meant to be merged via us.
And imo still good to cc: takashi and sound lists so they know I've picked them up. Now I need to dig out that other thread (which is somewhere) so I can confirm to Takashi that it has landed.
A good rule of thumb is to assume that your maintainers have no idea what's going on, and that they'll forget within 5 minutes again. Always better to overcommunicate :-)
Cheers, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 27 lines · Daniel Vetter
Quoted 26 lines · Jani Nikula
Quoted 24 lines · Libin
Quoted 10 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Thursday, January 12, 2017 4:19 PM
To: Yang, Libin <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; Pandiyan, Dhinakaran <[email protected]>; [email protected]
Cc: Yang, Libin <[email protected]>
Subject: Re: [PATCH v5 0/3] support DP MST audioOn Thu, 12 Jan 2017, [email protected] wrote:
Quoted 8 lines
Quoted 3 lines
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
Given that this is only sent to intel-gfx, I *presume* this is now intended to be merged via drm-intel. Is that right?
Please don't assume your poor maintainers remember everything!
These patches are for drm-tip.
Which mail list I should send? I found the mail addresses are:
[email protected] and [email protected]. from https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.html
Quoted 8 lines
Quoted 4 lines
What I'm trying and apparently failing to say is that regardless of the tree and the mailing list, the patches only touch stuff under
sound/, so it would be great to have a hint that these are really meant to be merged via us.And imo still good to cc: takashi and sound lists so they know I've picked them up. Now I need to dig out that other thread (which is somewhere) so I can confirm to Takashi that it has landed.
Oops, Takashi _is_ already on cc, but ccing alsa wouldn't have hurt. Sorry about that, too early in the morning still ...
Anyway, patches applied to drm-intel for 4.11.
Thanks, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 46 lines
-----Original Message-----
From: Daniel Vetter [mailto:[email protected]] On Behalf Of Daniel Vetter
Sent: Thursday, January 12, 2017 5:10 PM
To: Jani Nikula <[email protected]>
Cc: Yang, Libin <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; Pandiyan, Dhinakaran <[email protected]>; [email protected]
Subject: Re: [Intel-gfx] [PATCH v5 0/3] support DP MST audioQuoted 35 lines · Daniel Vetter
Quoted 33 lines · Jani Nikula
Quoted 20 lines · Libin
Quoted 11 lines
-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Thursday, January 12, 2017 4:19 PM
To: Yang, Libin <[email protected]>; [email protected]; [email protected]; Vetter, Daniel <[email protected]>; Pandiyan, Dhinakaran <[email protected]>; [email protected]
Cc: Yang, Libin <[email protected]>
Subject: Re: [PATCH v5 0/3] support DP MST audioOn Thu, 12 Jan 2017, [email protected] wrote:
Quoted 8 lines
Quoted 3 lines
From: Libin Yang <[email protected]>
This patchset starts to support DP MST audio.
Given that this is only sent to intel-gfx, I *presume* this is now intended to be merged via drm-intel. Is that right?
Please don't assume your poor maintainers remember everything!
Quoted 7 lines
These patches are for drm-tip.
Which mail list I should send? I found the mail addresses are:
[email protected] and [email protected]. from
https://01.org/linuxgraphics/gfx-docs/maintainer-tools/drm-intel.h
tmlWhat I'm trying and apparently failing to say is that regardless of the tree and the mailing list, the patches only touch stuff under
sound/, so it would be great to have a hint that these are really meant to be merged via us.
Quoted 8 lines
Quoted 3 lines
And imo still good to cc: takashi and sound lists so they know I've picked them up. Now I need to dig out that other thread (which is somewhere) so I can confirm to Takashi that it has landed.
Oops, Takashi _is_ already on cc, but ccing alsa wouldn't have hurt. Sorry about that, too early in the morning still ...
Anyway, patches applied to drm-intel for 4.11.
Thanks. Yes, it is a good suggestion to cc ALSA. And as Jani said it is better to describe it is for gfx.
Regards,
Libin
Quoted 6 lines
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx