Merge tag 'sound-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Just a collection of small fixes around this time:
- One more try for fixing PCM OSS regression
- HD-audio: a new quirk for Lenovo, the improved driver blacklisting,
a lock fix in the minor error path, and a fix for the possible race
at monitor notifiaction
- USB-audio: a quirk ID fix, a fix for POD HD500 workaround"
* tag 'sound-5.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID
ALSA: opti9xx: shut up gcc-10 range warning
ALSA: hda/hdmi: fix without unlocked before return
ALSA: hda/hdmi: fix race in monitor detection during probe
ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter
ALSA: line6: Fix POD HD500 audio playback
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly (for 5.7)
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
ALSA: hda: Match both PCI ID and SSID for driver blacklist
This commit is contained in:
@@ -205,13 +205,14 @@ static snd_pcm_sframes_t calc_dst_frames(struct snd_pcm_substream *plug,
|
||||
plugin = snd_pcm_plug_first(plug);
|
||||
while (plugin && frames > 0) {
|
||||
plugin_next = plugin->next;
|
||||
if (check_size && plugin->buf_frames &&
|
||||
frames > plugin->buf_frames)
|
||||
frames = plugin->buf_frames;
|
||||
if (plugin->dst_frames) {
|
||||
frames = plugin->dst_frames(plugin, frames);
|
||||
if (frames < 0)
|
||||
return frames;
|
||||
}
|
||||
if (check_size && frames > plugin->buf_frames)
|
||||
frames = plugin->buf_frames;
|
||||
plugin = plugin_next;
|
||||
}
|
||||
return frames;
|
||||
@@ -225,14 +226,15 @@ static snd_pcm_sframes_t calc_src_frames(struct snd_pcm_substream *plug,
|
||||
|
||||
plugin = snd_pcm_plug_last(plug);
|
||||
while (plugin && frames > 0) {
|
||||
if (check_size && frames > plugin->buf_frames)
|
||||
frames = plugin->buf_frames;
|
||||
plugin_prev = plugin->prev;
|
||||
if (plugin->src_frames) {
|
||||
frames = plugin->src_frames(plugin, frames);
|
||||
if (frames < 0)
|
||||
return frames;
|
||||
}
|
||||
if (check_size && plugin->buf_frames &&
|
||||
frames > plugin->buf_frames)
|
||||
frames = plugin->buf_frames;
|
||||
plugin = plugin_prev;
|
||||
}
|
||||
return frames;
|
||||
|
||||
Reference in New Issue
Block a user