audio: modify the SPEAKER_RX_ACDB to support both MONO and STEREO speaker
Change-Id: I2e66f430b18ecfa3bfcdbb7c9f6d50354e2d0709
This commit is contained in:
parent
c1748db63c
commit
91e9fad9df
|
@ -522,7 +522,8 @@ void switchDevice(alsa_handle_t *handle, uint32_t devices, uint32_t mode)
|
|||
strlcat(ident, curRxUCMDevice, sizeof(ident));
|
||||
rx_dev_id = snd_use_case_get(handle->ucMgr, ident, NULL);
|
||||
|
||||
if (rx_dev_id == DEVICE_SPEAKER_RX_ACDB_ID && tx_dev_id == DEVICE_HANDSET_TX_ACDB_ID) {
|
||||
if (((rx_dev_id == DEVICE_SPEAKER_MONO_RX_ACDB_ID ) || (rx_dev_id == DEVICE_SPEAKER_STEREO_RX_ACDB_ID ))
|
||||
&& tx_dev_id == DEVICE_HANDSET_TX_ACDB_ID) {
|
||||
tx_dev_id = DEVICE_SPEAKER_TX_ACDB_ID;
|
||||
}
|
||||
|
||||
|
|
|
@ -620,11 +620,11 @@ int use_case_index)
|
|||
rx_id = ctrl_list[index].acdb_id;
|
||||
tx_id = ctrl_list[use_case_index].acdb_id;
|
||||
}
|
||||
if(rx_id == DEVICE_SPEAKER_RX_ACDB_ID &&
|
||||
tx_id == DEVICE_HANDSET_TX_ACDB_ID) {
|
||||
if(((rx_id == DEVICE_SPEAKER_MONO_RX_ACDB_ID)||(rx_id == DEVICE_SPEAKER_STEREO_RX_ACDB_ID))
|
||||
&& tx_id == DEVICE_HANDSET_TX_ACDB_ID) {
|
||||
tx_id = DEVICE_SPEAKER_TX_ACDB_ID;
|
||||
} else if (rx_id == DEVICE_SPEAKER_RX_ACDB_ID &&
|
||||
tx_id == DEVICE_HANDSET_TX_FV5_ACDB_ID) {
|
||||
} else if (((rx_id == DEVICE_SPEAKER_MONO_RX_ACDB_ID )||(rx_id == DEVICE_SPEAKER_STEREO_RX_ACDB_ID))
|
||||
&& tx_id == DEVICE_HANDSET_TX_FV5_ACDB_ID) {
|
||||
tx_id = DEVICE_SPEAKER_TX_FV5_ACDB_ID;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,8 @@ extern "C" {
|
|||
#define CAP_VOICE 0x4
|
||||
#define DEVICE_HANDSET_RX_ACDB_ID 7 // HANDSET_SPKR
|
||||
#define DEVICE_HANDSET_TX_ACDB_ID 4 // HANDSET_MIC
|
||||
#define DEVICE_SPEAKER_RX_ACDB_ID 15// SPKR_PHONE_SPKR_STEREO
|
||||
#define DEVICE_SPEAKER_MONO_RX_ACDB_ID 14// SPKR_PHONE_SPKR_MONO
|
||||
#define DEVICE_SPEAKER_STEREO_RX_ACDB_ID 15// SPKR_PHONE_SPKR_STEREO
|
||||
#define DEVICE_SPEAKER_TX_ACDB_ID 11// SPKR_PHONE_MIC
|
||||
#define DEVICE_HEADSET_RX_ACDB_ID 10// HEADSET_SPKR_STEREO
|
||||
#define DEVICE_HEADSET_TX_ACDB_ID 8 // HEADSET_MIC
|
||||
|
|
Loading…
Reference in New Issue