[alsa-devel] [topic/asoc][RFC 0/1] ASoC: OMAP: Add support for mono link configuration to McBSP DAI

Jarkko Nikula jarkko.nikula at nokia.com
Tue Nov 25 08:29:46 CET 2008


On Mon, 24 Nov 2008 14:33:04 +0000
"ext Mark Brown" <broonie at sirena.org.uk> wrote:

> On Mon, Nov 24, 2008 at 03:45:33PM +0200, Jarkko Nikula wrote:
> > My problem was this kind of switching correct to do in machine driver?
> 
> > 	cpu_dai->playback.channels_min = 1;
> > 	cpu_dai->playback.channels_max = 1;
> > 	cpu_dai->capture.channels_min = 1;
> > 	cpu_dai->capture.channels_max = 1;
> 
> No, these should be constant.  Any dynamic constraints should be applied
> with the constraints API.
> 
Oh my, now feeling like not done my homework. Thanks Mark and sorry
about the line noise :-)

Will send soon patchset adding snd_pcm_hw_constraint_minmax(...,
SNDRV_PCM_HW_PARAM_CHANNELS to existing OMAP machine drivers + updated
version of this patch.

> So, this is a bit messy at the moment since we don't really have any
> DAPM-style routing on the digital side yet.  What most of these codecs
> should probably be doing is declaring a 2 channel minimuim - normally
> that's what they require as a wire format even if they only actually use
> the data from one of those channels.
> 
I think it's not worth to change existing codecs now. Keeping 1 channel
minimum on codec side allow fascinating hackish DAI configurations like
using only one channel from stereo codec or to operate with some
intelligent CPU DAI able to do mono->stereo and stereo->mono mixing
internally. Yet another line noise from me...


Jarkko


More information about the Alsa-devel mailing list