[alsa-devel] [PATCH 43/54 v2] ASoC: switch over to use snd_soc_register_component() on sh4 ssi

Stephen Warren swarren at wwwdotorg.org
Thu Mar 21 17:58:50 CET 2013

On 03/21/2013 04:36 AM, Kuninori Morimoto wrote:

> diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c

>  static int sh4_soc_dai_probe(struct platform_device *pdev)
>  {
> -	return snd_soc_register_dais(&pdev->dev, sh4_ssi_dai,
> -			ARRAY_SIZE(sh4_ssi_dai));
> +	return snd_soc_register_component(&pdev->dev, &sh4_ssi_component,
> +					  sh4_ssi_dai, ARRAY_SIZE(sh4_ssi_dai));
>  }

ARRAY_SIZE(sh4_ssi_dai) might be 1 or 2 here, based on #ifdef
CONFIG_CPU_SUBTYPE_SH7760. If it's 1, then this change switches the code
from calling snd_soc_register_dais() to snd_soc_register_dai(). This
might be a problem. In practice, perhaps it's won't since the .name
fields in the array entries already are "ssi-dai.0" and "ssi-dai.1", so
perhaps the device ID is already expected not to be appended (because
it's -1 as the device is a singleton)? But, this needs to be checked by
someone familiar with the platform...

More information about the Alsa-devel mailing list