Skip to content

Commit c1c6c87

Browse files
committed
ALSA: hda - Don't override global PCM hw info flag
The commit bfcba28 ("ALSA - hda: Add support for link audio time reporting") introduced the conditional PCM hw info setup, but it overwrites the global azx_pcm_hw object. This will cause a problem if any other HD-audio controller, as it'll inherit the same bit flag although another controller doesn't support that feature. Fix the bug by setting the PCM hw info flag locally. Fixes: bfcba28 ("ALSA - hda: Add support for link audio time reporting") Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent a670602 commit c1c6c87

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sound/pci/hda/hda_controller.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,9 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
598598
}
599599
runtime->private_data = azx_dev;
600600

601-
if (chip->gts_present)
602-
azx_pcm_hw.info = azx_pcm_hw.info |
603-
SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;
604-
605601
runtime->hw = azx_pcm_hw;
602+
if (chip->gts_present)
603+
runtime->hw.info |= SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;
606604
runtime->hw.channels_min = hinfo->channels_min;
607605
runtime->hw.channels_max = hinfo->channels_max;
608606
runtime->hw.formats = hinfo->formats;

0 commit comments

Comments
 (0)