[alsa-devel] [PATCH] ASoC: define playback and capture streams in dummy codec
Lars-Peter Clausen
lars at metafoo.de
Fri Apr 12 17:31:19 CEST 2013
On 04/12/2013 05:20 PM, Stas Sergeev wrote:
> 12.04.2013 19:13, Gabriel M. Beddingfield пишет:
>> On 04/12/2013 07:19 AM, Stas Sergeev wrote:
>>> On Fri, 12 Apr 2013 11:59:44 +0100
>>> Mark Brown <broonie at opensource.wolfsonmicro.com> wrote:
>>>>> This patch adds a playback and capture streams to the dummy codec DAI
>>>>> configuration. Most permissive set of sampling rates and formats is
>>>>> used.
>>>> The changelog ought to explain why this is required...
>>> I can only tell that without this patch I am not getting any
>>> sound at all... which is probably a rather poor statement for
>>> the changelog. Could you please correct the changelog with the
>>> better knowledge of the details?
>>
>> He means that the commit message. Your commit message says what the
>> patch does. It does not say why the patch is needed.
> Yes.
> But what should I add to the commit message, if the
> only thing I know about this patch, is that I am not getting
> any sound without it? :) The reason should be obvious for
> whoever is familiar with that subsystem, but its not me.
Well, if not explicitly initialized a field is set to 0. Which is kind of the
most restrictive option for many of the fields. E.g. channels_max, rates,
formats, etc. When the ASoC core creates a new PCM device it will take the
intersection of the CPU DAI and CODEC DAI fields to initialize the fields the
PCM. So if for example channels_max is 0 for the CODEC DAI, channels_max will
also be 0 for the PCM, no matter what channels_max is set to for the CPU DAI.
Same goes for formats and rates. So a dummy CODEC should have set its fields in
a way that it is most permissive, so that the intersection of the CODEC DAI
fields with the CPU DAI fields will be equal to the CPU DAI fields.
- Lars
More information about the Alsa-devel
mailing list