summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDheeraj CVR <cvr.dheeraj@gmail.com>2014-08-12 19:45:59 +0530
committertilaksidduram <tilaksidduram@gmail.com>2014-10-30 10:43:39 +0530
commitd7ae560a7ae5a00ac45eeaff0494640b51af13ba (patch)
tree6a83b7a674808bce364732c28382a531abaa529b
parent1270d0cdbeb01e6c43ca2927718f54336676b11c (diff)
downloaddevice_samsung_n7100-d7ae560a7ae5a00ac45eeaff0494640b51af13ba.zip
device_samsung_n7100-d7ae560a7ae5a00ac45eeaff0494640b51af13ba.tar.gz
device_samsung_n7100-d7ae560a7ae5a00ac45eeaff0494640b51af13ba.tar.bz2
Update audio profiles
Change-Id: I05c379455be8dbf000837b12d942000c404dba20 Conflicts: audio/audio_hw.c configs/tiny_hw.xml
-rw-r--r--audio/audio_hw.c131
-rw-r--r--configs/tiny_hw.xml8
2 files changed, 64 insertions, 75 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index b54ea35..31aecad 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -587,18 +587,6 @@ static void select_mode(struct m0_audio_device *adev)
adev->in_call = 0;
ril_set_call_clock_sync(&adev->ril, SOUND_CLOCK_STOP);
end_call(adev);
- //Force Input Standby
- adev->in_device = AUDIO_DEVICE_NONE;
-
- ALOGD("%s: set voicecall route: voicecall_default_disable", __func__);
- set_bigroute_by_array(adev->mixer, voicecall_default_disable, 1);
- ALOGD("%s: set voicecall route: default_input_disable", __func__);
- set_bigroute_by_array(adev->mixer, default_input_disable, 1);
- ALOGD("%s: set voicecall route: headset_input_disable", __func__);
- set_bigroute_by_array(adev->mixer, headset_input_disable, 1);
- ALOGD("%s: set voicecall route: bt_disable", __func__);
- set_bigroute_by_array(adev->mixer, bt_disable, 1);
-
force_all_standby(adev);
ALOGD("%s: set voicecall route: voicecall_default_disable", __func__);
@@ -2807,85 +2795,86 @@ static void adev_config_start(void *data, const XML_Char *elem,
unsigned int i, j;
for (i = 0; attr[i]; i += 2) {
- if (strcmp(attr[i], "name") == 0)
- name = attr[i + 1];
+ if (strcmp(attr[i], "name") == 0)
+ name = attr[i + 1];
- if (strcmp(attr[i], "val") == 0)
- val = attr[i + 1];
+ if (strcmp(attr[i], "val") == 0)
+ val = attr[i + 1];
}
if (strcmp(elem, "device") == 0) {
- if (!name) {
- ALOGE("Unnamed device\n");
+ if (!name) {
+ ALOGE("Unnamed device\n");
+ return;
+ }
+
+ for (i = 0; i < sizeof(dev_names) / sizeof(dev_names[0]); i++) {
+ if (strcmp(dev_names[i].name, name) == 0) {
+ ALOGI("Allocating device %s\n", name);
+ dev_cfg = realloc(s->adev->dev_cfgs,
+ (s->adev->num_dev_cfgs + 1)
+ * sizeof(*dev_cfg));
+ if (!dev_cfg) {
+ ALOGE("Unable to allocate dev_cfg\n");
return;
}
- for (i = 0; i < sizeof(dev_names) / sizeof(dev_names[0]); i++) {
- if (strcmp(dev_names[i].name, name) == 0) {
- ALOGI("Allocating device %s\n", name);
- dev_cfg = realloc(s->adev->dev_cfgs,
- (s->adev->num_dev_cfgs + 1)
- * sizeof(*dev_cfg));
- if (!dev_cfg) {
- ALOGE("Unable to allocate dev_cfg\n");
- return;
- }
-
- s->dev = &dev_cfg[s->adev->num_dev_cfgs];
- memset(s->dev, 0, sizeof(*s->dev));
- s->dev->mask = dev_names[i].mask;
+ s->dev = &dev_cfg[s->adev->num_dev_cfgs];
+ memset(s->dev, 0, sizeof(*s->dev));
+ s->dev->mask = dev_names[i].mask;
- s->adev->dev_cfgs = dev_cfg;
- s->adev->num_dev_cfgs++;
- }
+ s->adev->dev_cfgs = dev_cfg;
+ s->adev->num_dev_cfgs++;
}
+ }
+
} else if (strcmp(elem, "path") == 0) {
- if (s->path_len)
- ALOGW("Nested paths\n");
-
- /* If this a path for a device it must have a role */
- if (s->dev) {
- /* Need to refactor a bit... */
- if (strcmp(name, "on") == 0) {
- s->on = true;
- } else if (strcmp(name, "off") == 0) {
- s->on = false;
- } else {
- ALOGW("Unknown path name %s\n", name);
- }
+ if (s->path_len)
+ ALOGW("Nested paths\n");
+
+ /* If this a path for a device it must have a role */
+ if (s->dev) {
+ /* Need to refactor a bit... */
+ if (strcmp(name, "on") == 0) {
+ s->on = true;
+ } else if (strcmp(name, "off") == 0) {
+ s->on = false;
+ } else {
+ ALOGW("Unknown path name %s\n", name);
}
+ }
} else if (strcmp(elem, "ctl") == 0) {
- struct route_setting *r;
+ struct route_setting *r;
- if (!name) {
- ALOGE("Unnamed control\n");
- return;
- }
+ if (!name) {
+ ALOGE("Unnamed control\n");
+ return;
+ }
- if (!val) {
- ALOGE("No value specified for %s\n", name);
- return;
- }
+ if (!val) {
+ ALOGE("No value specified for %s\n", name);
+ return;
+ }
- ALOGV("Parsing control %s => %s\n", name, val);
+ ALOGV("Parsing control %s => %s\n", name, val);
- r = realloc(s->path, sizeof(*r) * (s->path_len + 1));
- if (!r) {
- ALOGE("Out of memory handling %s => %s\n", name, val);
- return;
- }
+ r = realloc(s->path, sizeof(*r) * (s->path_len + 1));
+ if (!r) {
+ ALOGE("Out of memory handling %s => %s\n", name, val);
+ return;
+ }
- r[s->path_len].ctl_name = strdup(name);
- r[s->path_len].strval = NULL;
+ r[s->path_len].ctl_name = strdup(name);
+ r[s->path_len].strval = NULL;
- /* This can be fooled but it'll do */
- r[s->path_len].intval = atoi(val);
- if (!r[s->path_len].intval && strcmp(val, "0") != 0)
- r[s->path_len].strval = strdup(val);
+ /* This can be fooled but it'll do */
+ r[s->path_len].intval = atoi(val);
+ if (!r[s->path_len].intval && strcmp(val, "0") != 0)
+ r[s->path_len].strval = strdup(val);
- s->path = r;
- s->path_len++;
+ s->path = r;
+ s->path_len++;
}
}
diff --git a/configs/tiny_hw.xml b/configs/tiny_hw.xml
index c693c0d..88f3651 100644
--- a/configs/tiny_hw.xml
+++ b/configs/tiny_hw.xml
@@ -140,7 +140,7 @@ We are able to have most of our routing static so do that
<ctl name="SPKL DAC1 Volume" val="1"/>
<ctl name="SPKR DAC1 Volume" val="1"/>
<ctl name="Speaker Mixer Volume" val="3"/>
- <ctl name="Speaker Boost Volume" val="6"/>
+ <ctl name="Speaker Boost Volume" val="4"/>
<ctl name="Speaker Volume" val="57"/>
</path>
<path name="off">
@@ -261,14 +261,14 @@ We are able to have most of our routing static so do that
<path name="on">
<ctl name="Main Mic Switch" val="1"/>
<ctl name="MainMicBias Mode" val="1"/>
- <ctl name="IN2L Volume" val="26"/>
+ <ctl name="IN2L Volume" val="28"/>
<ctl name="MIXINL IN2L Switch" val="1"/>
- <ctl name="MIXINL IN2L Volume" val="0"/>
+ <ctl name="MIXINL IN2L Volume" val="1"/>
<ctl name="AIF1ADCL Source" val="Left"/>
<ctl name="AIF1ADCR Source" val="Left"/>
<ctl name="AIF1ADC2L Mixer ADC/DMIC Switch" val="1"/>
<ctl name="AIF1ADC1R Mixer ADC/DMIC Switch" val="1"/>
- <ctl name="AIF1ADC1 HPF Mode" val="0"/>
+ <ctl name="AIF1ADC1 HPF Mode" val="1"/>
<ctl name="AIF1ADC1 HPF Switch" val="1"/>
<ctl name="AIF1ADC1 Volume" val="96"/>
</path>