Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: Add definitions for CEA-861 Audio InfoFrames

Along with the IEC-60958 channel status word, CEA-861 Audio InfoFrames
are used in HDMI and DisplayPort to describe the parameters of the audio
stream. Hence, drivers for such devices may use these definitions to, for
instance, fill a CEA-861 data structure and pass it to a display driver
to configure an IP.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Ricardo Neri and committed by
Takashi Iwai
7ba1c40b dd775ae2

+55
+14
include/sound/asound.h
··· 70 70 71 71 /**************************************************************************** 72 72 * * 73 + * CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort * 74 + * * 75 + ****************************************************************************/ 76 + 77 + struct snd_cea_861_aud_if { 78 + unsigned char db1_ct_cc; /* coding type and channel count */ 79 + unsigned char db2_sf_ss; /* sample frequency and size */ 80 + unsigned char db3; /* not used, all zeros */ 81 + unsigned char db4_ca; /* channel allocation code */ 82 + unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */ 83 + }; 84 + 85 + /**************************************************************************** 86 + * * 73 87 * Section for driver hardware dependent interface - /dev/snd/hw? * 74 88 * * 75 89 ****************************************************************************/
+41
include/sound/asoundef.h
··· 170 170 #define IEC958_AES5_CON_CGMSA_COPYNOMORE (2<<0) /* condition not be used */ 171 171 #define IEC958_AES5_CON_CGMSA_COPYNEVER (3<<0) /* no copying is permitted */ 172 172 173 + /**************************************************************************** 174 + * * 175 + * CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort * 176 + * * 177 + ****************************************************************************/ 178 + #define CEA861_AUDIO_INFOFRAME_DB1CC (7<<0) /* mask - channel count */ 179 + #define CEA861_AUDIO_INFOFRAME_DB1CT (0xf<<4) /* mask - coding type */ 180 + #define CEA861_AUDIO_INFOFRAME_DB1CT_FROM_STREAM (0<<4) /* refer to stream */ 181 + #define CEA861_AUDIO_INFOFRAME_DB1CT_IEC60958 (1<<4) /* IEC-60958 L-PCM */ 182 + #define CEA861_AUDIO_INFOFRAME_DB1CT_AC3 (2<<4) /* AC-3 */ 183 + #define CEA861_AUDIO_INFOFRAME_DB1CT_MPEG1 (3<<4) /* MPEG1 Layers 1 & 2 */ 184 + #define CEA861_AUDIO_INFOFRAME_DB1CT_MP3 (4<<4) /* MPEG1 Layer 3 */ 185 + #define CEA861_AUDIO_INFOFRAME_DB1CT_MPEG2_MULTICH (5<<4) /* MPEG2 Multichannel */ 186 + #define CEA861_AUDIO_INFOFRAME_DB1CT_AAC (6<<4) /* AAC */ 187 + #define CEA861_AUDIO_INFOFRAME_DB1CT_DTS (7<<4) /* DTS */ 188 + #define CEA861_AUDIO_INFOFRAME_DB1CT_ATRAC (8<<4) /* ATRAC */ 189 + #define CEA861_AUDIO_INFOFRAME_DB1CT_ONEBIT (9<<4) /* One Bit Audio */ 190 + #define CEA861_AUDIO_INFOFRAME_DB1CT_DOLBY_DIG_PLUS (10<<4) /* Dolby Digital + */ 191 + #define CEA861_AUDIO_INFOFRAME_DB1CT_DTS_HD (11<<4) /* DTS-HD */ 192 + #define CEA861_AUDIO_INFOFRAME_DB1CT_MAT (12<<4) /* MAT (MLP) */ 193 + #define CEA861_AUDIO_INFOFRAME_DB1CT_DST (13<<4) /* DST */ 194 + #define CEA861_AUDIO_INFOFRAME_DB1CT_WMA_PRO (14<<4) /* WMA Pro */ 195 + #define CEA861_AUDIO_INFOFRAME_DB2SF (7<<2) /* mask - sample frequency */ 196 + #define CEA861_AUDIO_INFOFRAME_DB2SF_FROM_STREAM (0<<2) /* refer to stream */ 197 + #define CEA861_AUDIO_INFOFRAME_DB2SF_32000 (1<<2) /* 32kHz */ 198 + #define CEA861_AUDIO_INFOFRAME_DB2SF_44100 (2<<2) /* 44.1kHz */ 199 + #define CEA861_AUDIO_INFOFRAME_DB2SF_48000 (3<<2) /* 48kHz */ 200 + #define CEA861_AUDIO_INFOFRAME_DB2SF_88200 (4<<2) /* 88.2kHz */ 201 + #define CEA861_AUDIO_INFOFRAME_DB2SF_96000 (5<<2) /* 96kHz */ 202 + #define CEA861_AUDIO_INFOFRAME_DB2SF_176400 (6<<2) /* 176.4kHz */ 203 + #define CEA861_AUDIO_INFOFRAME_DB2SF_192000 (7<<2) /* 192kHz */ 204 + #define CEA861_AUDIO_INFOFRAME_DB2SS (3<<0) /* mask - sample size */ 205 + #define CEA861_AUDIO_INFOFRAME_DB2SS_FROM_STREAM (0<<0) /* refer to stream */ 206 + #define CEA861_AUDIO_INFOFRAME_DB2SS_16BIT (1<<0) /* 16 bits */ 207 + #define CEA861_AUDIO_INFOFRAME_DB2SS_20BIT (2<<0) /* 20 bits */ 208 + #define CEA861_AUDIO_INFOFRAME_DB2SS_24BIT (3<<0) /* 24 bits */ 209 + #define CEA861_AUDIO_INFOFRAME_DB5_DM_INH (1<<7) /* mask - inhibit downmixing */ 210 + #define CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PERMITTED (0<<7) /* stereo downmix permitted */ 211 + #define CEA861_AUDIO_INFOFRAME_DB5_DM_INH_PROHIBITED (1<<7) /* stereo downmis prohibited */ 212 + #define CEA861_AUDIO_INFOFRAME_DB5_LSV (0xf<<3) /* mask - level-shift values */ 213 + 173 214 /***************************************************************************** 174 215 * * 175 216 * MIDI v1.0 interface *