Loading hal/audio_extn/audio_extn.h +1 −5 Original line number Diff line number Diff line Loading @@ -96,14 +96,11 @@ void hw_info_append_hw_type(void *hw_info, snd_device_t snd_device, #endif #ifndef AUDIO_LISTEN_ENABLED #define audio_extn_listen_init(adev, snd_card) (0) #define audio_extn_listen_deinit(adev) (0) #define audio_extn_listen_update_status(uc_info, event) (0) #define audio_extn_listen_set_parameters(adev, parms) (0) #else enum listen_event_type { LISTEN_EVENT_SND_DEVICE_FREE, LISTEN_EVENT_SND_DEVICE_BUSY Loading @@ -116,11 +113,10 @@ void audio_extn_listen_update_status(snd_device_t snd_device, listen_event_type_t event); void audio_extn_listen_set_parameters(struct audio_device *adev, struct str_parms *parms); #endif /* AUDIO_LISTEN_ENABLED */ #ifndef AUXPCM_BT_ENABLED #define audio_extn_read_xml(adev, MIXER_CARD, MIXER_XML_PATH, \ #define audio_extn_read_xml(adev, mixer_card, MIXER_XML_PATH, \ MIXER_XML_PATH_AUXPCM) (-ENOSYS) #else int32_t audio_extn_read_xml(struct audio_device *adev, uint32_t mixer_card, Loading hal/audio_extn/fm.c +8 −8 Original line number Diff line number Diff line Loading @@ -170,8 +170,8 @@ static int32_t fm_start(struct audio_device *adev) __func__, pcm_dev_rx_id, pcm_dev_tx_id, uc_info->id); ALOGV("%s: Opening PCM playback device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_rx_id); fmmod.fm_pcm_rx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_rx_id); fmmod.fm_pcm_rx = pcm_open(adev->snd_card, pcm_dev_rx_id, PCM_OUT, &pcm_config_fm); if (fmmod.fm_pcm_rx && !pcm_is_ready(fmmod.fm_pcm_rx)) { Loading @@ -181,8 +181,8 @@ static int32_t fm_start(struct audio_device *adev) } ALOGV("%s: Opening PCM capture device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_tx_id); fmmod.fm_pcm_tx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_tx_id); fmmod.fm_pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_fm); if (fmmod.fm_pcm_tx && !pcm_is_ready(fmmod.fm_pcm_tx)) { Loading hal/audio_extn/hfp.c +7 −7 Original line number Diff line number Diff line Loading @@ -113,8 +113,8 @@ static int32_t start_hfp(struct audio_device *adev, __func__, pcm_dev_rx_id, pcm_dev_tx_id, uc_info->id); ALOGV("%s: Opening PCM playback device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_rx_id); hfpmod.hfp_sco_rx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_rx_id); hfpmod.hfp_sco_rx = pcm_open(adev->snd_card, pcm_dev_asm_rx_id, PCM_OUT, &pcm_config_hfp); if (hfpmod.hfp_sco_rx && !pcm_is_ready(hfpmod.hfp_sco_rx)) { Loading @@ -123,8 +123,8 @@ static int32_t start_hfp(struct audio_device *adev, goto exit; } ALOGD("%s: Opening PCM capture device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_tx_id); hfpmod.hfp_pcm_rx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_tx_id); hfpmod.hfp_pcm_rx = pcm_open(adev->snd_card, pcm_dev_rx_id, PCM_OUT, &pcm_config_hfp); if (hfpmod.hfp_pcm_rx && !pcm_is_ready(hfpmod.hfp_pcm_rx)) { Loading @@ -132,7 +132,7 @@ static int32_t start_hfp(struct audio_device *adev, ret = -EIO; goto exit; } hfpmod.hfp_sco_tx = pcm_open(SOUND_CARD, hfpmod.hfp_sco_tx = pcm_open(adev->snd_card, pcm_dev_asm_tx_id, PCM_IN, &pcm_config_hfp); if (hfpmod.hfp_sco_tx && !pcm_is_ready(hfpmod.hfp_sco_tx)) { Loading @@ -141,8 +141,8 @@ static int32_t start_hfp(struct audio_device *adev, goto exit; } ALOGV("%s: Opening PCM capture device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_tx_id); hfpmod.hfp_pcm_tx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_tx_id); hfpmod.hfp_pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_hfp); if (hfpmod.hfp_pcm_tx && !pcm_is_ready(hfpmod.hfp_pcm_tx)) { Loading hal/audio_extn/spkr_protection.c +9 −6 Original line number Diff line number Diff line Loading @@ -240,7 +240,8 @@ static int spkr_calibrate(int t0) goto exit; } handle.pcm_rx = handle.pcm_tx = NULL; handle.pcm_rx = pcm_open(SOUND_CARD, pcm_dev_rx_id, handle.pcm_rx = pcm_open(adev->snd_card, pcm_dev_rx_id, PCM_OUT, &pcm_config_skr_prot); if (handle.pcm_rx && !pcm_is_ready(handle.pcm_rx)) { ALOGE("%s: %s", __func__, pcm_get_error(handle.pcm_rx)); Loading @@ -267,7 +268,8 @@ static int spkr_calibrate(int t0) status.status = -ENODEV; goto exit; } handle.pcm_tx = pcm_open(SOUND_CARD, pcm_dev_tx_id, handle.pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_skr_prot); if (handle.pcm_tx && !pcm_is_ready(handle.pcm_tx)) { ALOGE("%s: %s", __func__, pcm_get_error(handle.pcm_tx)); Loading Loading @@ -618,7 +620,8 @@ int audio_extn_spkr_prot_start_processing(snd_device_t snd_device) ret = -ENODEV; goto exit; } handle.pcm_tx = pcm_open(SOUND_CARD, pcm_dev_tx_id, handle.pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_skr_prot); if (handle.pcm_tx && !pcm_is_ready(handle.pcm_tx)) { ALOGE("%s: %s", __func__, pcm_get_error(handle.pcm_tx)); Loading hal/audio_extn/usb.c +8 −2 Original line number Diff line number Diff line Loading @@ -348,7 +348,10 @@ static int32_t usb_playback_entry(void *adev) usbmod->proxy_pcm_playback_handle = pcm_open(usbmod->proxy_card, usbmod->proxy_device_id, PCM_IN | PCM_MMAP | PCM_NOIRQ, &pcm_config_usbmod); if(!usbmod->proxy_pcm_playback_handle){ if(usbmod->proxy_pcm_playback_handle && !pcm_is_ready(usbmod->proxy_pcm_playback_handle)){ pcm_close(usbmod->proxy_pcm_playback_handle); usbmod->proxy_pcm_playback_handle = NULL; proxy_open_retry_count--; usleep(USB_PROXY_OPEN_WAIT_TIME * 1000); ALOGE("%s: pcm_open for proxy failed retrying = %d", Loading Loading @@ -463,7 +466,10 @@ static int32_t usb_record_entry(void *adev) usbmod->proxy_pcm_record_handle = pcm_open(usbmod->proxy_card, usbmod->proxy_device_id, PCM_OUT | PCM_MMAP | PCM_NOIRQ, &pcm_config_usbmod); if(!usbmod->proxy_pcm_record_handle){ if(usbmod->proxy_pcm_record_handle && !pcm_is_ready(usbmod->proxy_pcm_record_handle)){ pcm_close(usbmod->proxy_pcm_record_handle); usbmod->proxy_pcm_record_handle = NULL; proxy_open_retry_count--; usleep(USB_PROXY_OPEN_WAIT_TIME * 1000); ALOGE("%s: pcm_open for proxy(recording) failed retrying = %d", Loading Loading
hal/audio_extn/audio_extn.h +1 −5 Original line number Diff line number Diff line Loading @@ -96,14 +96,11 @@ void hw_info_append_hw_type(void *hw_info, snd_device_t snd_device, #endif #ifndef AUDIO_LISTEN_ENABLED #define audio_extn_listen_init(adev, snd_card) (0) #define audio_extn_listen_deinit(adev) (0) #define audio_extn_listen_update_status(uc_info, event) (0) #define audio_extn_listen_set_parameters(adev, parms) (0) #else enum listen_event_type { LISTEN_EVENT_SND_DEVICE_FREE, LISTEN_EVENT_SND_DEVICE_BUSY Loading @@ -116,11 +113,10 @@ void audio_extn_listen_update_status(snd_device_t snd_device, listen_event_type_t event); void audio_extn_listen_set_parameters(struct audio_device *adev, struct str_parms *parms); #endif /* AUDIO_LISTEN_ENABLED */ #ifndef AUXPCM_BT_ENABLED #define audio_extn_read_xml(adev, MIXER_CARD, MIXER_XML_PATH, \ #define audio_extn_read_xml(adev, mixer_card, MIXER_XML_PATH, \ MIXER_XML_PATH_AUXPCM) (-ENOSYS) #else int32_t audio_extn_read_xml(struct audio_device *adev, uint32_t mixer_card, Loading
hal/audio_extn/fm.c +8 −8 Original line number Diff line number Diff line Loading @@ -170,8 +170,8 @@ static int32_t fm_start(struct audio_device *adev) __func__, pcm_dev_rx_id, pcm_dev_tx_id, uc_info->id); ALOGV("%s: Opening PCM playback device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_rx_id); fmmod.fm_pcm_rx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_rx_id); fmmod.fm_pcm_rx = pcm_open(adev->snd_card, pcm_dev_rx_id, PCM_OUT, &pcm_config_fm); if (fmmod.fm_pcm_rx && !pcm_is_ready(fmmod.fm_pcm_rx)) { Loading @@ -181,8 +181,8 @@ static int32_t fm_start(struct audio_device *adev) } ALOGV("%s: Opening PCM capture device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_tx_id); fmmod.fm_pcm_tx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_tx_id); fmmod.fm_pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_fm); if (fmmod.fm_pcm_tx && !pcm_is_ready(fmmod.fm_pcm_tx)) { Loading
hal/audio_extn/hfp.c +7 −7 Original line number Diff line number Diff line Loading @@ -113,8 +113,8 @@ static int32_t start_hfp(struct audio_device *adev, __func__, pcm_dev_rx_id, pcm_dev_tx_id, uc_info->id); ALOGV("%s: Opening PCM playback device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_rx_id); hfpmod.hfp_sco_rx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_rx_id); hfpmod.hfp_sco_rx = pcm_open(adev->snd_card, pcm_dev_asm_rx_id, PCM_OUT, &pcm_config_hfp); if (hfpmod.hfp_sco_rx && !pcm_is_ready(hfpmod.hfp_sco_rx)) { Loading @@ -123,8 +123,8 @@ static int32_t start_hfp(struct audio_device *adev, goto exit; } ALOGD("%s: Opening PCM capture device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_tx_id); hfpmod.hfp_pcm_rx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_tx_id); hfpmod.hfp_pcm_rx = pcm_open(adev->snd_card, pcm_dev_rx_id, PCM_OUT, &pcm_config_hfp); if (hfpmod.hfp_pcm_rx && !pcm_is_ready(hfpmod.hfp_pcm_rx)) { Loading @@ -132,7 +132,7 @@ static int32_t start_hfp(struct audio_device *adev, ret = -EIO; goto exit; } hfpmod.hfp_sco_tx = pcm_open(SOUND_CARD, hfpmod.hfp_sco_tx = pcm_open(adev->snd_card, pcm_dev_asm_tx_id, PCM_IN, &pcm_config_hfp); if (hfpmod.hfp_sco_tx && !pcm_is_ready(hfpmod.hfp_sco_tx)) { Loading @@ -141,8 +141,8 @@ static int32_t start_hfp(struct audio_device *adev, goto exit; } ALOGV("%s: Opening PCM capture device card_id(%d) device_id(%d)", __func__, SOUND_CARD, pcm_dev_tx_id); hfpmod.hfp_pcm_tx = pcm_open(SOUND_CARD, __func__, adev->snd_card, pcm_dev_tx_id); hfpmod.hfp_pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_hfp); if (hfpmod.hfp_pcm_tx && !pcm_is_ready(hfpmod.hfp_pcm_tx)) { Loading
hal/audio_extn/spkr_protection.c +9 −6 Original line number Diff line number Diff line Loading @@ -240,7 +240,8 @@ static int spkr_calibrate(int t0) goto exit; } handle.pcm_rx = handle.pcm_tx = NULL; handle.pcm_rx = pcm_open(SOUND_CARD, pcm_dev_rx_id, handle.pcm_rx = pcm_open(adev->snd_card, pcm_dev_rx_id, PCM_OUT, &pcm_config_skr_prot); if (handle.pcm_rx && !pcm_is_ready(handle.pcm_rx)) { ALOGE("%s: %s", __func__, pcm_get_error(handle.pcm_rx)); Loading @@ -267,7 +268,8 @@ static int spkr_calibrate(int t0) status.status = -ENODEV; goto exit; } handle.pcm_tx = pcm_open(SOUND_CARD, pcm_dev_tx_id, handle.pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_skr_prot); if (handle.pcm_tx && !pcm_is_ready(handle.pcm_tx)) { ALOGE("%s: %s", __func__, pcm_get_error(handle.pcm_tx)); Loading Loading @@ -618,7 +620,8 @@ int audio_extn_spkr_prot_start_processing(snd_device_t snd_device) ret = -ENODEV; goto exit; } handle.pcm_tx = pcm_open(SOUND_CARD, pcm_dev_tx_id, handle.pcm_tx = pcm_open(adev->snd_card, pcm_dev_tx_id, PCM_IN, &pcm_config_skr_prot); if (handle.pcm_tx && !pcm_is_ready(handle.pcm_tx)) { ALOGE("%s: %s", __func__, pcm_get_error(handle.pcm_tx)); Loading
hal/audio_extn/usb.c +8 −2 Original line number Diff line number Diff line Loading @@ -348,7 +348,10 @@ static int32_t usb_playback_entry(void *adev) usbmod->proxy_pcm_playback_handle = pcm_open(usbmod->proxy_card, usbmod->proxy_device_id, PCM_IN | PCM_MMAP | PCM_NOIRQ, &pcm_config_usbmod); if(!usbmod->proxy_pcm_playback_handle){ if(usbmod->proxy_pcm_playback_handle && !pcm_is_ready(usbmod->proxy_pcm_playback_handle)){ pcm_close(usbmod->proxy_pcm_playback_handle); usbmod->proxy_pcm_playback_handle = NULL; proxy_open_retry_count--; usleep(USB_PROXY_OPEN_WAIT_TIME * 1000); ALOGE("%s: pcm_open for proxy failed retrying = %d", Loading Loading @@ -463,7 +466,10 @@ static int32_t usb_record_entry(void *adev) usbmod->proxy_pcm_record_handle = pcm_open(usbmod->proxy_card, usbmod->proxy_device_id, PCM_OUT | PCM_MMAP | PCM_NOIRQ, &pcm_config_usbmod); if(!usbmod->proxy_pcm_record_handle){ if(usbmod->proxy_pcm_record_handle && !pcm_is_ready(usbmod->proxy_pcm_record_handle)){ pcm_close(usbmod->proxy_pcm_record_handle); usbmod->proxy_pcm_record_handle = NULL; proxy_open_retry_count--; usleep(USB_PROXY_OPEN_WAIT_TIME * 1000); ALOGE("%s: pcm_open for proxy(recording) failed retrying = %d", Loading