summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBen Romberger <bromberg@codeaurora.org>2017-04-06 17:23:15 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-18 18:11:32 -0700
commit8f1e5633e3ec3ffc66963f0a53426238c6e7c6e3 (patch)
treec43dccd41d5c0651cbccfd52da6a3b002d5dbc10 /include
parent5404e35069576a8cd8203065f60975e34a5f727b (diff)
ASoC: msm: qdsp6v2: Add IEC61937 compressed HDMI pass-though
Add support for IEC61937 which is an audio packaging standard used for compressed HDMI pass-through. Any audio format can be sent through HDMI pass-through formatted as IEC61937. Change-Id: I09821add306e2aeae6530cecbac189471a55e589 Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/apr_audio-v2.h32
-rw-r--r--include/sound/q6asm-v2.h5
2 files changed, 37 insertions, 0 deletions
diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h
index 084232a1d06e..1f19ff2210f8 100644
--- a/include/sound/apr_audio-v2.h
+++ b/include/sound/apr_audio-v2.h
@@ -4006,6 +4006,32 @@ struct asm_generic_compressed_fmt_blk_t {
} __packed;
+
+/* Command to send sample rate & channels for IEC61937 (compressed) or IEC60958
+ * (pcm) streams. Both audio standards use the same format and are used for
+ * HDMI or SPDIF.
+ */
+#define ASM_DATA_CMD_IEC_60958_MEDIA_FMT 0x0001321E
+
+struct asm_iec_compressed_fmt_blk_t {
+ struct apr_hdr hdr;
+
+ /*
+ * Nominal sampling rate of the incoming bitstream.
+ * Supported values: 8000, 11025, 16000, 22050, 24000, 32000,
+ * 44100, 48000, 88200, 96000, 176400, 192000,
+ * 352800, 384000
+ */
+ uint32_t sampling_rate;
+
+ /*
+ * Number of channels of the incoming bitstream.
+ * Supported values: 1,2,3,4,5,6,7,8
+ */
+ uint32_t num_channels;
+
+} __packed;
+
struct asm_multi_channel_pcm_fmt_blk_v2 {
struct apr_hdr hdr;
struct asm_data_cmd_media_fmt_update_v2 fmt_blk;
@@ -5071,6 +5097,11 @@ struct asm_amrwbplus_fmt_blk_v2 {
#define ASM_MEDIA_FMT_APE 0x00012F32
#define ASM_MEDIA_FMT_DSD 0x00012F3E
#define ASM_MEDIA_FMT_TRUEHD 0x00013215
+/* 0x0 is used for fomat ID since ADSP dynamically determines the
+ * format encapsulated in the IEC61937 (compressed) or IEC60958
+ * (pcm) packets.
+ */
+#define ASM_MEDIA_FMT_IEC 0x00000000
/* Media format ID for adaptive transform acoustic coding. This
* ID is used by the #ASM_STREAM_CMD_OPEN_WRITE_COMPRESSED command
@@ -10544,6 +10575,7 @@ enum {
COMPRESSED_PASSTHROUGH_DSD,
LISTEN,
COMPRESSED_PASSTHROUGH_GEN,
+ COMPRESSED_PASSTHROUGH_IEC61937
};
#define AUDPROC_MODULE_ID_COMPRESSED_MUTE 0x00010770
diff --git a/include/sound/q6asm-v2.h b/include/sound/q6asm-v2.h
index 42dd677610d9..1873e801552c 100644
--- a/include/sound/q6asm-v2.h
+++ b/include/sound/q6asm-v2.h
@@ -56,6 +56,7 @@
#define FORMAT_APTX 0x001e
#define FORMAT_GEN_COMPR 0x001f
#define FORMAT_TRUEHD 0x0020
+#define FORMAT_IEC61937 0x0021
#define ENCDEC_SBCBITRATE 0x0001
#define ENCDEC_IMMEDIATE_DECODE 0x0002
@@ -509,6 +510,10 @@ int q6asm_media_format_block_gen_compr(
bool use_default_chmap, char *channel_map,
uint16_t bits_per_sample);
+int q6asm_media_format_block_iec(
+ struct audio_client *ac,
+ uint32_t rate, uint32_t channels);
+
int q6asm_media_format_block_multi_ch_pcm_v3(struct audio_client *ac,
uint32_t rate, uint32_t channels,
bool use_default_chmap,