aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-4.19/950-0703-staging-bcm2835-audio-Fix-draining-behavior-regressi.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 21:58:55 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commit7d7aa2fd924c27829ec25f825481554dd81bce97 (patch)
tree658b87b89331670266163e522ea5fb52535633cb /target/linux/bcm27xx/patches-4.19/950-0703-staging-bcm2835-audio-Fix-draining-behavior-regressi.patch
parente7bfda2c243e66a75ff966ba04c28b1590b5d24c (diff)
downloadupstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.gz
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.bz2
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.zip
brcm2708: rename target to bcm27xx
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Despite, since subtargets range from bcm2708 to bcm2711, it seems appropriate to use bcm27xx instead of bcm2708 (again, as already done for BOARDNAME). This also renames the packages brcm2708-userland and brcm2708-gpu-fw. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-4.19/950-0703-staging-bcm2835-audio-Fix-draining-behavior-regressi.patch')
-rw-r--r--target/linux/bcm27xx/patches-4.19/950-0703-staging-bcm2835-audio-Fix-draining-behavior-regressi.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-4.19/950-0703-staging-bcm2835-audio-Fix-draining-behavior-regressi.patch b/target/linux/bcm27xx/patches-4.19/950-0703-staging-bcm2835-audio-Fix-draining-behavior-regressi.patch
new file mode 100644
index 0000000000..76279ec813
--- /dev/null
+++ b/target/linux/bcm27xx/patches-4.19/950-0703-staging-bcm2835-audio-Fix-draining-behavior-regressi.patch
@@ -0,0 +1,56 @@
+From 9dd926d29051324d8621ca2a18bbdd568523ac93 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Sat, 14 Sep 2019 17:24:05 +0200
+Subject: [PATCH] staging: bcm2835-audio: Fix draining behavior
+ regression
+
+The PCM draining behavior got broken since the recent refactoring, and
+this turned out to be the incorrect expectation of the firmware
+behavior regarding "draining". While I expected the "drain" flag at
+the stop operation would do processing the queued samples, it seems
+rather dropping the samples.
+
+As a quick fix, just drop the SNDRV_PCM_INFO_DRAIN_TRIGGER flag, so
+that the driver uses the normal PCM draining procedure. Also, put
+some caution comment to the function for future readers not to fall
+into the same pitfall.
+
+Fixes: d7ca3a71545b ("staging: bcm2835-audio: Operate non-atomic PCM ops")
+BugLink: https://github.com/raspberrypi/linux/issues/2983
+Cc: stable@vger.kernel.org
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+---
+ drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 4 ++--
+ drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c | 1 +
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+@@ -12,7 +12,7 @@
+ static const struct snd_pcm_hardware snd_bcm2835_playback_hw = {
+ .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
+ SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
+- SNDRV_PCM_INFO_DRAIN_TRIGGER | SNDRV_PCM_INFO_SYNC_APPLPTR),
++ SNDRV_PCM_INFO_SYNC_APPLPTR),
+ .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
+ .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_192000,
+ .rate_min = 8000,
+@@ -29,7 +29,7 @@ static const struct snd_pcm_hardware snd
+ static const struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = {
+ .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
+ SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
+- SNDRV_PCM_INFO_DRAIN_TRIGGER | SNDRV_PCM_INFO_SYNC_APPLPTR),
++ SNDRV_PCM_INFO_SYNC_APPLPTR),
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
+ SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 |
+--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
+@@ -297,6 +297,7 @@ int bcm2835_audio_stop(struct bcm2835_al
+ VC_AUDIO_MSG_TYPE_STOP, false);
+ }
+
++/* FIXME: this doesn't seem working as expected for "draining" */
+ int bcm2835_audio_drain(struct bcm2835_alsa_stream *alsa_stream)
+ {
+ struct vc_audio_msg m = {