]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
codec: es755: fix firmware crash during device switch
authorSrinivas Anne <sanne@nvidia.com>
Fri, 17 Jul 2015 00:06:03 +0000 (17:06 -0700)
committerDara Ramesh <dramesh@nvidia.com>
Wed, 19 Aug 2015 04:13:51 +0000 (21:13 -0700)
This change should fix the audience firmware crash observed while
switching between speaker and headphone devices during simultaneous
playback and capture usecase

Change summary:
Updatedthe Audience kernel driver to not send stop route
twice in a row when switching between speaker and headphone
during simultaneous playback and capture.

Change-Id: I62f5c6d5be58d3718a08dce6ef6c7984ef90e85b
Signed-off-by: Srinivas Anne <sanne@nvidia.com>
Reviewed-on: http://git-master/r/771360
(cherry picked from commit fc19a43d2deb0b70094a4c4babb13ed658697549)
Reviewed-on: http://git-master/r/784943
Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Tested-by: Dara Ramesh <dramesh@nvidia.com>
sound/soc/codecs/audience/es-d300.c

index 16b4e45601ce1916a8aa7ade9ac454d853a0a87b..ae239ebdc48a251390dd07790ec9c7473d372f66 100644 (file)
@@ -737,7 +737,7 @@ static int es_set_final_route(struct escore_priv *escore)
         * firmware after stopping the current route. The stream count will
         * anyway will be decremented when the HAL layer stops the PCM stream
         * of previous use-case. */
-       if (unlikely(atomic_read(&escore->active_streams)))
+       else if (unlikely(atomic_read(&escore->active_streams)))
                es300_codec_stop_algo(escore);
 
        escore_flush_msg_list(escore);