3ab5d612a0b196a7b7cbfef4abff99b178afa8c9
[openwrt/staging/jow.git] /
1 From 3a9d204701c7fb595d9dd79ee9f2e2ffcc6a7b84 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 439/782] staging: bcm2835-audio: Remove redundant function
5 calls
6
7 commit 124950ebe9fa8547c59e8d4acc8d6c59e6278ed6 upstream.
8
9 bcm2835_audio_setup(), bcm2835_audio_flush_buffers() and
10 bcm2835_audio_flush_playback_buffers() functions do implement
11 nothing.
12
13 Also, bcm2835_audio_set_ctls() is already called inside
14 bcm2835_audio_set_params(), so the later call is superfluous.
15
16 This patch removes these superfluous implementations.
17
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>
21 ---
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(-)
26
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
30 if (err < 0)
31 audio_error(" error setting hw params\n");
32
33 - bcm2835_audio_setup(alsa_stream);
34 -
35 - /* in preparation of the stream, set the controls (volume level) of the stream */
36 - bcm2835_audio_set_ctls(alsa_stream);
37 -
38 memset(&alsa_stream->pcm_indirect, 0, sizeof(alsa_stream->pcm_indirect));
39
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:
44 return ret;
45 }
46
47 -int bcm2835_audio_setup(struct bcm2835_alsa_stream *alsa_stream)
48 -{
49 -
50 - return 0;
51 -}
52 -
53 static int bcm2835_audio_start_worker(struct bcm2835_alsa_stream *alsa_stream)
54 {
55 struct vc_audio_msg m;
56 @@ -774,21 +768,6 @@ unlock:
57 return ret;
58 }
59
60 -/**
61 - * Returns all buffers from arm->vc
62 - */
63 -void bcm2835_audio_flush_buffers(struct bcm2835_alsa_stream *alsa_stream)
64 -{
65 -}
66 -
67 -/**
68 - * Forces VC to flush(drop) its filled playback buffers and
69 - * return them the us. (VC->ARM)
70 - */
71 -void bcm2835_audio_flush_playback_buffers(struct bcm2835_alsa_stream *alsa_stream)
72 -{
73 -}
74 -
75 unsigned int bcm2835_audio_retrieve_buffers(struct bcm2835_alsa_stream *alsa_stream)
76 {
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,
83 unsigned int bps);
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
89 void *src);
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);
94
95 #endif /* __SOUND_ARM_BCM2835_H */