brcm2708: rename target to bcm27xx
[openwrt/staging/wigyori.git] / target / linux / bcm27xx / patches-4.19 / 950-0388-staging-bcm2835-audio-Add-10ms-period-constraint.patch
1 From daa78c198ece1ec901ee565c869ee1a60a95061d Mon Sep 17 00:00:00 2001
2 From: Takashi Iwai <tiwai@suse.de>
3 Date: Tue, 4 Sep 2018 17:58:46 +0200
4 Subject: [PATCH] staging: bcm2835-audio: Add 10ms period constraint
5
6 commit 93c66acaf68b5247c3121a46a71ff6a70fc1d492 upstream.
7
8 It seems that the resolution of vc04 callback is in 10 msec; i.e. the
9 minimal period size is also 10 msec.
10
11 This patch adds the corresponding hw constraint.
12
13 Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 ---
17 drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 5 +++++
18 1 file changed, 5 insertions(+)
19
20 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
21 +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c
22 @@ -145,6 +145,11 @@ static int snd_bcm2835_playback_open_gen
23 SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
24 16);
25
26 + /* position update is in 10ms order */
27 + snd_pcm_hw_constraint_minmax(runtime,
28 + SNDRV_PCM_HW_PARAM_PERIOD_TIME,
29 + 10 * 1000, UINT_MAX);
30 +
31 chip->alsa_stream[idx] = alsa_stream;
32
33 chip->opened |= (1 << idx);