hal: Remove SND_DEVICE_OUT_ULTRASOUND_HANDSET
Use SND_DEVICE_OUT_VOICE_HANDSET to avoid audio HAL crashes when switching output devices (reproducible with WhatApp calls). This matches stock audio HAL from veux. Change-Id: I469aec5034e7abe8fa9c9a45cfb82b6fc7e840b5
This commit is contained in:
parent
bca302d162
commit
03ed09f036
|
@ -220,7 +220,7 @@ int us_start(void)
|
|||
}
|
||||
|
||||
rx_usecase->type = PCM_PLAYBACK;
|
||||
rx_usecase->out_snd_device = SND_DEVICE_OUT_ULTRASOUND_HANDSET;
|
||||
rx_usecase->out_snd_device = SND_DEVICE_OUT_VOICE_HANDSET;
|
||||
rx_usecase->id = USECASE_AUDIO_ULTRASOUND_RX;
|
||||
rx_usecase->stream.out = us->adev->primary_output;
|
||||
rx_usecase->stream.out->app_type_cfg.sample_rate = 96000;
|
||||
|
@ -232,7 +232,7 @@ int us_start(void)
|
|||
platform_check_and_set_codec_backend_cfg(us->adev, rx_usecase,
|
||||
rx_usecase->out_snd_device);
|
||||
|
||||
enable_snd_device(us->adev, SND_DEVICE_OUT_ULTRASOUND_HANDSET);
|
||||
enable_snd_device(us->adev, SND_DEVICE_OUT_VOICE_HANDSET);
|
||||
enable_audio_route(us->adev, rx_usecase);
|
||||
ALOGV("%s: Opening PCM playback device card_id(%d) device_id(%d)",
|
||||
__func__, us->adev->snd_card, rx_device_id);
|
||||
|
|
|
@ -1779,8 +1779,7 @@ int enable_snd_device(struct audio_device *adev,
|
|||
audio_extn_listen_update_device_status(snd_device,
|
||||
LISTEN_EVENT_SND_DEVICE_BUSY);
|
||||
#ifdef ELLIPTIC_ULTRASOUND_ENABLED
|
||||
if (snd_device != SND_DEVICE_OUT_ULTRASOUND_HANDSET &&
|
||||
snd_device != SND_DEVICE_IN_ULTRASOUND_MIC)
|
||||
if (snd_device != SND_DEVICE_IN_ULTRASOUND_MIC)
|
||||
#endif
|
||||
if (platform_get_snd_device_acdb_id(snd_device) < 0) {
|
||||
audio_extn_sound_trigger_update_device_status(snd_device,
|
||||
|
@ -2138,11 +2137,6 @@ static void check_usecases_codec_backend(struct audio_device *adev,
|
|||
platform_get_snd_device_name(usecase->out_snd_device),
|
||||
platform_check_backends_match(snd_device, usecase->out_snd_device));
|
||||
|
||||
#ifdef ELLIPTIC_ULTRASOUND_ENABLED
|
||||
if (usecase->id == USECASE_AUDIO_ULTRASOUND_RX)
|
||||
continue;
|
||||
#endif
|
||||
|
||||
if ((usecase->type != PCM_CAPTURE) && (usecase != uc_info) &&
|
||||
(usecase->type != PCM_PASSTHROUGH)) {
|
||||
uc_derive_snd_device = derive_playback_snd_device(adev->platform,
|
||||
|
|
|
@ -729,7 +729,6 @@ static const char * const device_table[SND_DEVICE_MAX] = {
|
|||
[SND_DEVICE_OUT_HAPTICS] = "haptics",
|
||||
[SND_DEVICE_OUT_ICC] = "bus-speaker",
|
||||
[SND_DEVICE_OUT_SYNTH_SPKR] = "bus-speaker",
|
||||
[SND_DEVICE_OUT_ULTRASOUND_HANDSET] = "ultrasound-handset",
|
||||
|
||||
/* Capture sound devices */
|
||||
[SND_DEVICE_IN_HANDSET_MIC] = "handset-mic",
|
||||
|
@ -2138,11 +2137,7 @@ bool platform_send_gain_dep_cal(void *platform, int level) {
|
|||
usecase = node_to_item(node, struct audio_usecase, list);
|
||||
|
||||
if (usecase != NULL && usecase->stream.out &&
|
||||
usecase->type == PCM_PLAYBACK
|
||||
#ifdef ELLIPTIC_ULTRASOUND_ENABLED
|
||||
&& usecase->id != USECASE_AUDIO_ULTRASOUND_RX
|
||||
#endif
|
||||
) {
|
||||
usecase->type == PCM_PLAYBACK) {
|
||||
int new_snd_device[2] = {0};
|
||||
int i, num_devices = 1;
|
||||
|
||||
|
@ -2690,7 +2685,6 @@ static void set_platform_defaults(struct platform_data * my_data)
|
|||
hw_interface_table[SND_DEVICE_OUT_BUS_RSE] = strdup("QUIN_TDM_RX_0");
|
||||
hw_interface_table[SND_DEVICE_OUT_CALL_PROXY] = strdup("CALL_PROXY_RX");
|
||||
hw_interface_table[SND_DEVICE_OUT_HAPTICS] = strdup("RX_CDC_DMA_RX_6");
|
||||
hw_interface_table[SND_DEVICE_OUT_ULTRASOUND_HANDSET] = strdup("SLIMBUS_0_RX");
|
||||
hw_interface_table[SND_DEVICE_IN_HANDSET_MIC] = strdup("SLIMBUS_0_TX");
|
||||
hw_interface_table[SND_DEVICE_IN_HANDSET_MIC_SB] = strdup("SLIMBUS_0_TX");
|
||||
hw_interface_table[SND_DEVICE_IN_HANDSET_MIC_NN] = strdup("SLIMBUS_0_TX");
|
||||
|
|
|
@ -214,7 +214,6 @@ enum {
|
|||
SND_DEVICE_OUT_HAPTICS,
|
||||
SND_DEVICE_OUT_ICC,
|
||||
SND_DEVICE_OUT_SYNTH_SPKR,
|
||||
SND_DEVICE_OUT_ULTRASOUND_HANDSET,
|
||||
SND_DEVICE_OUT_END,
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue