[alsa-devel] [PATCH] ASoC: rsnd: fixup index of SSI mod when SRC is used

Kuninori Morimoto kuninori.morimoto.gx at gmail.com
Thu Jul 3 15:57:34 CEST 2014


Hi

If you add this code,

        if (!ssi) {
               break;
        } else ...

then, I guess we can remove this code ?

	if (mod[i] == ssi)
	break;



2014-07-02 20:18 GMT+09:00 Jürg Billeter <j at bitron.ch>:

> The default index 1 was used as the loop was terminated before the
> following code could be reached:
>
>         if (mod[i] == this)
>                 index = i;
>
> Signed-off-by: Jürg Billeter <j at bitron.ch>
> ---
>  sound/soc/sh/rcar/core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
> index 4e86265..d737fea 100644
> --- a/sound/soc/sh/rcar/core.c
> +++ b/sound/soc/sh/rcar/core.c
> @@ -295,9 +295,11 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
>         mod[0] = NULL; /* for "mem" */
>         index = 1;
>         for (i = 1; i < MOD_MAX; i++) {
> -               if (!src) {
> -                       mod[i] = ssi;
> +               if (!ssi) {
>                         break;
> +               } else if (!src) {
> +                       mod[i] = ssi;
> +                       ssi = NULL;
>                 } else if (!dvc) {
>                         mod[i] = src;
>                         src = NULL;
> --
> 2.0.1
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>


More information about the Alsa-devel mailing list