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

Martin Regner martin at larkos.de
Sun Dec 15 19:57:56 CET 2019


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