2 * sound/soc/blackfin/bf5xx-ac97.h
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
12 /* Frame format in memory, only support stereo currently */
14 u16 ac97_tag
; /* slot 0 */
15 u16 ac97_addr
; /* slot 1 */
16 u16 ac97_data
; /* slot 2 */
17 u16 ac97_pcm_l
; /*slot 3:front left*/
18 u16 ac97_pcm_r
; /*slot 4:front left*/
19 #if defined(CONFIG_SND_BF5XX_MULTICHAN_SUPPORT)
21 u16 ac97_center
; /*slot 6:center*/
22 u16 ac97_sl
; /*slot 7:surround left*/
23 u16 ac97_sr
; /*slot 8:surround right*/
24 u16 ac97_lfe
; /*slot 9:lfe*/
26 } __attribute__ ((packed
));
28 /* Speaker location */
36 #define SP_STEREO (SP_FL | SP_FR)
37 #define SP_2DOT1 (SP_FL | SP_FR | SP_LFE)
38 #define SP_QUAD (SP_FL | SP_FR | SP_SL | SP_SR)
39 #define SP_5DOT1 (SP_FL | SP_FR | SP_FC | SP_LFE | SP_SL | SP_SR)
41 #define TAG_VALID 0x8000
42 #define TAG_CMD 0x6000
43 #define TAG_PCM_LEFT 0x1000
44 #define TAG_PCM_RIGHT 0x0800
45 #define TAG_PCM_MDM_L1 0x0400
46 #define TAG_PCM_CENTER 0x0200
47 #define TAG_PCM_SL 0x0100
48 #define TAG_PCM_SR 0x0080
49 #define TAG_PCM_LFE 0x0040
51 void bf5xx_pcm_to_ac97(struct ac97_frame
*dst
, const __u16
*src
, \
52 size_t count
, unsigned int chan_mask
);
54 void bf5xx_ac97_to_pcm(const struct ac97_frame
*src
, __u16
*dst
, \