[alsa-devel] [PATCH 5/5] ASoC: tlv320dac33: Safety check for codec slave mode

Peter Ujfalusi peter.ujfalusi at nokia.com
Mon Jan 4 08:03:23 CET 2010


Hello,

On Thursday 31 December 2009 13:52:19 ext Mark Brown wrote:
> On Thu, Dec 31, 2009 at 10:30:23AM +0200, Peter Ujfalusi wrote:
> > The currently available FIFO modes (mode1 and mode7) require master
> > mode from the codec.
> > Do not allow the slave configuration when the FIFO is in use.
> >
> > Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>
> 
> Ideally the mode configuration control ought to have a corresponding
> limit in it too, so that these modes can't be enabled when the device
> is configured as a slave and is active.

Well, the FIFO mode can not be changed runtime (while the playback is running) 
for various reasons.
The control is protected against changes while the playback is running.
Since at the moment the driver only supports master mode FIFO scenarios (expect 
for the FIFO bypass mode, which should work in slave mode as well) I think this 
check is sufficient to ensure that the codec/cpu dai is configured correctly.
As far as I know the set_dai_fmt is the place where the machine driver 
configures the codec to master/slave, so this must be the correct place for a 
safety check.

-- 
Péter


More information about the Alsa-devel mailing list