mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
linux: add patch to fix audio on AMD APUs, thanks to 'Anssi' and 'anykey_'
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
06c4810f80
commit
d218b9d9b5
@ -0,0 +1,54 @@
|
||||
From b5e9423f4dfbef8da81217310c99cdcb79aaf25d Mon Sep 17 00:00:00 2001
|
||||
From: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Date: Mon, 7 Apr 2014 22:16:52 +0300
|
||||
Subject: [PATCH] ALSA: hda - Do not assign streams in reverse order
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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.
|
||||
|
||||
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>
|
||||
Cc: Alex Deucher <alexander.deucher@amd.com>
|
||||
Cc: <stable@vger.kernel.org> # 3.14
|
||||
---
|
||||
sound/pci/hda/hda_intel.c | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
|
||||
index e354ab1ec20f..7a7b7b10dddf 100644
|
||||
--- a/sound/pci/hda/hda_intel.c
|
||||
+++ b/sound/pci/hda/hda_intel.c
|
||||
@@ -1856,13 +1856,14 @@ azx_assign_device(struct azx *chip, struct snd_pcm_substream *substream)
|
||||
struct azx_dev *azx_dev = &chip->azx_dev[dev];
|
||||
dsp_lock(azx_dev);
|
||||
if (!azx_dev->opened && !dsp_is_locked(azx_dev)) {
|
||||
- res = azx_dev;
|
||||
- if (res->assigned_key == key) {
|
||||
- res->opened = 1;
|
||||
- res->assigned_key = key;
|
||||
+ if (azx_dev->assigned_key == key) {
|
||||
+ azx_dev->opened = 1;
|
||||
+ azx_dev->assigned_key = key;
|
||||
dsp_unlock(azx_dev);
|
||||
return azx_dev;
|
||||
}
|
||||
+ if (!res)
|
||||
+ res = azx_dev;
|
||||
}
|
||||
dsp_unlock(azx_dev);
|
||||
}
|
||||
--
|
||||
1.8.4.5
|
||||
|
Loading…
x
Reference in New Issue
Block a user