aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-4.19/950-0382-staging-bcm2835-audio-Use-PCM-runtime-values-instead.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-0382-staging-bcm2835-audio-Use-PCM-runtime-values-instead.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-0382-staging-bcm2835-audio-Use-PCM-runtime-values-instead.patch')
-rw-r--r--target/linux/bcm27xx/patches-4.19/950-0382-staging-bcm2835-audio-Use-PCM-runtime-values-instead.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-4.19/950-0382-staging-bcm2835-audio-Use-PCM-runtime-values-instead.patch b/target/linux/bcm27xx/patches-4.19/950-0382-staging-bcm2835-audio-Use-PCM-runtime-values-instead.patch
new file mode 100644
index 0000000000..ffe06fef60
--- /dev/null
+++ b/target/linux/bcm27xx/patches-4.19/950-0382-staging-bcm2835-audio-Use-PCM-runtime-values-instead.patch
@@ -0,0 +1,74 @@
+From 4efb059f297f8234bc188b6bc1e4af673ce9f9e3 Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Tue, 4 Sep 2018 17:58:40 +0200
+Subject: [PATCH] staging: bcm2835-audio: Use PCM runtime values
+ instead
+
+commit b8f7fdd50890b848e085c0519469aed4ff4d9b54 upstream.
+
+Some fields in alsa_stream are the values we keep already in PCM
+runtime object, hence they are redundant. Use the standard PCM
+runtime values instead of the private copies.
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 23 ++++---------------
+ .../vc04_services/bcm2835-audio/bcm2835.h | 4 ----
+ 2 files changed, 4 insertions(+), 23 deletions(-)
+
+--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
+@@ -206,22 +206,7 @@ static int snd_bcm2835_playback_close(st
+ static int snd_bcm2835_pcm_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params)
+ {
+- struct snd_pcm_runtime *runtime = substream->runtime;
+- struct bcm2835_alsa_stream *alsa_stream = runtime->private_data;
+- int err;
+-
+- err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
+- if (err < 0) {
+- audio_error
+- (" pcm_lib_malloc failed to allocated pages for buffers\n");
+- return err;
+- }
+-
+- alsa_stream->channels = params_channels(params);
+- alsa_stream->params_rate = params_rate(params);
+- alsa_stream->pcm_format_width = snd_pcm_format_width(params_format(params));
+-
+- return err;
++ return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(params));
+ }
+
+ /* hw_free callback */
+@@ -248,11 +233,11 @@ static int snd_bcm2835_pcm_prepare(struc
+ if (chip->spdif_status & IEC958_AES0_NONAUDIO)
+ channels = 0;
+ else
+- channels = alsa_stream->channels;
++ channels = runtime->channels;
+
+ err = bcm2835_audio_set_params(alsa_stream, channels,
+- alsa_stream->params_rate,
+- alsa_stream->pcm_format_width);
++ runtime->rate,
++ snd_pcm_format_width(runtime->format));
+ if (err < 0)
+ audio_error(" error setting hw params\n");
+
+--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
++++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
+@@ -121,10 +121,6 @@ struct bcm2835_alsa_stream {
+
+ int draining;
+
+- int channels;
+- int params_rate;
+- int pcm_format_width;
+-
+ unsigned int pos;
+ unsigned int buffer_size;
+ unsigned int period_size;