Skip to content

Commit 6fd739c

Browse files
committed
ALSA: hda: Fix regression by strip mask fix
The commit e38e486 ("ALSA: hda: Modify stream stripe mask only when needed") tried to address the regression by the unconditional application of the stripe mask, but this caused yet another regression for the previously working devices. Namely, the patch clears the azx_dev->stripe flag at snd_hdac_stream_clear(), but this may be called multiple times before restarting the stream, so this ended up with clearance of the flag for the whole time. This patch fixes the regression by moving the azx_dev->stripe flag clearance at the counter-part, the close callback of HDMI codec driver instead. Fixes: e38e486 ("ALSA: hda: Modify stream stripe mask only when needed") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205855 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204477 Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 42fb6b1 commit 6fd739c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sound/hda/hdac_stream.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,8 @@ void snd_hdac_stream_clear(struct hdac_stream *azx_dev)
120120
snd_hdac_stream_updateb(azx_dev, SD_CTL,
121121
SD_CTL_DMA_START | SD_INT_MASK, 0);
122122
snd_hdac_stream_writeb(azx_dev, SD_STS, SD_INT_MASK); /* to be sure */
123-
if (azx_dev->stripe) {
123+
if (azx_dev->stripe)
124124
snd_hdac_stream_updateb(azx_dev, SD_CTL_3B, SD_CTL_STRIPE_MASK, 0);
125-
azx_dev->stripe = 0;
126-
}
127125
azx_dev->running = false;
128126
}
129127
EXPORT_SYMBOL_GPL(snd_hdac_stream_clear);

sound/pci/hda/patch_hdmi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,6 +2021,8 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
20212021
per_cvt->assigned = 0;
20222022
hinfo->nid = 0;
20232023

2024+
azx_stream(get_azx_dev(substream))->stripe = 0;
2025+
20242026
mutex_lock(&spec->pcm_lock);
20252027
snd_hda_spdif_ctls_unassign(codec, pcm_idx);
20262028
clear_bit(pcm_idx, &spec->pcm_in_use);

0 commit comments

Comments
 (0)