[alsa-devel] Sound issue in IMx6

Manish Badarkhe badarkhe.manish at gmail.com
Tue Jun 17 12:25:28 CEST 2014


Hi All,

In our android project, We are using IMx6 chip which is having SSI module
to send data to codec.

We are facing issues with PCM data which is getting passed to codec
getting changed sometimes (even though android is filling up same data).

Our use case is as follows:

Press key on keypad (PCM open  function gets called) and after 3secs
of inactivity PCM close function get called.
After doing this above activity,quite number of times we have seen
sometimes sound gets changed abruptly.

I have seen your commit in mainline which is fix to almost similar
behavior as I explained above in usecase.
Commit: ASoC: fsl: imx-ssi: omit ssi counter to avoid harm in
unbalanced situation
But still after applying above change issue gets seen sometimes.

After this I put some delay in "imx_ssi_trigger" function as below:
@@ -360,9 +360,9 @@ static int imx_ssi_trigger(struct
snd_pcm_substream *substream, int cmd,
                        scr |= SSI_SCR_RE;
                sier |= sier_bits;

-               if (++ssi->enabled == 1)
-                       scr |= SSI_SCR_SSIEN;
-
+               scr |= SSI_SCR_SSIEN;
+               mdelay(1);
                break;

        case SNDRV_PCM_TRIGGER_STOP:
@@ -374,9 +374,10 @@ static int imx_ssi_trigger(struct
snd_pcm_substream *substream, int cmd,
                        scr &= ~SSI_SCR_RE;
                sier &= ~sier_bits;

-               if (--ssi->enabled == 0)
+               if (!(scr & (SSI_SCR_TE | SSI_SCR_RE)))
                        scr &= ~SSI_SCR_SSIEN;
-
+                       mdelay(1);
                break;

and with this change I never seen issue. But looking like delay to put
is just a workaround. Even in datasheet it is not mentioned
to put any delay after SSI enabled/disabled. Please let me know if
anybody have any proper solution/hints for this issue.
Also, let me know if any more information requires.

We are using 3.0.35 kernel.

Regards
Manish Badarkhe


More information about the Alsa-devel mailing list