Re: [PATCH v3 2/3] ALSA SoC: Add mpc5200-psc I2S driver

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

 



On Tue, Jul 22, 2008 at 12:53:58AM -0600, Grant Likely wrote:

> Signed-off-by: Grant Likely <grant.likely@xxxxxxxxxxxx>

Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

There's a few issues that were raised on the previous review cycle that
still need to be addressed but they should be fixable in incremental
patches (and easier to review that way):

> +static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)

> +		spin_lock_irqsave(&psc_i2s->lock, flags);
> +		/* first make sure it is low */
> +		while ((in_8(&regs->ipcr_acr.ipcr) & 0x80) != 0)
> +			;
> +		/* then wait for the transition to high */
> +		while ((in_8(&regs->ipcr_acr.ipcr) & 0x80) == 0)
> +			;

These loops should really have some sort of time limit on them,
otherwise they'll lock hard if the expected events don't happen.  Given
that in slave mode they're synchronising with an externally generated
clock this is something that might happen in practice and should produce
better diagnostics.

> +	default:
> +		dev_dbg(psc_i2s->dev, "invalid command\n");
> +		return -EINVAL;
> +	}

I'd really expect to see the other possible triggers handled, even if
the appropriate action is to silently ignore them, rather than having
them generate an error message.
_______________________________________________
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