audio hal: temporary fix for speaker device ref counting issue
Fix for issue b/62337071 (commit 322047ed) caused a problem with
device enable ref counting likely causing b/65363602.
As the problematic code does not affect walleye (no speaker protection)
we remove it until a better solution is found for devices with stereo
speaker and speaker protection feature.
Bug: 65363602
Test: verify repro steps in b/65363602
Change-Id: I194d6b5c5411f181eedcd504f58de4e10dc77b47
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 685169f..7267931 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -687,9 +687,12 @@
audio_extn_spkr_prot_is_enabled()) {
audio_extn_spkr_prot_stop_processing(snd_device);
+ // FIXME b/65363602: bullhead is the only Nexus with audio_extn_spkr_prot_is_enabled()
+ // and does not use speaker swap. As this code causes a problem with device enable ref
+ // counting we remove it for now.
// when speaker device is disabled, reset swap.
// will be renabled on usecase start
- platform_set_swap_channels(adev, false);
+ // platform_set_swap_channels(adev, false);
} else if (platform_can_split_snd_device(snd_device,
&num_devices,