[alsa-devel] [PATCH] ASoC: fsl-ssi: Allow to use driver with generic audio card
broonie at kernel.org
Sat Apr 26 18:55:19 CEST 2014
On Sat, Apr 26, 2014 at 06:49:16PM +0400, Alexander Shiyan wrote:
> Generic sound card checks return value of functions for setup format,
> clock and slot for -ENOTSUPP error. Add this compatibility to fsl-ssi
> I'm really not sure that's a good solution, please correct me if I'm wrong.
The intention behind -ENOTSUPP is to handle the case where a device has
no configuration facilities (eg, a fixed hardware CODEC) to save having
to have a dummy stub that just checks a parameter.
> @@ -764,7 +764,7 @@ static int fsl_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
> ssi_private->i2s_mode |= CCSR_SSI_SCR_I2S_MODE_SLAVE;
> - return -EINVAL;
> + return -ENOTSUPP;
> /* Data on rising edge of bclk, frame low, 1clk before data */
These are cases where we can do configuration but an invalid
configuration has been provided and we have spotted an error. Ignoring
that should cause runtime problems - I guess it isn't for you though so
there may be something else going on?
Especially for cases like DAI format we should probably enhance the
framework so that these devices can set a variable in their struct
saying what they do support but for now we don't do that.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the Alsa-devel