[alsa-devel] [PATCH] cs4270: add support for slave mode configurations

Mark Brown broonie at sirena.org.uk
Wed Feb 25 16:34:45 CET 2009


On Wed, Feb 25, 2009 at 02:37:21PM +0100, Daniel Mack wrote:

>  	reg = snd_soc_read(codec, CS4270_MODE);
>  	reg &= ~(CS4270_MODE_SPEED_MASK | CS4270_MODE_DIV_MASK);
> -	reg |= cs4270_mode_ratios[i].speed_mode | cs4270_mode_ratios[i].mclk;
> +	reg |= cs4270_mode_ratios[i].mclk;
> +
> +	if (cs4270->slave_mode)
> +		reg |= CS4270_MODE_SLAVE;
> +	else
> +		reg |= cs4270_mode_ratios[i].speed_mode;

Shouldn't this be clearing MODE_SLAVE if it's in master mode?  Since
we're doing a read/modify/write here it'd probably just be as easy to
set or clear the bit when setting the DAI format rather than storing the
data and setting it here.


More information about the Alsa-devel mailing list