[alsa-devel] [PATCH v2 0/1] *** SUBJECT HERE ***

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Jul 22 14:02:08 CEST 2010


On Thu, Jul 22, 2010 at 01:18:32PM +0200, matti.j.aaltonen at nokia.com wrote:
> From: ext Mark Brown [broonie at opensource.wolfsonmicro.com]

> >> >> +static int wl1273_set_dai_fmt(struct snd_soc_dai *codec_dai,
> >> >> +                           unsigned int fmt)
> >> >> +{
> >> >> +     return 0;
> >> >> +}

> >> >Remove unused functions.

> >> I tried leaving this out but then the codec stopped working. I guess I should
> >> mention that my test environment is 2.6.32. I'm only able to test that
> >> the codec compiles under 2.6.35. Anyway I left the function in.

> >Could you please be a little more specific - what do you mean when you
> >say "the CODEC stopped working?  The set_dai_fmt() function has always
> >been optional.

> I get this error message:

> aplay  -f dat -Dhw:wl1273 /root/sumppi.wav 
> [  297.179626] Can't set codec DAI configuration: -22
> [  297.184539] asoc: BT/FM PCM startup failed

So, obviously if your machine driver tries to configure the DAI format
on a device that doesn't support configuring the DAI format that's not
going to work.  You should just remove the attempt to do something
unsupported from the machine driver rather than adding a null function.
If there is a function there it needs to at least do validation of the
parameters.

> >So why do you believe that the soc_card driver needs to know the CODEC
> >mode?  This was the gist of my original question...

[Reflowed into 80 colummns, please fix your MUA configuration.]
> OK, sorry... The problem in a sense is that the codec supports three
> different modes: BT, FM RX and FM TX. All digital audio goes over a
> single McBSP connection. The BT part handles the audio routing, which
> is completely external to the radio driver and this codec. And the user
> of the codec is in principle responsible for keeping the codec mode in
> sync with the route setting. And the soc_card driver needs to know the
> setting also to do its thing.

Which is...

You've still not provided any information about what use this will be
put to.


More information about the Alsa-devel mailing list