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

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

Merge "qdsp6v2: Add support for suspend command for WMA decoder"

parents a2f5ccad 325cd59d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -179,6 +179,16 @@ static int audio_aio_pause(struct q6audio_aio *audio)
			pr_err("%s[%p]: pause cmd failed rc=%d\n",
				__func__, audio, rc);

		if (rc == 0) {
			/* Send suspend only if pause was successful */
			rc = q6asm_cmd(audio->ac, CMD_SUSPEND);
			if (rc < 0)
				pr_err("%s[%p]: suspend cmd failed rc=%d\n",
					__func__, audio, rc);
		} else
			pr_err("%s[%p]: not sending suspend since pause failed\n",
				__func__, audio);

	} else
		pr_err("%s[%p]: Driver not enabled\n", __func__, audio);
	return rc;
+1 −0
Original line number Diff line number Diff line
@@ -3706,6 +3706,7 @@ struct asm_session_cmd_run_v2 {
} __packed;

#define ASM_SESSION_CMD_PAUSE 0x00010BD3
#define ASM_SESSION_CMD_SUSPEND 0x00010DEC
#define ASM_SESSION_CMD_GET_SESSIONTIME_V3 0x00010D9D
#define ASM_SESSION_CMD_REGISTER_FOR_RX_UNDERFLOW_EVENTS 0x00010BD5

+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@
#define CMD_EOS            0x0003
#define CMD_CLOSE          0x0004
#define CMD_OUT_FLUSH      0x0005
#define CMD_SUSPEND        0x0006

/* bit 0:1 represents priority of stream */
#define STREAM_PRIORITY_NORMAL	0x0000
+6 −0
Original line number Diff line number Diff line
@@ -1225,6 +1225,7 @@ static int32_t q6asm_callback(struct apr_client_data *data, void *priv)
					data->payload_size))
				break;
		case ASM_SESSION_CMD_PAUSE:
		case ASM_SESSION_CMD_SUSPEND:
		case ASM_DATA_CMD_EOS:
		case ASM_STREAM_CMD_CLOSE:
		case ASM_STREAM_CMD_FLUSH:
@@ -3897,6 +3898,11 @@ int q6asm_cmd(struct audio_client *ac, int cmd)
		hdr.opcode = ASM_SESSION_CMD_PAUSE;
		state = &ac->cmd_state;
		break;
	case CMD_SUSPEND:
		pr_debug("%s:CMD_SUSPEND\n", __func__);
		hdr.opcode = ASM_SESSION_CMD_SUSPEND;
		state = &ac->cmd_state;
		break;
	case CMD_FLUSH:
		pr_debug("%s:CMD_FLUSH\n", __func__);
		hdr.opcode = ASM_STREAM_CMD_FLUSH;