Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3c11a32 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Audio: Remove unnecessary unmute when A2dp device disconnects."

parents aeaf96ac 2b57037c
Loading
Loading
Loading
Loading
+0 −15
Original line number Original line Diff line number Diff line
@@ -8314,21 +8314,6 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
                adev->allow_afe_proxy_usage = true;
                adev->allow_afe_proxy_usage = true;
            }
            }
        }
        }
        if (audio_is_a2dp_out_device(device)) {
           struct audio_usecase *usecase;
           struct listnode *node;
           list_for_each(node, &adev->usecase_list) {
               usecase = node_to_item(node, struct audio_usecase, list);
               if (PCM_PLAYBACK == usecase->type && usecase->stream.out &&
                  (usecase->stream.out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) &&
                   usecase->stream.out->a2dp_compress_mute) {
                   struct stream_out *out = usecase->stream.out;
                   ALOGD("Unmuting the stream when Bt-A2dp disconnected and stream is mute");
                   out->a2dp_compress_mute = false;
                   out_set_compr_volume(&out->stream, out->volume_l, out->volume_r);
               }
           }
        }
    }
    }


    audio_extn_hfp_set_parameters(adev, parms);
    audio_extn_hfp_set_parameters(adev, parms);