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

Commit 27dd145f authored by Weiyin Jiang's avatar Weiyin Jiang
Browse files

audio: notify device info twice for combo output

For combo output, GEF needs to notify splitted device info twice.

CRs-Fixed: 2489086
Change-Id: I337ae614606f823cf0843a645185fe001fc344fa
parent 40dcdb9b
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -2701,16 +2701,6 @@ int select_devices(struct audio_device *adev, audio_usecase_t uc_id)
    }
    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),
                usecase->stream.out->app_type_cfg.app_type);
    }

    audio_extn_qdsp_set_device(usecase);

    /* If input stream is already running then effect needs to be
+11 −0
Original line number Diff line number Diff line
@@ -3696,6 +3696,17 @@ int platform_send_audio_calibration(void *platform, struct audio_usecase *usecas
                  __func__, new_snd_device[i]);
            return -EINVAL;
        }

        /* 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,
                    sample_rate,
                    acdb_dev_id,
                    usecase->stream.out->app_type_cfg.app_type);
        }

        ALOGV("%s: sending audio calibration for snd_device(%d) acdb_id(%d)",
              __func__, new_snd_device[i], acdb_dev_id);
        if (new_snd_device[i] >= SND_DEVICE_OUT_BEGIN &&
+11 −0
Original line number Diff line number Diff line
@@ -558,6 +558,17 @@ int platform_send_audio_calibration(void *platform, struct audio_usecase *usecas
              __func__, snd_device);
        return -EINVAL;
    }

    /* 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,
                acdb_dev_id,
                usecase->stream.out->app_type_cfg.app_type);
    }

    if (my_data->acdb_send_audio_cal) {
        ("%s: sending audio calibration for snd_device(%d) acdb_id(%d)",
              __func__, snd_device, acdb_dev_id);
+11 −0
Original line number Diff line number Diff line
@@ -4913,6 +4913,17 @@ int platform_send_audio_calibration(void *platform, struct audio_usecase *usecas
                  __func__, new_snd_device[i]);
            return -EINVAL;
        }

        /* 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,
                    sample_rate,
                    acdb_dev_id,
                    usecase->stream.out->app_type_cfg.app_type);
        }

        ALOGV("%s: sending audio calibration for snd_device(%d) acdb_id(%d)",
              __func__, new_snd_device[i], acdb_dev_id);
        if (new_snd_device[i] >= SND_DEVICE_OUT_BEGIN &&