[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240821014238.338864-1-soxiebing@163.com>
Date: Wed, 21 Aug 2024 09:42:38 +0800
From: soxiebing <soxiebing@....com>
To: tiwai@...e.de
Cc: linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
songxiebing <songxiebing@...inos.cn>
Subject: [PATCH v1] ALSA: hda: fix snd_hda_bus_reset when single_cmd is not supported
From: songxiebing <songxiebing@...inos.cn>
When an azx_get_desponse timeout occurs, ensure that bus_reset
can be used when fallback_to_single_cmd is not supported.
Signed-off-by: songxiebing <songxiebing@...inos.cn>
---
sound/pci/hda/hda_controller.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index 5d86e5a9c814..5ea198d67bda 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -809,10 +809,6 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr,
return -EIO;
}
- /* no fallback mechanism? */
- if (!chip->fallback_to_single_cmd)
- return -EIO;
-
/* a fatal communication error; need either to reset or to fallback
* to the single_cmd mode
*/
@@ -824,6 +820,10 @@ static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr,
return -EAGAIN; /* give a chance to retry */
}
+ /* no fallback mechanism? */
+ if (!chip->fallback_to_single_cmd)
+ return -EIO;
+
dev_err(chip->card->dev,
"azx_get_response timeout, switching to single_cmd mode: last cmd=0x%08x\n",
bus->last_cmd[addr]);
--
2.25.1
Powered by blists - more mailing lists