diff options
Diffstat (limited to 'audio_hw.c')
-rw-r--r-- | audio_hw.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -117,6 +117,7 @@ static int audio_hw_set_master_volume(struct audio_hw_device *dev, float volume) static int audio_hw_set_mode(struct audio_hw_device *dev, int mode) { struct tinyalsa_audio_device *device; + int rc; LOGD("%s(%p, %d)", __func__, dev, mode); @@ -131,8 +132,22 @@ static int audio_hw_set_mode(struct audio_hw_device *dev, int mode) if(device->stream_out != NULL) tinyalsa_mixer_set_device(device->mixer, device->stream_out->device_current); + +#ifdef YAMAHA_MC1N2_AUDIO + rc = yamaha_mc1n2_audio_modem_start(device->mc1n2_pdata); + if(rc < 0) { + LOGE("Failed to set Yamaha-MC1N2-Audio route"); + } +#endif } else if(device->mode == AUDIO_MODE_IN_CALL) { tinyalsa_mixer_set_modem_state(device->mixer, 0); + +#ifdef YAMAHA_MC1N2_AUDIO + rc = yamaha_mc1n2_audio_modem_stop(device->mc1n2_pdata); + if(rc < 0) { + LOGE("Failed to set Yamaha-MC1N2-Audio route"); + } +#endif } device->mode = mode; |