diff options
author | Siddartha Shaik <sshaik@codeaurora.org> | 2017-05-19 15:26:33 +0530 |
---|---|---|
committer | Shiv Maliyappanahalli <smaliyap@codeaurora.org> | 2017-07-27 12:21:40 -0700 |
commit | 31b530e05331742168f0c5e1d3c93dcdc19789d9 (patch) | |
tree | 4493cc2eb66da9e83b31c612287807aaa483af38 /hal/audio_hw.h | |
parent | a427f14cf277e14eeba128c5d23bd42bc747b1bc (diff) | |
download | hardware_qcom_audio-31b530e05331742168f0c5e1d3c93dcdc19789d9.tar.gz hardware_qcom_audio-31b530e05331742168f0c5e1d3c93dcdc19789d9.tar.bz2 hardware_qcom_audio-31b530e05331742168f0c5e1d3c93dcdc19789d9.zip |
audio: hal: Add Hal extension for transcode loopback usecase
Adding HAL extension for transcode hw loopback
Userspace qahwi APIs introduced to exercise this extension
Change-Id: Iffae3f6936c2519f0c5349c2430eb598b97c3364
Diffstat (limited to 'hal/audio_hw.h')
-rw-r--r-- | hal/audio_hw.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/hal/audio_hw.h b/hal/audio_hw.h index 3980ab6c..20edc99c 100644 --- a/hal/audio_hw.h +++ b/hal/audio_hw.h @@ -81,6 +81,12 @@ #define DEFAULT_HDMI_OUT_SAMPLE_RATE 48000 #define DEFAULT_HDMI_OUT_FORMAT AUDIO_FORMAT_PCM_16_BIT +#define SND_CARD_STATE_OFFLINE 0 +#define SND_CARD_STATE_ONLINE 1 + +#define STREAM_DIRECTION_IN 0 +#define STREAM_DIRECTION_OUT 1 + #define MAX_PERF_LOCK_OPTS 20 #define MAX_STREAM_PROFILE_STR_LEN 32 @@ -157,6 +163,7 @@ enum { USECASE_AUDIO_PLAYBACK_EXT_DISP_SILENCE, + USECASE_AUDIO_TRANSCODE_LOOPBACK, AUDIO_USECASE_MAX }; @@ -204,6 +211,20 @@ struct stream_app_type_cfg { int app_type; }; +struct stream_config { + unsigned int sample_rate; + audio_channel_mask_t channel_mask; + audio_format_t format; + audio_devices_t devices; + unsigned int bit_width; +}; +struct stream_inout { + pthread_mutex_t lock; /* see note below on mutex acquisition order */ + pthread_mutex_t pre_lock; /* acquire before lock to avoid DOS by playback thread */ + pthread_cond_t cond; + struct stream_config in_config; + struct stream_config out_config; +}; struct stream_out { struct audio_stream_out stream; pthread_mutex_t lock; /* see note below on mutex acquisition order */ @@ -310,12 +331,14 @@ typedef enum { PCM_CAPTURE, VOICE_CALL, VOIP_CALL, - PCM_HFP_CALL + PCM_HFP_CALL, + TRANSCODE_LOOPBACK } usecase_type_t; union stream_ptr { struct stream_in *in; struct stream_out *out; + struct stream_inout *inout; }; struct audio_usecase { |