Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sound-fix-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"A few device-specific fixes: a fix for SPDIF on old Creative PCI
board, and two additional fixes for the recent changes in FireWire
audio stack"

* tag 'sound-fix-4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: firewire-lib: fix insufficient PCM rule for period/buffer size
ALSA: ca0106: Disable IZD on SB0570 DAC to fix audio pops
ALSA: dice: fix to wait for releases of all ALSA character devices

+12 -51
+9 -48
sound/firewire/amdtp-stream.c
··· 146 146 struct snd_interval *s = hw_param_interval(params, rule->var); 147 147 const struct snd_interval *r = 148 148 hw_param_interval_c(params, SNDRV_PCM_HW_PARAM_RATE); 149 - struct snd_interval t = { 150 - .min = s->min, .max = s->max, .integer = 1, 151 - }; 149 + struct snd_interval t = {0}; 150 + unsigned int step = 0; 152 151 int i; 153 152 154 153 for (i = 0; i < CIP_SFC_COUNT; ++i) { 155 - unsigned int rate = amdtp_rate_table[i]; 156 - unsigned int step = amdtp_syt_intervals[i]; 157 - 158 - if (!snd_interval_test(r, rate)) 159 - continue; 160 - 161 - t.min = roundup(t.min, step); 162 - t.max = rounddown(t.max, step); 154 + if (snd_interval_test(r, amdtp_rate_table[i])) 155 + step = max(step, amdtp_syt_intervals[i]); 163 156 } 164 157 165 - if (snd_interval_checkempty(&t)) 166 - return -EINVAL; 158 + t.min = roundup(s->min, step); 159 + t.max = rounddown(s->max, step); 160 + t.integer = 1; 167 161 168 162 return snd_interval_refine(s, &t); 169 - } 170 - 171 - static int apply_constraint_to_rate(struct snd_pcm_hw_params *params, 172 - struct snd_pcm_hw_rule *rule) 173 - { 174 - struct snd_interval *r = 175 - hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE); 176 - const struct snd_interval *s = hw_param_interval_c(params, rule->deps[0]); 177 - struct snd_interval t = { 178 - .min = UINT_MAX, .max = 0, .integer = 1, 179 - }; 180 - int i; 181 - 182 - for (i = 0; i < CIP_SFC_COUNT; ++i) { 183 - unsigned int step = amdtp_syt_intervals[i]; 184 - unsigned int rate = amdtp_rate_table[i]; 185 - 186 - if (s->min % step || s->max % step) 187 - continue; 188 - 189 - t.min = min(t.min, rate); 190 - t.max = max(t.max, rate); 191 - } 192 - 193 - return snd_interval_refine(r, &t); 194 163 } 195 164 196 165 /** ··· 219 250 */ 220 251 err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 221 252 apply_constraint_to_size, NULL, 253 + SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 222 254 SNDRV_PCM_HW_PARAM_RATE, -1); 223 - if (err < 0) 224 - goto end; 225 - err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 226 - apply_constraint_to_rate, NULL, 227 - SNDRV_PCM_HW_PARAM_PERIOD_SIZE, -1); 228 255 if (err < 0) 229 256 goto end; 230 257 err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 231 258 apply_constraint_to_size, NULL, 259 + SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 232 260 SNDRV_PCM_HW_PARAM_RATE, -1); 233 - if (err < 0) 234 - goto end; 235 - err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 236 - apply_constraint_to_rate, NULL, 237 - SNDRV_PCM_HW_PARAM_BUFFER_SIZE, -1); 238 261 if (err < 0) 239 262 goto end; 240 263 end:
+2 -2
sound/firewire/dice/dice.c
··· 240 240 cancel_delayed_work_sync(&dice->dwork); 241 241 242 242 if (dice->registered) { 243 - /* No need to wait for releasing card object in this context. */ 244 - snd_card_free_when_closed(dice->card); 243 + // Block till all of ALSA character devices are released. 244 + snd_card_free(dice->card); 245 245 } 246 246 247 247 mutex_destroy(&dice->mutex);
+1 -1
sound/pci/ca0106/ca0106.h
··· 582 582 #define SPI_PL_BIT_R_R (2<<7) /* right channel = right */ 583 583 #define SPI_PL_BIT_R_C (3<<7) /* right channel = (L+R)/2 */ 584 584 #define SPI_IZD_REG 2 585 - #define SPI_IZD_BIT (1<<4) /* infinite zero detect */ 585 + #define SPI_IZD_BIT (0<<4) /* infinite zero detect */ 586 586 587 587 #define SPI_FMT_REG 3 588 588 #define SPI_FMT_BIT_RJ (0<<0) /* right justified mode */