diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-02-07 14:17:23 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-07 17:12:37 +0300 |
commit | 77531beeb97d079fb422d2b78a0d75c564384310 (patch) | |
tree | a3137bab83c04a1f58911291fa9cc71fb820fb64 /sound/x86/intel_hdmi_audio.h | |
parent | 1df989242d3d790aec79e72d12874bf763c958e1 (diff) | |
download | linux-77531beeb97d079fb422d2b78a0d75c564384310.tar.xz |
ALSA: x86: Rearrange defines
We have two header files and everything is mixed up chaotically.
Move the chip-specific definitions like the hardware registers to
intel_hdmi_lpe_audio.h, and the rest, the implementation specific
stuff into intel_hdmi_audio.h.
In addition, put some more comments to the register fields, and fix
the incorrect name prefix for AUD_HDMI_STATUS bits, too.
The whole changes are merely a code shuffling, and there is no
functional change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86/intel_hdmi_audio.h')
-rw-r--r-- | sound/x86/intel_hdmi_audio.h | 64 |
1 files changed, 41 insertions, 23 deletions
diff --git a/sound/x86/intel_hdmi_audio.h b/sound/x86/intel_hdmi_audio.h index 7e2546b853ca..fe8d99cb839f 100644 --- a/sound/x86/intel_hdmi_audio.h +++ b/sound/x86/intel_hdmi_audio.h @@ -35,32 +35,50 @@ #define PCM_INDEX 0 #define MAX_PB_STREAMS 1 #define MAX_CAP_STREAMS 0 - -#define HDMI_INFO_FRAME_WORD1 0x000a0184 -#define DP_INFO_FRAME_WORD1 0x00441b84 -#define FIFO_THRESHOLD 0xFE -#define DMA_FIFO_THRESHOLD 0x7 #define BYTES_PER_WORD 0x4 +#define INTEL_HAD "HdmiLpeAudio" + +/* + * CEA speaker placement: + * + * FL FLC FC FRC FR + * + * LFE + * + * RL RLC RC RRC RR + * + * The Left/Right Surround channel _notions_ LS/RS in SMPTE 320M + * corresponds to CEA RL/RR; The SMPTE channel _assignment_ C/LFE is + * swapped to CEA LFE/FC. + */ +enum cea_speaker_placement { + FL = (1 << 0), /* Front Left */ + FC = (1 << 1), /* Front Center */ + FR = (1 << 2), /* Front Right */ + FLC = (1 << 3), /* Front Left Center */ + FRC = (1 << 4), /* Front Right Center */ + RL = (1 << 5), /* Rear Left */ + RC = (1 << 6), /* Rear Center */ + RR = (1 << 7), /* Rear Right */ + RLC = (1 << 8), /* Rear Left Center */ + RRC = (1 << 9), /* Rear Right Center */ + LFE = (1 << 10), /* Low Frequency Effect */ +}; -/* Sampling rate as per IEC60958 Ver 3 */ -#define CH_STATUS_MAP_32KHZ 0x3 -#define CH_STATUS_MAP_44KHZ 0x0 -#define CH_STATUS_MAP_48KHZ 0x2 -#define CH_STATUS_MAP_88KHZ 0x8 -#define CH_STATUS_MAP_96KHZ 0xA -#define CH_STATUS_MAP_176KHZ 0xC -#define CH_STATUS_MAP_192KHZ 0xE +struct cea_channel_speaker_allocation { + int ca_index; + int speakers[8]; -#define MAX_SMPL_WIDTH_20 0x0 -#define MAX_SMPL_WIDTH_24 0x1 -#define SMPL_WIDTH_16BITS 0x1 -#define SMPL_WIDTH_24BITS 0x5 -#define CHANNEL_ALLOCATION 0x1F -#define VALID_DIP_WORDS 3 -#define LAYOUT0 0 -#define LAYOUT1 1 -#define SWAP_LFE_CENTER 0x00fac4c8 -#define AUD_CONFIG_CH_MASK 0x70 + /* derived values, just for convenience */ + int channels; + int spk_mask; +}; + +struct channel_map_table { + unsigned char map; /* ALSA API channel map position */ + unsigned char cea_slot; /* CEA slot value */ + int spk_mask; /* speaker position bit mask */ +}; struct pcm_stream_info { struct snd_pcm_substream *substream; |