[PATCH 1/2] soundwire: add definition for maximum number of ports

Liao, Bard bard.liao at intel.com
Tue Aug 18 08:53:05 CEST 2020


> -----Original Message-----
> From: Vinod Koul <vkoul at kernel.org>
> Sent: Tuesday, August 18, 2020 2:36 PM
> To: Bard Liao <yung-chuan.liao at linux.intel.com>
> Cc: alsa-devel at alsa-project.org; linux-kernel at vger.kernel.org; tiwai at suse.de;
> broonie at kernel.org; gregkh at linuxfoundation.org; jank at cadence.com;
> srinivas.kandagatla at linaro.org; rander.wang at linux.intel.com;
> ranjani.sridharan at linux.intel.com; hui.wang at canonical.com; pierre-
> louis.bossart at linux.intel.com; Kale, Sanyog R <sanyog.r.kale at intel.com>; Lin,
> Mengdong <mengdong.lin at intel.com>; Liao, Bard <bard.liao at intel.com>
> Subject: Re: [PATCH 1/2] soundwire: add definition for maximum number of
> ports
> 
> On 18-08-20, 01:47, Bard Liao wrote:
> > From: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
> >
> > A Device may have at most 15 physical ports (DP0, DP1..DP14).
> >
> > Signed-off-by: Pierre-Louis Bossart
> > <pierre-louis.bossart at linux.intel.com>
> > Reviewed-by: Rander Wang <rander.wang at linux.intel.com>
> > Reviewed-by: Guennadi Liakhovetski
> > <guennadi.liakhovetski at linux.intel.com>
> > Signed-off-by: Bard Liao <yung-chuan.liao at linux.intel.com>
> > ---
> >  include/linux/soundwire/sdw.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/linux/soundwire/sdw.h
> > b/include/linux/soundwire/sdw.h index 76052f12c9f7..0aa4c6af7554
> > 100644
> > --- a/include/linux/soundwire/sdw.h
> > +++ b/include/linux/soundwire/sdw.h
> > @@ -38,7 +38,8 @@ struct sdw_slave;
> >  #define SDW_FRAME_CTRL_BITS		48
> >  #define SDW_MAX_DEVICES			11
> >
> > -#define SDW_VALID_PORT_RANGE(n)		((n) <= 14 && (n) >= 1)
> > +#define SDW_MAX_PORTS			15
> > +#define SDW_VALID_PORT_RANGE(n)		((n) <
> SDW_MAX_PORTS && (n) >= 1)
> 
> What is the use of this one if we are allocating all ports always, Also, I dont
> see it used in second patch?

It is used in drivers/soundwire/stream.c and drivers/soundwire/debugfs.c.

> 
> >
> >  enum {
> >  	SDW_PORT_DIRN_SINK = 0,
> > --
> > 2.17.1
> 
> --
> ~Vinod


More information about the Alsa-devel mailing list