Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1c6c877 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Don't override global PCM hw info flag



The commit bfcba288 ("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: bfcba288 ("ALSA - hda: Add support for link audio time reporting")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a6706020
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -598,11 +598,9 @@ static int azx_pcm_open(struct snd_pcm_substream *substream)
	}
	}
	runtime->private_data = azx_dev;
	runtime->private_data = azx_dev;


	if (chip->gts_present)
		azx_pcm_hw.info = azx_pcm_hw.info |
			SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;

	runtime->hw = azx_pcm_hw;
	runtime->hw = azx_pcm_hw;
	if (chip->gts_present)
		runtime->hw.info |= SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME;
	runtime->hw.channels_min = hinfo->channels_min;
	runtime->hw.channels_min = hinfo->channels_min;
	runtime->hw.channels_max = hinfo->channels_max;
	runtime->hw.channels_max = hinfo->channels_max;
	runtime->hw.formats = hinfo->formats;
	runtime->hw.formats = hinfo->formats;