From: Clemens Ladisch Date: Tue, 13 May 2008 07:26:01 +0000 (+0200) Subject: [ALSA] virtuoso: restrict period time to less than 10 s X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca1f30ad6c3f002d1d9b9355a53b8bbf2fe70588;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [ALSA] virtuoso: restrict period time to less than 10 s Add a constraint for the period time so that there are less than ten seconds between interrupts so that ALSA does not assume that the device is dead. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c index 09a16e459de9..c4ad65a3406f 100644 --- a/sound/pci/oxygen/oxygen_pcm.c +++ b/sound/pci/oxygen/oxygen_pcm.c @@ -165,6 +165,12 @@ static int oxygen_open(struct snd_pcm_substream *substream, if (err < 0) return err; } + if (channel == PCM_MULTICH) { + err = snd_pcm_hw_constraint_minmax + (runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME, 0, 8192000); + if (err < 0) + return err; + } snd_pcm_set_sync(substream); chip->streams[channel] = substream;