1 From c778d5d0208598e0595e59b2795b92580483971d Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Tue, 4 Sep 2018 17:58:35 +0200
4 Subject: [PATCH 445/703] staging: bcm2835-audio: Remove redundant function
7 commit 124950ebe9fa8547c59e8d4acc8d6c59e6278ed6 upstream.
9 bcm2835_audio_setup(), bcm2835_audio_flush_buffers() and
10 bcm2835_audio_flush_playback_buffers() functions do implement
13 Also, bcm2835_audio_set_ctls() is already called inside
14 bcm2835_audio_set_params(), so the later call is superfluous.
16 This patch removes these superfluous implementations.
18 Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
20 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22 .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 -----
23 .../bcm2835-audio/bcm2835-vchiq.c | 21 -------------------
24 .../vc04_services/bcm2835-audio/bcm2835.h | 3 ---
25 3 files changed, 29 deletions(-)
27 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
28 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
29 @@ -277,11 +277,6 @@ static int snd_bcm2835_pcm_prepare(struc
31 audio_error(" error setting hw params\n");
33 - bcm2835_audio_setup(alsa_stream);
35 - /* in preparation of the stream, set the controls (volume level) of the stream */
36 - bcm2835_audio_set_ctls(alsa_stream);
38 memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect));
40 alsa_stream->pcm_indirect.hw_buffer_size =
41 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
42 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c
43 @@ -580,12 +580,6 @@ unlock:
47 -int bcm2835_audio_setup(struct bcm2835_alsa_stream *alsa_stream)
53 static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream)
55 struct vc_audio_msg m;
56 @@ -774,21 +768,6 @@ unlock:
61 - * Returns all buffers from arm->vc
63 -void bcm2835_audio_flush_buffers(struct bcm2835_alsa_stream *alsa_stream)
68 - * Forces VC to flush(drop) its filled playback buffers and
69 - * return them the us. (VC->ARM)
71 -void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_stream)
75 unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream)
77 unsigned int count = atomic_read(&alsa_stream->retrieved);
78 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
79 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
80 @@ -158,7 +158,6 @@ int bcm2835_audio_close(struct bcm2835_a
81 int bcm2835_audio_set_params(struct bcm2835_alsa_stream *alsa_stream,
82 unsigned int channels, unsigned int samplerate,
84 -int bcm2835_audio_setup(struct bcm2835_alsa_stream *alsa_stream);
85 int bcm2835_audio_start(struct bcm2835_alsa_stream *alsa_stream);
86 int bcm2835_audio_stop(struct bcm2835_alsa_stream *alsa_stream);
87 int bcm2835_audio_set_ctls(struct bcm2835_alsa_stream *alsa_stream);
88 @@ -167,7 +166,5 @@ int bcm2835_audio_write(struct bcm2835_a
90 void bcm2835_playback_fifo(struct bcm2835_alsa_stream *alsa_stream);
91 unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream);
92 -void bcm2835_audio_flush_buffers(struct bcm2835_alsa_stream *alsa_stream);
93 -void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_stream);
95 #endif /* __SOUND_ARM_BCM2835_H */