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

Commit e675595a authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat
Browse files

hal: Add support for 24 bit playback for internal codec

 -end to end 24 bit playback is not working and backend is always getting
  configured to 16 bit only.
 -Added mixer ctl for internal codec to support e2e 24 bit playback

Change-Id: I11113562bdebd80025e42c3b5840654f66b41785
parent 2cbadd92
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3290,8 +3290,15 @@ int platform_set_codec_backend_cfg(struct audio_device* adev,
    ALOGV("%s bit width: %d, sample rate: %d", __func__, bit_width, sample_rate);

    int ret = 0;
    const char *snd_card_name = mixer_get_name(adev->mixer);
    if (bit_width != adev->cur_codec_backend_bit_width) {
        const char * mixer_ctl_name = "SLIM_0_RX Format";
        const char * mixer_ctl_name;
        if (!strncmp(snd_card_name, "msm8952-tomtom-snd-card",
                 sizeof("msm8952-tomtom-snd-card"))) {
            mixer_ctl_name = "SLIM_0_RX Format";
        }
        else
            mixer_ctl_name = "MI2S_RX Format";
        struct  mixer_ctl *ctl;
        ctl = mixer_get_ctl_by_name(adev->mixer, mixer_ctl_name);
        if (!ctl) {