summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChaithanya Krishna Bacharaju <chaithan@codeaurora.org>2016-07-21 11:08:56 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-30 23:39:57 -0800
commitf7b4f38b898036b054ccef3f1a69a3422eba554d (patch)
tree324065bfc76a103fc2104efe74e0efd9c3f2b29c /include
parent1f5681eec27020568a5b8adb10f99cf2d20abc49 (diff)
ASoC: msm: qdsp6v2: Extend LSM support to 48khz, 24bit and 4 channel
Enhance LSM code to support maximum configuration of 48khz, 24bit and 4 channel. Change-Id: I03895c983527d87389ca69e85235b1def5b4a2fa Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org> Signed-off-by: Revathi Uddaraju <revathiu@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/apr_audio-v2.h1
-rw-r--r--include/sound/q6lsm.h24
2 files changed, 23 insertions, 2 deletions
diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h
index d8629fed8ab2..1f8bba7e9ab7 100644
--- a/include/sound/apr_audio-v2.h
+++ b/include/sound/apr_audio-v2.h
@@ -9063,6 +9063,7 @@ struct asm_aptx_dec_fmt_blk_v2 {
#define LSM_PARAM_ID_SWMAD_MODEL (0x00012C19)
#define LSM_PARAM_ID_SWMAD_ENABLE (0x00012C1A)
#define LSM_PARAM_ID_POLLING_ENABLE (0x00012C1B)
+#define LSM_PARAM_ID_MEDIA_FMT (0x00012C1E)
#define LSM_PARAM_ID_FWK_MODE_CONFIG (0x00012C27)
/* HW MAD specific */
diff --git a/include/sound/q6lsm.h b/include/sound/q6lsm.h
index 3bcc6c34b39f..4805246766d6 100644
--- a/include/sound/q6lsm.h
+++ b/include/sound/q6lsm.h
@@ -23,6 +23,8 @@
#define ADM_LSM_PORT_ID 0xADCB
+#define LSM_MAX_NUM_CHANNELS 8
+
typedef void (*lsm_app_cb)(uint32_t opcode, uint32_t token,
uint32_t *payload, void *priv);
@@ -51,11 +53,12 @@ struct lsm_lab_buffer {
uint32_t mem_map_handle;
};
-struct lsm_lab_hw_params {
+struct lsm_hw_params {
u16 sample_rate;
u16 sample_size;
u32 buf_sz;
u32 period_count;
+ u16 num_chs;
};
struct lsm_client {
@@ -81,7 +84,7 @@ struct lsm_client {
bool lab_enable;
bool lab_started;
struct lsm_lab_buffer *lab_buffer;
- struct lsm_lab_hw_params hw_params;
+ struct lsm_hw_params hw_params;
bool use_topology;
int session_state;
bool poll_enable;
@@ -153,6 +156,15 @@ struct lsm_param_fwk_mode_cfg {
uint32_t mode;
} __packed;
+struct lsm_param_media_fmt {
+ struct lsm_param_payload_common common;
+ uint32_t minor_version;
+ uint32_t sample_rate;
+ uint16_t num_channels;
+ uint16_t bit_width;
+ uint8_t channel_mapping[LSM_MAX_NUM_CHANNELS];
+} __packed;
+
/*
* This param cannot be sent in this format.
* The actual number of confidence level values
@@ -285,6 +297,13 @@ struct lsm_cmd_set_fwk_mode_cfg {
struct lsm_param_fwk_mode_cfg fwk_mode_cfg;
} __packed;
+struct lsm_cmd_set_media_fmt {
+ struct apr_hdr msg_hdr;
+ struct lsm_set_params_hdr params_hdr;
+ struct lsm_param_media_fmt media_fmt;
+} __packed;
+
+
struct lsm_client *q6lsm_client_alloc(lsm_app_cb cb, void *priv);
void q6lsm_client_free(struct lsm_client *client);
int q6lsm_open(struct lsm_client *client, uint16_t app_id);
@@ -315,4 +334,5 @@ void q6lsm_sm_set_param_data(struct lsm_client *client,
size_t *offset);
int q6lsm_set_port_connected(struct lsm_client *client);
int q6lsm_set_fwk_mode_cfg(struct lsm_client *client, uint32_t event_mode);
+int q6lsm_set_media_fmt_params(struct lsm_client *client);
#endif /* __Q6LSM_H__ */