Commit 54a96dadaa2bbe81006c66447517b57534d80e7f
Committed by
Takashi Iwai
1 parent
6a9a6f233b
Exists in
master
and in
7 other branches
ALSA - au88x0 - Add buffer bytes constraints
This allow application such as gstreamer and wine which use snd_pcm_hw_params_set_buffer_time_near() won't fail any more since sound chips require special containt power 2 period bytes Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Showing 1 changed file with 5 additions and 2 deletions Side-by-side Diff
sound/pci/au88x0/au88x0_pcm.c
... | ... | @@ -44,10 +44,10 @@ |
44 | 44 | .channels_min = 1, |
45 | 45 | .channels_max = 2, |
46 | 46 | .buffer_bytes_max = 0x10000, |
47 | - .period_bytes_min = 0x1, | |
47 | + .period_bytes_min = 0x20, | |
48 | 48 | .period_bytes_max = 0x1000, |
49 | 49 | .periods_min = 2, |
50 | - .periods_max = 32, | |
50 | + .periods_max = 1024, | |
51 | 51 | }; |
52 | 52 | |
53 | 53 | #ifndef CHIP_AU8820 |
... | ... | @@ -139,6 +139,9 @@ |
139 | 139 | snd_pcm_hw_constraint_pow2(runtime, 0, |
140 | 140 | SNDRV_PCM_HW_PARAM_PERIOD_BYTES)) < 0) |
141 | 141 | return err; |
142 | + | |
143 | + snd_pcm_hw_constraint_step(runtime, 0, | |
144 | + SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 64); | |
142 | 145 | |
143 | 146 | if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) { |
144 | 147 | #ifndef CHIP_AU8820 |