[alsa-devel] [PATCH] ASoC: samsung - Don't setup i2s if already active.

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Nov 9 17:08:56 CET 2012

On Thu, Nov 08, 2012 at 02:46:56PM -0800, Dylan Reid wrote:
> If the dai is already running when setup is called, skip setup.  Setting
> up again caused set_sysclk to set rclk_srcrate to other->rclk_srcrate,
> other would often be set to the default of 44.1.  Playing a 48k stream
> then adding a 48k capture stream would lead to both streams set to 44.1
> (The value of other->rclk_srcrate).

This doesn't seem the obvious fix here - surely if the setup comes out
with the wrong answer the configuration it was asked for doesn't match
the configuration the device currently has and therefore we should
return an error as the new stream will have an incorrect setup?

Really this driver should probably be being redone in terms of the DPCM
code, it predates it and is a very simple case of it but it's in the
same ballpark feature wise.

> Similarly in shutdown, if either playback or capture is still active,
> return instead of turning off the clocks.

This seems sensible; another option is to do clk_enable() for both
streams then let the clock framework refcount for us.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20121109/e256b536/attachment.sig>

More information about the Alsa-devel mailing list