Audio: update fw and driver to resolve codec issues
Mark Pereira [Fri, 11 Dec 2015 04:16:57 +0000 (20:16 -0800)]
Change summary:
Updated xml files provided by Audience to resolve issues
with CTS capture and playback failures on Hawkeye.
Update to Hawkeye latest FW is B62297.

Bug 200155576

Change-Id: Iacf4537e1b8bac96edc85adea5fe5a405d9c5976
Signed-off-by: Mark Pereira <mpereira@nvidia.com>
Reviewed-on: http://git-master/r/922137
Reviewed-by: Pierre Gervais <pgervais@nvidia.com>
GVS: Gerrit_Virtual_Submit

firmware/audience/es755/audience-es755-fw.bin
sound/soc/codecs/audience/es-d300.c
sound/soc/codecs/audience/es755.c

index b43da15..7703d31 100644 (file)
Binary files a/firmware/audience/es755/audience-es755-fw.bin and b/firmware/audience/es755/audience-es755-fw.bin differ
index 3d9d8d9..14cd227 100644 (file)
@@ -232,6 +232,7 @@ static int _es_set_switch(int id)
 
        switch_value = es_d300_switch[id].value;
        cmd = es_d300_switch[id].value_cmd[switch_value];
+       cmd = cmd | (1 << ES_SC_BIT);
 
        /*
         * The delay is required to make sure the route is active.
@@ -289,6 +290,7 @@ int _es_stop_route(struct escore_priv *escore, u8 stream_type)
                                        !escore->dhwpt_mode &&
                                        escore->dhwpt_cmd) {
 
+                       usleep_range(2000, 2005);
                        u32 cmd = escore->dhwpt_cmd & 0xFFFF0000;
                        ret = escore_cmd(escore, cmd, &resp);
                        if (ret) {
@@ -299,7 +301,7 @@ int _es_stop_route(struct escore_priv *escore, u8 stream_type)
 
                        /* Require 1ms delay between stop route
                           and DHWPT to avoid noise */
-                       usleep_range(5000, 5005);
+                       usleep_range(2000, 2005);
                }
 
 
@@ -353,12 +355,15 @@ int _es_stop_route(struct escore_priv *escore, u8 stream_type)
                                        return ret;
                                }
 
+                               usleep_range(2000, 2005);
                                ret = escore_cmd(escore, cmd, &resp);
                                if (ret) {
                                        pr_err("%s: Disabling DHWPT failed = %d\n",
                                                        __func__, ret);
                                        return ret;
                                }
+                               usleep_range(2000, 2005);
+
                        } else {
                                pr_debug("%s(): %s\n",
                                        "DHWPT capture is on.Skip disabling DHWPT",
@@ -454,8 +459,8 @@ static int convert_input_mux_to_cmd(struct escore_priv *escore, int reg)
        /* For BAS-3205, in case of PT_VP route and PCM0 port and 16bits,
         * set channel number to 0 for PassIN1 and 2 for PassIN2 */
        if (PCM0 == port && PASSTHRU_VP == algo_type &&
-           (SNDRV_PCM_FORMAT_S32_LE == escore->pcm_format ||
-            SNDRV_PCM_FORMAT_S32_BE == escore->pcm_format)) {
+           (SNDRV_PCM_FORMAT_S16_LE == escore->pcm_format ||
+            SNDRV_PCM_FORMAT_S16_BE == escore->pcm_format)) {
 
                if (ES_PASSIN1_MUX == reg)
                        channel_ids[algo_type][port].rx_chan_id = 0;
index 28d2741..a356c42 100644 (file)
@@ -868,7 +868,8 @@ static int es755_hw_params(struct snd_pcm_substream *substream,
 
        escore->pcm_format = params_format(params);
        /* ######## HACK : Set PCM format as 32bit ####### */
-       escore->pcm_format = SNDRV_PCM_FORMAT_S32_LE;
+       if (escore->algo_type == DHWPT || escore->dhwpt_enabled)
+               escore->pcm_format = SNDRV_PCM_FORMAT_S32_LE;
 
        switch (escore->pcm_format) {
        case SNDRV_PCM_FORMAT_A_LAW:
@@ -1032,7 +1033,7 @@ static int es755_hw_params(struct snd_pcm_substream *substream,
        /* BAS-3205, if frame size is 64 bits and word length is 16 bits, set
         * TDM Timeslots Per Frame of PortA to 3  */
        if (escore->algo_type != DHWPT && !escore->dhwpt_enabled) {
-               if (64 == (bps + 1)*channels && 0x1F == bps) {
+               if (32 == (bps + 1)*channels && 0xF == bps) {
                        api_access =
                             &escore->api_access[ES_PORT_TDM_SLOTS_PER_FRAME];
                        api_access->write_msg[0] |=