mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
ac97: bus_master: Check pi_info before warm reset
According to ac97 spec, warm reset is specified to no-op when the device is running. We should ignore it while the device is recording audio as well. BUG=chromium:1026538 TEST=Build Change-Id: I64be922149c90be9a7a8669ef6d56591e6de632b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1960058 Reviewed-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
This commit is contained in:
parent
65588b2535
commit
8d3f9ba350
1 changed files with 3 additions and 1 deletions
|
@ -447,7 +447,9 @@ impl Ac97BusMaster {
|
||||||
if new_glob_cnt & GLOB_CNT_WARM_RESET != 0 {
|
if new_glob_cnt & GLOB_CNT_WARM_RESET != 0 {
|
||||||
// Check if running and if so, ignore. Warm reset is specified to no-op when the device
|
// Check if running and if so, ignore. Warm reset is specified to no-op when the device
|
||||||
// is playing or recording audio.
|
// is playing or recording audio.
|
||||||
if !self.po_info.thread_run.load(Ordering::Relaxed) {
|
if !self.po_info.thread_run.load(Ordering::Relaxed)
|
||||||
|
&& !self.pi_info.thread_run.load(Ordering::Relaxed)
|
||||||
|
{
|
||||||
self.stop_all_audio();
|
self.stop_all_audio();
|
||||||
let mut regs = self.regs.lock();
|
let mut regs = self.regs.lock();
|
||||||
regs.glob_cnt = new_glob_cnt & !GLOB_CNT_WARM_RESET; // Auto-cleared reset bit.
|
regs.glob_cnt = new_glob_cnt & !GLOB_CNT_WARM_RESET; // Auto-cleared reset bit.
|
||||||
|
|
Loading…
Reference in a new issue