summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungbae Shin <seungbae.shin@samsung.com>2016-12-15 17:25:07 +0900
committerSeungbae Shin <seungbae.shin@samsung.com>2016-12-15 17:25:07 +0900
commita01f638814af3103d2037605479ef1a3cfed210b (patch)
tree2af191959c88ba1305d9ee025231492366455964
parentb77ccc747e508002934b770a16a737695230743a (diff)
downloadaudio-hal-sc7727-a01f638814af3103d2037605479ef1a3cfed210b.tar.gz
audio-hal-sc7727-a01f638814af3103d2037605479ef1a3cfed210b.tar.bz2
audio-hal-sc7727-a01f638814af3103d2037605479ef1a3cfed210b.zip
Handle route option update for Radio Mute when Earjack is disconnectedsubmit/tizen_3.0/20161215.083256accepted/tizen/3.0/mobile/20161216.015453
[Version] 0.1.20 [Profile] Mobile [Issue Type] PLM Change-Id: I6fcf42be12e6268d73eacfbec22f2d91c030ddc8
-rw-r--r--packaging/audio-hal-sc7727.spec2
-rw-r--r--tizen-audio-routing.c10
2 files changed, 9 insertions, 3 deletions
diff --git a/packaging/audio-hal-sc7727.spec b/packaging/audio-hal-sc7727.spec
index 4d49877..460b156 100644
--- a/packaging/audio-hal-sc7727.spec
+++ b/packaging/audio-hal-sc7727.spec
@@ -1,6 +1,6 @@
Name: audio-hal-sc7727
Summary: TIZEN Audio HAL for SC7727
-Version: 0.1.19
+Version: 0.1.20
Release: 0
Group: System/Libraries
License: Apache-2.0
diff --git a/tizen-audio-routing.c b/tizen-audio-routing.c
index 960e55c..a9e8e47 100644
--- a/tizen-audio-routing.c
+++ b/tizen-audio-routing.c
@@ -286,7 +286,6 @@ static audio_return_t __update_route_fmradio(audio_hal_t *ah, device_info_t *dev
AUDIO_LOG_ERROR("Failed to _fmradio_pcm_open(): error = 0x%x", audio_ret);
return audio_ret;
}
- _audio_volume_set_level_radio(ah, 0);
}
audio_ret = __set_devices(ah, verb, devices, num_of_devices);
@@ -297,7 +296,6 @@ static audio_return_t __update_route_fmradio(audio_hal_t *ah, device_info_t *dev
/* FIXME. If necessary, set VERB_VOIP */
ah->device.mode = VERB_RADIO;
- _audio_volume_set_level_radio(ah, ah->volume.volume_level[AUDIO_VOLUME_TYPE_MEDIA]);
if ((audio_ret = __connect_fm_radio(ah)))
AUDIO_LOG_ERROR("failed to __connect_fm_radio(), ret(0x%x)", audio_ret);
@@ -499,5 +497,13 @@ audio_return_t audio_update_route_option(void *audio_handle, audio_route_option_
AUDIO_LOG_INFO("role:%s, name:%s, value:%d", option->role, option->name, option->value);
+ /* Handle RADIO MUTE due to earjack disconnection */
+ if ((option->role && strcmp(option->role, "radio") == 0) &&
+ (option->name && strcmp(option->name, "mute") == 0) &&
+ option->value == 1) {
+ AUDIO_LOG_INFO("MUTE RADIO!!!!");
+ audio_ret = _mixer_control_set_value(ah, MIXER_FMRADIO_MUTE, 0);
+ }
+
return audio_ret;
}