[alsa-devel] [PATCH] ALSA: hda: Modify stream stripe mask only when needed

Martin Regner martin at larkos.de
Sun Dec 15 20:13:43 CET 2019


Sorry, the patch below did not compile. The working version is just this:

--- a/sound/hda/hdac_stream.c   2019-12-15 19:15:37.512583523 +0100
+++ b/sound/hda/hdac_stream.c   2019-12-15 19:15:48.976584590 +0100
@@ -122,7 +122,6 @@
     snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */
     if (azx_dev->stripe) {
         snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0);
-       azx_dev->stripe = 0;
     }
     azx_dev->running = false;
  }

Sorry for bothering.



On 15.12.19 19:57, Martin Regner wrote:
> Hi again,
>
> i did a little bit of research and my current solution is this patch:
>
>
> diff -ru a/include/sound/hdaudio.h b/include/sound/hdaudio.h
> --- a/include/sound/hdaudio.h   2019-12-15 19:49:15.775689873 +0100
> +++ b/include/sound/hdaudio.h   2019-12-15 19:48:23.474688545 +0100
> @@ -493,7 +493,7 @@
>         bool prepared:1;
>         bool no_period_wakeup:1;
>         bool locked:1;
> -       bool stripe:1;                  /* apply stripe control */
> +       bool stripe:0;                  /* apply stripe control */
>
>         /* timestamp */
>         unsigned long start_wallclk;    /* start + minimum wallclk */
> diff -ru a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c
> --- a/sound/hda/hdac_stream.c   2019-12-15 19:15:37.512583523 +0100
> +++ b/sound/hda/hdac_stream.c   2019-12-15 19:15:48.976584590 +0100
> @@ -122,7 +122,6 @@
>         snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be 
> sure */
>         if (azx_dev->stripe) {
>                 snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, 
> SD_CTL_STRIPE_MASK, 0);
> -               azx_dev->stripe = 0;
>         }
>         azx_dev->running = false;
>  }
>
> I don't really understand the approach in the original commit. As far 
> as i understand this, the stripe property is initially set to 1.
> In the patch_hdmi.c it is set to 1 if the AC_WCAP_STRIPE flag is set. 
> Finally it is set to 0 in the function snd_hdac_stream_clear.
>
> With this patch the stripe property is initially 0, set to 1 if the 
> AC_WCAP_STRIPE flag is set and never touched again.
>
> Unfortunatly i can't test this on another machine.
>
> Kind regards
>
> Martin
>



More information about the Alsa-devel mailing list