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

Commit 00fd798a authored by Steve Kondik's avatar Steve Kondik Committed by Ethan Chen
Browse files

hal: Fix digital USB headset combo device

 * Digital USB output was not handled in this case. Add it.

Change-Id: I8e984a2cf545dabdc6dc538b75e8ca7221fb6688
parent b123aca1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1544,7 +1544,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
         * Avoid this by routing audio to speaker until standby.
         */
        if ((out->devices == AUDIO_DEVICE_OUT_AUX_DIGITAL ||
                out->devices == AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET) &&
                out->devices == AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET ||
                out->devices == AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) &&
                val == AUDIO_DEVICE_NONE) {
            val = AUDIO_DEVICE_OUT_SPEAKER;
        }
+3 −1
Original line number Diff line number Diff line
@@ -1035,7 +1035,9 @@ snd_device_t platform_get_output_snd_device(void *platform, audio_devices_t devi
        } else if (devices == (AUDIO_DEVICE_OUT_AUX_DIGITAL |
                               AUDIO_DEVICE_OUT_SPEAKER)) {
            snd_device = SND_DEVICE_OUT_SPEAKER_AND_HDMI;
        } else if (devices == (AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET |
        } else if ((devices == (AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET |
                               AUDIO_DEVICE_OUT_SPEAKER)) ||
                    devices == (AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET |
                               AUDIO_DEVICE_OUT_SPEAKER)) {
            snd_device = SND_DEVICE_OUT_SPEAKER_AND_USB_HEADSET;
        } else {