Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-11-01 Thread Vinod Koul
On Wed, Nov 01, 2017 at 04:10:08PM -0500, Pierre-Louis Bossart wrote: > On 11/1/17 4:08 AM, Vinod Koul wrote: > >On Wed, Nov 01, 2017 at 02:49:15AM +0530, Pierre-Louis Bossart wrote: > >>> > >>>BUT given that we have seen stuff i am inclined to add a counter, we cant > >>>have more than 11 device

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-11-01 Thread Vinod Koul
On Wed, Nov 01, 2017 at 04:10:08PM -0500, Pierre-Louis Bossart wrote: > On 11/1/17 4:08 AM, Vinod Koul wrote: > >On Wed, Nov 01, 2017 at 02:49:15AM +0530, Pierre-Louis Bossart wrote: > >>> > >>>BUT given that we have seen stuff i am inclined to add a counter, we cant > >>>have more than 11 device

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-11-01 Thread Pierre-Louis Bossart
On 11/1/17 4:08 AM, Vinod Koul wrote: On Wed, Nov 01, 2017 at 02:49:15AM +0530, Pierre-Louis Bossart wrote: + if (found == false) { + /* TODO: Park this device in Group 13 */ + dev_err(bus->dev, "Slave Entry not found"); No break

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-11-01 Thread Pierre-Louis Bossart
On 11/1/17 4:08 AM, Vinod Koul wrote: On Wed, Nov 01, 2017 at 02:49:15AM +0530, Pierre-Louis Bossart wrote: + if (found == false) { + /* TODO: Park this device in Group 13 */ + dev_err(bus->dev, "Slave Entry not found"); No break

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-11-01 Thread Vinod Koul
On Wed, Nov 01, 2017 at 02:49:15AM +0530, Pierre-Louis Bossart wrote: > > > > >>>+ if (found == false) { > >>>+ /* TODO: Park this device in Group 13 */ > >>>+ dev_err(bus->dev, "Slave Entry not found"); > >> > >>No break here? Otherwise... > > > >Thats

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-11-01 Thread Vinod Koul
On Wed, Nov 01, 2017 at 02:49:15AM +0530, Pierre-Louis Bossart wrote: > > > > >>>+ if (found == false) { > >>>+ /* TODO: Park this device in Group 13 */ > >>>+ dev_err(bus->dev, "Slave Entry not found"); > >> > >>No break here? Otherwise... > > > >Thats

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-10-31 Thread Pierre-Louis Bossart
+ if (found == false) { + /* TODO: Park this device in Group 13 */ + dev_err(bus->dev, "Slave Entry not found"); No break here? Otherwise... Thats intentional. We want to still read next device that show up + } +

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-10-31 Thread Pierre-Louis Bossart
+ if (found == false) { + /* TODO: Park this device in Group 13 */ + dev_err(bus->dev, "Slave Entry not found"); No break here? Otherwise... Thats intentional. We want to still read next device that show up + } +

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-10-31 Thread Vinod Koul
On Thu, Oct 19, 2017 at 03:44:12PM +0200, Takashi Iwai wrote: > On Thu, 19 Oct 2017 05:03:24 +0200, > Vinod Koul wrote: Sorry looks like I missed replying on this one, my apologies > > +static struct sdw_slave *sdw_get_slave(struct sdw_bus *bus, int i) > > +{ > > + struct sdw_slave *slave; > >

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-10-31 Thread Vinod Koul
On Thu, Oct 19, 2017 at 03:44:12PM +0200, Takashi Iwai wrote: > On Thu, 19 Oct 2017 05:03:24 +0200, > Vinod Koul wrote: Sorry looks like I missed replying on this one, my apologies > > +static struct sdw_slave *sdw_get_slave(struct sdw_bus *bus, int i) > > +{ > > + struct sdw_slave *slave; > >

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-10-19 Thread Takashi Iwai
On Thu, 19 Oct 2017 05:03:24 +0200, Vinod Koul wrote: > > +static struct sdw_slave *sdw_get_slave(struct sdw_bus *bus, int i) > +{ > + struct sdw_slave *slave; > + > + list_for_each_entry(slave, >slaves, node) { > + if (slave->dev_num == i) > + return

Re: [alsa-devel] [PATCH 08/14] soundwire: Add Slave status handling helpers

2017-10-19 Thread Takashi Iwai
On Thu, 19 Oct 2017 05:03:24 +0200, Vinod Koul wrote: > > +static struct sdw_slave *sdw_get_slave(struct sdw_bus *bus, int i) > +{ > + struct sdw_slave *slave; > + > + list_for_each_entry(slave, >slaves, node) { > + if (slave->dev_num == i) > + return