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-4.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Just a few small fixes:

- a fix for the recursive work cancellation in a specific HD-audio
operation mode

- a fix for potentially uninitialized memory access via rawmidi

- the register bit access fixes for ASoC HD-audio"

* tag 'sound-4.19-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda: Fix several mismatch for register mask and value
ALSA: rawmidi: Initialize allocated buffers
ALSA: hda - Fix cancel_work_sync() stall from jackpoll work

+11 -18
+2 -2
sound/core/rawmidi.c
··· 129 129 runtime->avail = 0; 130 130 else 131 131 runtime->avail = runtime->buffer_size; 132 - runtime->buffer = kvmalloc(runtime->buffer_size, GFP_KERNEL); 132 + runtime->buffer = kvzalloc(runtime->buffer_size, GFP_KERNEL); 133 133 if (!runtime->buffer) { 134 134 kfree(runtime); 135 135 return -ENOMEM; ··· 655 655 if (params->avail_min < 1 || params->avail_min > params->buffer_size) 656 656 return -EINVAL; 657 657 if (params->buffer_size != runtime->buffer_size) { 658 - newbuf = kvmalloc(params->buffer_size, GFP_KERNEL); 658 + newbuf = kvzalloc(params->buffer_size, GFP_KERNEL); 659 659 if (!newbuf) 660 660 return -ENOMEM; 661 661 spin_lock_irq(&runtime->lock);
+7 -15
sound/hda/ext/hdac_ext_stream.c
··· 146 146 */ 147 147 void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *stream) 148 148 { 149 - snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, 0, AZX_PPLCCTL_RUN); 149 + snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, 150 + AZX_PPLCCTL_RUN, AZX_PPLCCTL_RUN); 150 151 } 151 152 EXPORT_SYMBOL_GPL(snd_hdac_ext_link_stream_start); 152 153 ··· 172 171 173 172 snd_hdac_ext_link_stream_clear(stream); 174 173 175 - snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, 0, AZX_PPLCCTL_STRST); 174 + snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, 175 + AZX_PPLCCTL_STRST, AZX_PPLCCTL_STRST); 176 176 udelay(3); 177 177 timeout = 50; 178 178 do { ··· 244 242 void snd_hdac_ext_link_clear_stream_id(struct hdac_ext_link *link, 245 243 int stream) 246 244 { 247 - snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, 0, (1 << stream)); 245 + snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 0); 248 246 } 249 247 EXPORT_SYMBOL_GPL(snd_hdac_ext_link_clear_stream_id); 250 248 ··· 417 415 bool enable, int index) 418 416 { 419 417 u32 mask = 0; 420 - u32 register_mask = 0; 421 418 422 419 if (!bus->spbcap) { 423 420 dev_err(bus->dev, "Address of SPB capability is NULL\n"); ··· 425 424 426 425 mask |= (1 << index); 427 426 428 - register_mask = readl(bus->spbcap + AZX_REG_SPB_SPBFCCTL); 429 - 430 - mask |= register_mask; 431 - 432 427 if (enable) 433 - snd_hdac_updatel(bus->spbcap, AZX_REG_SPB_SPBFCCTL, 0, mask); 428 + snd_hdac_updatel(bus->spbcap, AZX_REG_SPB_SPBFCCTL, mask, mask); 434 429 else 435 430 snd_hdac_updatel(bus->spbcap, AZX_REG_SPB_SPBFCCTL, mask, 0); 436 431 } ··· 500 503 bool enable, int index) 501 504 { 502 505 u32 mask = 0; 503 - u32 register_mask = 0; 504 506 505 507 if (!bus->drsmcap) { 506 508 dev_err(bus->dev, "Address of DRSM capability is NULL\n"); ··· 508 512 509 513 mask |= (1 << index); 510 514 511 - register_mask = readl(bus->drsmcap + AZX_REG_SPB_SPBFCCTL); 512 - 513 - mask |= register_mask; 514 - 515 515 if (enable) 516 - snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, 0, mask); 516 + snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, mask, mask); 517 517 else 518 518 snd_hdac_updatel(bus->drsmcap, AZX_REG_DRSM_CTL, mask, 0); 519 519 }
+2 -1
sound/pci/hda/hda_codec.c
··· 3935 3935 3936 3936 list_for_each_codec(codec, bus) { 3937 3937 /* FIXME: maybe a better way needed for forced reset */ 3938 - cancel_delayed_work_sync(&codec->jackpoll_work); 3938 + if (current_work() != &codec->jackpoll_work.work) 3939 + cancel_delayed_work_sync(&codec->jackpoll_work); 3939 3940 #ifdef CONFIG_PM 3940 3941 if (hda_codec_is_power_on(codec)) { 3941 3942 hda_call_codec_suspend(codec);