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

Commit cdece20d authored by Weiyin Jiang's avatar Weiyin Jiang
Browse files

hal: move gef device notification after sample rate adjustment

Device sample rate will be adjusted further within enable_audio_route(),
to broadcast more accurate sample rate info to gef clients, move the
notification after the adjustment made.

Change-Id: I48cf3ed440708e003a3701017c05575fafccfac4
CRs-Fixed: 2483417
parent 11081b3d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2698,15 +2698,17 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
                    (usecase->stream.out->sample_rate < OUTPUT_SAMPLING_RATE_44100)) {
            usecase->stream.out->app_type_cfg.sample_rate = DEFAULT_OUTPUT_SAMPLING_RATE;
        }
    }
    enable_audio_route(adev, usecase);

    /* Notify device change info to effect clients registered */
    if (usecase->type == PCM_PLAYBACK) {
        audio_extn_gef_notify_device_config(
                usecase->stream.out->devices,
                usecase->stream.out->channel_mask,
                usecase->stream.out->app_type_cfg.sample_rate,
                platform_get_snd_device_acdb_id(usecase->out_snd_device));
    }
    enable_audio_route(adev, usecase);

    audio_extn_qdsp_set_device(usecase);