Merge "dsp: Add support for EOS V2"
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

當前提交
4ec39896a8
@@ -728,6 +728,7 @@ static void compr_event_handler(uint32_t opcode,
|
||||
break;
|
||||
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS_V2:
|
||||
spin_lock_irqsave(&prtd->lock, flags);
|
||||
pr_debug("%s: ASM_DATA_CMDRSP_EOS token 0x%x,stream id %d\n",
|
||||
__func__, token, stream_id);
|
||||
|
@@ -176,6 +176,7 @@ static void event_handler(uint32_t opcode,
|
||||
break;
|
||||
}
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS_V2:
|
||||
pr_debug("ASM_DATA_EVENT_RENDERED_EOS\n");
|
||||
clear_bit(CMD_EOS, &prtd->cmd_pending);
|
||||
wake_up(&the_locks.eos_wait);
|
||||
|
@@ -39,6 +39,7 @@ void q6asm_in_cb(uint32_t opcode, uint32_t token,
|
||||
wake_up(&audio->write_wait);
|
||||
break;
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS_V2:
|
||||
audio->eos_rsp = 1;
|
||||
wake_up(&audio->read_wait);
|
||||
break;
|
||||
|
@@ -24,6 +24,7 @@ void q6_audio_cb(uint32_t opcode, uint32_t token,
|
||||
case ASM_DATA_EVENT_WRITE_DONE_V2:
|
||||
case ASM_DATA_EVENT_READ_DONE_V2:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS_V2:
|
||||
case ASM_DATA_CMD_MEDIA_FMT_UPDATE_V2:
|
||||
case ASM_STREAM_CMD_SET_ENCDEC_PARAM:
|
||||
case ASM_DATA_EVENT_SR_CM_CHANGE_NOTIFY:
|
||||
@@ -60,6 +61,7 @@ void audio_aio_cb(uint32_t opcode, uint32_t token,
|
||||
audio_aio_async_read_ack(audio, token, payload);
|
||||
break;
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS_V2:
|
||||
/* EOS Handle */
|
||||
pr_debug("%s[%pK]:ASM_DATA_CMDRSP_EOS\n", __func__, audio);
|
||||
if (audio->feedback) { /* Non-Tunnel mode */
|
||||
|
@@ -1984,6 +1984,7 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)
|
||||
data->token, data->payload_size, data->src_port,
|
||||
data->dest_port);
|
||||
if ((data->opcode != ASM_DATA_EVENT_RENDERED_EOS) &&
|
||||
(data->opcode != ASM_DATA_EVENT_RENDERED_EOS_V2) &&
|
||||
(data->opcode != ASM_DATA_EVENT_EOS) &&
|
||||
(data->opcode != ASM_SESSION_EVENTX_OVERFLOW) &&
|
||||
(data->opcode != ASM_SESSION_EVENT_RX_UNDERFLOW)) {
|
||||
@@ -2010,6 +2011,7 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)
|
||||
case ASM_SESSION_CMD_PAUSE:
|
||||
case ASM_SESSION_CMD_SUSPEND:
|
||||
case ASM_DATA_CMD_EOS:
|
||||
case ASM_DATA_CMD_EOS_V2:
|
||||
case ASM_STREAM_CMD_CLOSE:
|
||||
case ASM_STREAM_CMD_FLUSH:
|
||||
case ASM_SESSION_CMD_RUN_V2:
|
||||
@@ -2347,6 +2349,7 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)
|
||||
}
|
||||
case ASM_DATA_EVENT_EOS:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS:
|
||||
case ASM_DATA_EVENT_RENDERED_EOS_V2:
|
||||
pr_debug("%s: EOS ACK received: rxed session %d opcode 0x%x token 0x%x src %d dest %d\n",
|
||||
__func__, ac->session,
|
||||
data->opcode, data->token,
|
||||
@@ -10374,7 +10377,7 @@ static int __q6asm_cmd(struct audio_client *ac, int cmd, uint32_t stream_id)
|
||||
break;
|
||||
case CMD_EOS:
|
||||
pr_debug("%s: CMD_EOS\n", __func__);
|
||||
hdr.opcode = ASM_DATA_CMD_EOS;
|
||||
hdr.opcode = ASM_DATA_CMD_EOS_V2;
|
||||
atomic_set(&ac->cmd_state, 0);
|
||||
state = &ac->cmd_state;
|
||||
break;
|
||||
@@ -10524,7 +10527,7 @@ static int __q6asm_cmd_nowait(struct audio_client *ac, int cmd,
|
||||
break;
|
||||
case CMD_EOS:
|
||||
pr_debug("%s: CMD_EOS\n", __func__);
|
||||
hdr.opcode = ASM_DATA_CMD_EOS;
|
||||
hdr.opcode = ASM_DATA_CMD_EOS_V2;
|
||||
break;
|
||||
case CMD_CLOSE:
|
||||
pr_debug("%s: CMD_CLOSE\n", __func__);
|
||||
|
@@ -7247,6 +7247,9 @@ struct asm_data_cmd_read_v2 {
|
||||
#define ASM_DATA_EVENT_RENDERED_EOS 0x00010C1C
|
||||
#define ASM_DATA_EVENT_EOS 0x00010BDD
|
||||
|
||||
#define ASM_DATA_CMD_EOS_V2 0x00012F3C
|
||||
#define ASM_DATA_EVENT_RENDERED_EOS_V2 0x00012F3D
|
||||
|
||||
#define ASM_DATA_EVENT_WRITE_DONE_V2 0x00010D99
|
||||
struct asm_data_event_write_done_v2 {
|
||||
u32 buf_addr_lsw;
|
||||
|
Reference in New Issue
Block a user