[alsa-devel] [PATCH 1/2] ASoC: Pay attention to driver supplied DAI IDs

Timur Tabi timur at freescale.com
Tue Oct 12 20:49:52 CEST 2010


On Tue, Oct 12, 2010 at 9:57 AM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> The driver can specify a DAI ID number so use that.
>
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-core.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 4f6ea8c..c20cf7f 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -3015,7 +3015,10 @@ int snd_soc_register_dais(struct device *dev,
>                }
>
>                dai->dev = dev;
> -               dai->id = i;
> +               if (dai->driver->id)
> +                       dai->id = dai->driver->id;
> +               else
> +                       dai->id = i;

I haven't looked at the code, but doesn't this assume that a DAI ID of
0 is invalid?

I have a suspicion I need to retest my driver to make sure it still works.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Alsa-devel mailing list