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

Commit 2bd75a1d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: Add support for ssr audio feature"

parents 83e17978 6178a3f6
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -53,6 +53,12 @@ ifneq ($(strip $(AUDIO_FEATURE_DISABLED_USBAUDIO)),true)
    LOCAL_SRC_FILES += audio_extn/usb.c
endif

ifneq ($(strip $(AUDIO_FEATURE_DISABLED_SSR)),true)
    LOCAL_CFLAGS += -DSSR_ENABLED
    LOCAL_SRC_FILES += audio_extn/ssr.c
    LOCAL_C_INCLUDES += $(TARGET_OUT_HEADERS)/mm-audio/surround_sound/
endif

LOCAL_SHARED_LIBRARIES := \
	liblog \
	libcutils \
@@ -60,7 +66,6 @@ LOCAL_SHARED_LIBRARIES := \
	libaudioroute \
	libdl


LOCAL_C_INCLUDES += \
	external/tinyalsa/include \
	$(call include-path-for, audio-route) \
+11 −1
Original line number Diff line number Diff line
@@ -51,6 +51,14 @@ void audio_extn_fm_set_parameters(struct audio_device *adev,
                                   struct str_parms *parms);
#endif

#ifndef SSR_ENABLED
#define audio_extn_ssr_get_parameters(query, reply) (0)
#else
void audio_extn_ssr_get_parameters(struct str_parms *query,

                                          struct str_parms *reply);
#endif

#ifndef ANC_HEADSET_ENABLED
#define audio_extn_set_anc_parameters(parms)       (0)
#else
@@ -195,5 +203,7 @@ void audio_extn_get_parameters(const struct audio_device *adev,
                              struct str_parms *reply)
{
    audio_extn_get_afe_proxy_parameters(query, reply);
    ALOGD("%s: exit: returns %s", __func__, str_parms_to_str(reply));
    audio_extn_ssr_get_parameters(query, reply);

    ALOGD("%s: returns %s", __func__, str_parms_to_str(reply));
}
+16 −0
Original line number Diff line number Diff line
@@ -65,4 +65,20 @@ void audio_extn_usb_set_proxy_sound_card(uint32_t sndcard_idx);
bool audio_extn_usb_is_proxy_inuse();
#endif

#ifndef SSR_ENABLED
#define audio_extn_ssr_init(adev, in)                 (0)
#define audio_extn_ssr_deinit()                       (0)
#define audio_extn_ssr_update_enabled(adev)           (0)
#define audio_extn_ssr_get_enabled()                  (0)
#define audio_extn_ssr_read(stream, buffer, bytes)    (0)
#else
int32_t audio_extn_ssr_init(struct audio_device *adev,
                            struct stream_in *in);
int32_t audio_extn_ssr_deinit();
int32_t audio_extn_ssr_update_enabled(struct audio_device *adev);
bool audio_extn_ssr_get_enabled();
int32_t audio_extn_ssr_read(struct audio_stream_in *stream,
                       void *buffer, size_t bytes);
#endif

#endif /* AUDIO_EXTN_H */

hal/audio_extn/ssr.c

0 → 100644
+619 −0

File added.

Preview size limit exceeded, changes collapsed.

+20 −8

File changed.

Preview size limit exceeded, changes collapsed.

Loading