Snap for 4593582 from 750cc1c06d195b4b6aaa12e980312027b2bd676d to pi-release
Change-Id: I9ad09ab85b0d7539f8afc796bae25309d107ec26
diff --git a/hal/audio_extn/cirrus_playback.c b/hal/audio_extn/cirrus_playback.c
old mode 100755
new mode 100644
index 676e7ad..cd9e90a
--- a/hal/audio_extn/cirrus_playback.c
+++ b/hal/audio_extn/cirrus_playback.c
@@ -62,7 +62,6 @@
int32_t status_r;
int32_t checksum_r;
int32_t z_r;
- int32_t atemp;
};
/* Payload struct for setting the RX and TX use cases */
@@ -74,7 +73,6 @@
int32_t status_r;
int32_t checksum_r;
int32_t z_r;
- int32_t atemp;
};
#define CRUS_SP_FILE "/dev/msm_cirrus_playback"
@@ -125,11 +123,11 @@
};
static struct pcm_config pcm_config_cirrus_rx = {
- .channels = 2,
+ .channels = 8,
.rate = 48000,
- .period_size = 256,
+ .period_size = 320,
.period_count = 4,
- .format = PCM_FORMAT_S16_LE,
+ .format = PCM_FORMAT_S32_LE,
.start_threshold = 0,
.stop_threshold = INT_MAX,
.avail_min = 0,
@@ -226,18 +224,6 @@
goto exit;
}
- property_get("vendor.audio.cirrus_spkr.cal.store_calib_data", value, "none");
- if (!strncmp("true", value, 4)) {
- store_calib_data = true;
- property_get("vendor.audio.cirrus_spkr.cal.atemp", value, "0");
- if(atoi(value) > 0)
- result.atemp = atoi(value);
- else
- result.atemp = CRUS_SP_DEFAULT_AMBIENT_TEMP;
- } else {
- result.atemp = CRUS_SP_DEFAULT_AMBIENT_TEMP;
- }
-
if(store_calib_data) {
cal_file = fopen(CRUS_CAL_FILE, "wb");
if (!cal_file) {
@@ -436,7 +422,8 @@
snd_split_handle = audio_extn_get_snd_card_split();
/* FIXME: REMOVE THIS AFTER B1C1 P1.0 SUPPORT */
- if (!strcmp(snd_split_handle->form_factor, "tdm")) {
+ if (!strcmp(snd_split_handle->form_factor, "tdm") ||
+ !strcmp(snd_split_handle->form_factor, "c1")) {
handle.spkr_prot_enable = true;
} else {
handle.spkr_prot_enable = false;