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

Commit 3c9fb7fa authored by Vidyakumar Athota's avatar Vidyakumar Athota
Browse files

hal: Update BT sample rate for BT input device

-BT sample rate should be set before opening BT SCO output
 or input device. Currently it is set only for output device.
-Set sample rate for BT SCO input device also

Change-Id: I356557a727f5946ff3b4eb89ea16e4c16d84d21c
parent 02f6a3cb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -300,10 +300,12 @@ int enable_snd_device(struct audio_device *adev,
     * control in use-case does not work because rate update takes place after
     * AFE port open due to the limitation of mixer control order execution.
     */
    if (snd_device == SND_DEVICE_OUT_BT_SCO) {
    if ((snd_device == SND_DEVICE_OUT_BT_SCO) ||
        (snd_device == SND_DEVICE_IN_BT_SCO_MIC)) {
        audio_route_apply_path(adev->audio_route, BT_SCO_SAMPLE_RATE);
        audio_route_update_mixer(adev->audio_route);
    } else if (snd_device == SND_DEVICE_OUT_BT_SCO_WB) {
    } else if ((snd_device == SND_DEVICE_OUT_BT_SCO_WB) ||
               (snd_device == SND_DEVICE_IN_BT_SCO_MIC_WB)) {
        audio_route_apply_path(adev->audio_route, BT_SCO_WB_SAMPLE_RATE);
        audio_route_update_mixer(adev->audio_route);
    }