Re: [RFC PATCH 4/4] ALSA - hda: add DP MST support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Takashi,

> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai@xxxxxxx]
> Sent: Monday, March 07, 2016 11:19 PM
> To: libin.yang@xxxxxxxxxxxxxxx
> Cc: alsa-devel@xxxxxxxxxxxxxxxx; Lin, Mengdong; Yang, Libin
> Subject: Re:  [RFC PATCH 4/4] ALSA - hda: add DP MST
> support
> 
> On Mon, 07 Mar 2016 15:57:46 +0100,
> libin.yang@xxxxxxxxxxxxxxx wrote:
> >
> > From: Libin Yang <libin.yang@xxxxxxxxxxxxxxx>
> >
> > This patch adds the DP MST support in hdmi audio driver.
> > ---
> >  sound/pci/hda/hda_codec.c  |   3 +
> >  sound/pci/hda/patch_hdmi.c | 167
> +++++++++++++++++++++++++++++++--------------
> >  2 files changed, 120 insertions(+), 50 deletions(-)
> >
> > diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> > index 1a42c51..7244f87 100644
> > --- a/sound/pci/hda/hda_codec.c
> > +++ b/sound/pci/hda/hda_codec.c
> > @@ -589,6 +589,9 @@ 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);
> > diff --git a/sound/pci/hda/patch_hdmi.c
> b/sound/pci/hda/patch_hdmi.c
> > index 11be04a..26f5efd 100644
> > --- a/sound/pci/hda/patch_hdmi.c
> > +++ b/sound/pci/hda/patch_hdmi.c
> > @@ -144,7 +144,9 @@ struct hdmi_spec {
> >  	struct snd_array cvts; /* struct hdmi_spec_per_cvt */
> >  	hda_nid_t cvt_nids[4]; /* only for haswell fix */
> >
> > -	int num_pins;
> > +	int num_pins; /* number of pins (including device entries) */
> > +	int num_nids; /* number of pin nids*/
> > +	int dev_num;
> 
> These new definitions are unclear to me.  Please give a bit more
> detailed comments there.  e.g. what actually means "including device
> entries"?  You can give some example there.  I suppose num_nids is the
> actual number of pins, right?  Also what is dev_num?  It's not an
> index, right?

OK. I will add more comments in the code. For this case:
1. num_pins is the virtual pin number. For example, 
    there are 3 pins and each pin has 4 device entry, the num_pins will be 12.
2. num_nids is the actual number of pins. For the above case it will be 3
3. dev_num is the device entry number on each pin. For the above case, it is 4.
    dev_num is used to decide to create how many pcms (as we talked before,
    num_nids + dev_num - 1, on Intel platform, it is 5 pcms)
    For more complex case (not sure there is such case in reality), pin 1 has 2
    device entries, pin 2 and pin 3 has 3 device entries. The dev_num is 3.
    And 5 pcms will be created.

For device entry index, the index is located in per_pin struct.

Regards,
Libin

> 
> 
> thanks,
> 
> Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux