[alsa-devel] [PATCH v2 05/13] soundwire: Add helpers for ports operations
Vinod Koul
vinod.koul at intel.com
Fri Apr 6 07:05:03 CEST 2018
On Thu, Apr 05, 2018 at 06:27:59PM -0500, Pierre-Louis Bossart wrote:
> >+
> >+ /* Wait for completion on port ready */
> >+ port_ready = &s_rt->slave->port_ready[prep_ch.num];
> >+ time_left = wait_for_completion_timeout(port_ready,
> >+ msecs_to_jiffies(dpn_prop->ch_prep_timeout));
> >+
> >+ val = sdw_read(s_rt->slave, SDW_DPN_PREPARESTATUS(p_rt->num));
> >+ val &= p_rt->ch_mask;
> >+ if (!time_left && !val) {
>
> you sure about this? isn't it if (!time_left || val) ?
> val is one for NotFinished.
Yeah it should be val, thanks for spotting this
> >+ dev_err(&s_rt->slave->dev,
> >+ "Chn prep failed for port:%d", prep_ch.num);
> >+ return -ETIMEDOUT;
> >+ }
> >+ }
> >+
> >+ /* Inform slaves about ports being prepared */
>
> about ports prepared.
ok
> > /**
> >+ * struct sdw_enable_ch: Enable/disable Data Port channel
> >+ *
> >+ * @num: Port number
> >+ * @ch_mask: Active channel mask
> >+ * @enable: Enable (true) /disable (false) channel
> >+ */
> >+struct sdw_enable_ch {
> >+ unsigned int num;
>
> port_num then?
yeah doesnt hurt
--
~Vinod
More information about the Alsa-devel
mailing list