29567f59e33e34111149094e33e4ed5313d959ba
[openwrt/staging/blogic.git] /
1 From 27417ac1fa4894dc46d71cc34af17fe6a5186f2f Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Tue, 4 Sep 2018 17:58:55 +0200
4 Subject: [PATCH 459/806] staging: bcm2835-audio: Set
5 SNDRV_PCM_INFO_SYNC_APPLPTR
6
7 commit b59d6a5f73501f74848d6700101e7736afe3d54a upstream.
8
9 The recent ALSA PCM core supports the SNDRV_PCM_INFO_SYNC_APPLPTR flag
10 indicating that the driver needs the ack call at each appl_ptr
11 update. This is requirement for the indirect PCM implementations like
12 bcm2835-audio driver, too.
13
14 Signed-off-by: Takashi Iwai <tiwai@suse.de>
15 Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 ---
18 drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
22 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
23 @@ -12,7 +12,7 @@
24 static const struct snd_pcm_hardware snd_bcm2835_playback_hw = {
25 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
26 SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
27 - SNDRV_PCM_INFO_DRAIN_TRIGGER),
28 + SNDRV_PCM_INFO_DRAIN_TRIGGER | SNDRV_PCM_INFO_SYNC_APPLPTR),
29 .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
30 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
31 .rate_min = 8000,
32 @@ -29,7 +29,7 @@ static const struct snd_pcm_hardware snd
33 static const struct snd_pcm_hardware snd_bcm2835_playback_spdif_hw = {
34 .info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
35 SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
36 - SNDRV_PCM_INFO_DRAIN_TRIGGER),
37 + SNDRV_PCM_INFO_DRAIN_TRIGGER | SNDRV_PCM_INFO_SYNC_APPLPTR),
38 .formats = SNDRV_PCM_FMTBIT_S16_LE,
39 .rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_44100 |
40 SNDRV_PCM_RATE_48000,