diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2014-04-08 05:36:42 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-04-08 05:44:21 -0400 |
commit | dcb32ecd9a533f47ab652c5c5680bc50a7a822cd (patch) | |
tree | ba1cd02860eeee210fd09587c33fd4b22607f4a2 /sound | |
parent | 0435b3ffbaa67cded10c25e4a43404a611a7ebb5 (diff) |
ALSA: hda - Do not assign streams in reverse order
Currently stream numbers are assigned in reverse order.
Unfortunately commit 7546abfb8e1f9933b5 ("ALSA: hda - Increment
default stream numbers for AMD HDMI controllers") assumed this was not
the case (specifically, it had the "old cards had single device only"
=> "extra unused stream numbers do not matter" assumption), causing
non-working audio regressions for AMD Radeon HDMI users.
Change the stream numbers to be assigned in forward order.
The benefit is that regular audio playback will still work even if the
assumed stream count is too high, downside is that a too high stream
count may remain hidden.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77002
Reported-by: Christian Güdel <cg@dmesg.ch>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Tested-by: Christian Güdel <cg@dmesg.ch> # 3.14
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_controller.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c index 97993e17f46a..3e005e509131 100644 --- a/sound/pci/hda/hda_controller.c +++ b/sound/pci/hda/hda_controller.c | |||
@@ -187,13 +187,14 @@ azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream) | |||
187 | struct azx_dev *azx_dev = &chip->azx_dev[dev]; | 187 | struct azx_dev *azx_dev = &chip->azx_dev[dev]; |
188 | dsp_lock(azx_dev); | 188 | dsp_lock(azx_dev); |
189 | if (!azx_dev->opened && !dsp_is_locked(azx_dev)) { | 189 | if (!azx_dev->opened && !dsp_is_locked(azx_dev)) { |
190 | res = azx_dev; | 190 | if (azx_dev->assigned_key == key) { |
191 | if (res->assigned_key == key) { | 191 | azx_dev->opened = 1; |
192 | res->opened = 1; | 192 | azx_dev->assigned_key = key; |
193 | res->assigned_key = key; | ||
194 | dsp_unlock(azx_dev); | 193 | dsp_unlock(azx_dev); |
195 | return azx_dev; | 194 | return azx_dev; |
196 | } | 195 | } |
196 | if (!res) | ||
197 | res = azx_dev; | ||
197 | } | 198 | } |
198 | dsp_unlock(azx_dev); | 199 | dsp_unlock(azx_dev); |
199 | } | 200 | } |