aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-08-05 05:17:01 -0400
committerTakashi Iwai <tiwai@suse.de>2010-08-05 05:17:01 -0400
commite71981343ad29b5d929f82ac56c0b27b8ea0e540 (patch)
tree47135be4252faecbc0e5508658a58f8afd197fff /include
parent2603798070a80d76e7e6d2992ba4ec74addcec90 (diff)
parentbda7d2a862e6b788bca2d02d38a07966a9c92e48 (diff)
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'include')
-rw-r--r--include/sound/sh_fsi.h49
-rw-r--r--include/sound/soc-dapm.h2
-rw-r--r--include/sound/soc.h21
-rw-r--r--include/sound/tlv320dac33-plat.h2
-rw-r--r--include/sound/uda134x.h12
5 files changed, 80 insertions, 6 deletions
diff --git a/include/sound/sh_fsi.h b/include/sound/sh_fsi.h
index c0227361a876..9d51d6f35893 100644
--- a/include/sound/sh_fsi.h
+++ b/include/sound/sh_fsi.h
@@ -12,6 +12,9 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#define FSI_PORT_A 0
16#define FSI_PORT_B 1
17
15/* flags format 18/* flags format
16 19
17 * 0xABCDEEFF 20 * 0xABCDEEFF
@@ -55,12 +58,14 @@
55#define SH_FSI_GET_IFMT(x) ((x >> 8) & SH_FSI_FMT_MASK) 58#define SH_FSI_GET_IFMT(x) ((x >> 8) & SH_FSI_FMT_MASK)
56#define SH_FSI_GET_OFMT(x) ((x >> 0) & SH_FSI_FMT_MASK) 59#define SH_FSI_GET_OFMT(x) ((x >> 0) & SH_FSI_FMT_MASK)
57 60
58#define SH_FSI_FMT_MONO (1 << 0) 61#define SH_FSI_FMT_MONO 0
59#define SH_FSI_FMT_MONO_DELAY (1 << 1) 62#define SH_FSI_FMT_MONO_DELAY 1
60#define SH_FSI_FMT_PCM (1 << 2) 63#define SH_FSI_FMT_PCM 2
61#define SH_FSI_FMT_I2S (1 << 3) 64#define SH_FSI_FMT_I2S 3
62#define SH_FSI_FMT_TDM (1 << 4) 65#define SH_FSI_FMT_TDM 4
63#define SH_FSI_FMT_TDM_DELAY (1 << 5) 66#define SH_FSI_FMT_TDM_DELAY 5
67#define SH_FSI_FMT_SPDIF 6
68
64 69
65#define SH_FSI_IFMT_TDM_CH(x) \ 70#define SH_FSI_IFMT_TDM_CH(x) \
66 (SH_FSI_IFMT(TDM) | SH_FSI_SET_CH_I(x)) 71 (SH_FSI_IFMT(TDM) | SH_FSI_SET_CH_I(x))
@@ -72,9 +77,41 @@
72#define SH_FSI_OFMT_TDM_DELAY_CH(x) \ 77#define SH_FSI_OFMT_TDM_DELAY_CH(x) \
73 (SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x)) 78 (SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x))
74 79
80
81/*
82 * set_rate return value
83 *
84 * see ACKMD/BPFMD on
85 * ACK_MD (FSI2)
86 * CKG1 (FSI)
87 *
88 * err: return value < 0
89 *
90 * 0x-00000AB
91 *
92 * A: ACKMD value
93 * B: BPFMD value
94 */
95
96#define SH_FSI_ACKMD_MASK (0xF << 0)
97#define SH_FSI_ACKMD_512 (1 << 0)
98#define SH_FSI_ACKMD_256 (2 << 0)
99#define SH_FSI_ACKMD_128 (3 << 0)
100#define SH_FSI_ACKMD_64 (4 << 0)
101#define SH_FSI_ACKMD_32 (5 << 0)
102
103#define SH_FSI_BPFMD_MASK (0xF << 4)
104#define SH_FSI_BPFMD_512 (1 << 4)
105#define SH_FSI_BPFMD_256 (2 << 4)
106#define SH_FSI_BPFMD_128 (3 << 4)
107#define SH_FSI_BPFMD_64 (4 << 4)
108#define SH_FSI_BPFMD_32 (5 << 4)
109#define SH_FSI_BPFMD_16 (6 << 4)
110
75struct sh_fsi_platform_info { 111struct sh_fsi_platform_info {
76 unsigned long porta_flags; 112 unsigned long porta_flags;
77 unsigned long portb_flags; 113 unsigned long portb_flags;
114 int (*set_rate)(int is_porta, int rate); /* for master mode */
78}; 115};
79 116
80extern struct snd_soc_dai fsi_soc_dai[2]; 117extern struct snd_soc_dai fsi_soc_dai[2];
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 66ff4c124dbd..c5d9987bc897 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -273,6 +273,8 @@
273#define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */ 273#define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */
274#define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */ 274#define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */
275#define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */ 275#define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */
276#define SND_SOC_DAPM_PRE_POST_PMD \
277 (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)
276 278
277/* convenience event type detection */ 279/* convenience event type detection */
278#define SND_SOC_DAPM_EVENT_ON(e) \ 280#define SND_SOC_DAPM_EVENT_ON(e) \
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 697e7ffe39d7..65e9d03ed4f5 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -170,6 +170,21 @@
170 .get = xhandler_get, .put = xhandler_put, \ 170 .get = xhandler_get, .put = xhandler_put, \
171 .private_value = (unsigned long)&xenum } 171 .private_value = (unsigned long)&xenum }
172 172
173#define SOC_DOUBLE_R_SX_TLV(xname, xreg_left, xreg_right, xshift,\
174 xmin, xmax, tlv_array) \
175{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
176 .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
177 SNDRV_CTL_ELEM_ACCESS_READWRITE, \
178 .tlv.p = (tlv_array), \
179 .info = snd_soc_info_volsw_2r_sx, \
180 .get = snd_soc_get_volsw_2r_sx, \
181 .put = snd_soc_put_volsw_2r_sx, \
182 .private_value = (unsigned long)&(struct soc_mixer_control) \
183 {.reg = xreg_left, \
184 .rreg = xreg_right, .shift = xshift, \
185 .min = xmin, .max = xmax} }
186
187
173/* 188/*
174 * Simplified versions of above macros, declaring a struct and calculating 189 * Simplified versions of above macros, declaring a struct and calculating
175 * ARRAY_SIZE internally 190 * ARRAY_SIZE internally
@@ -329,6 +344,12 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
329 struct snd_ctl_elem_value *ucontrol); 344 struct snd_ctl_elem_value *ucontrol);
330int snd_soc_limit_volume(struct snd_soc_codec *codec, 345int snd_soc_limit_volume(struct snd_soc_codec *codec,
331 const char *name, int max); 346 const char *name, int max);
347int snd_soc_info_volsw_2r_sx(struct snd_kcontrol *kcontrol,
348 struct snd_ctl_elem_info *uinfo);
349int snd_soc_get_volsw_2r_sx(struct snd_kcontrol *kcontrol,
350 struct snd_ctl_elem_value *ucontrol);
351int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol,
352 struct snd_ctl_elem_value *ucontrol);
332 353
333/** 354/**
334 * struct snd_soc_jack_pin - Describes a pin to update based on jack detection 355 * struct snd_soc_jack_pin - Describes a pin to update based on jack detection
diff --git a/include/sound/tlv320dac33-plat.h b/include/sound/tlv320dac33-plat.h
index 3f428d53195b..6c6649656798 100644
--- a/include/sound/tlv320dac33-plat.h
+++ b/include/sound/tlv320dac33-plat.h
@@ -15,6 +15,8 @@
15 15
16struct tlv320dac33_platform_data { 16struct tlv320dac33_platform_data {
17 int power_gpio; 17 int power_gpio;
18 int mode1_latency; /* latency caused by the i2c writes in us */
19 int auto_fifo_config; /* FIFO config based on the period size */
18 int keep_bclk; /* Keep the BCLK running in FIFO modes */ 20 int keep_bclk; /* Keep the BCLK running in FIFO modes */
19 u8 burst_bclkdiv; 21 u8 burst_bclkdiv;
20}; 22};
diff --git a/include/sound/uda134x.h b/include/sound/uda134x.h
index 509efb050176..e475659bd3be 100644
--- a/include/sound/uda134x.h
+++ b/include/sound/uda134x.h
@@ -18,6 +18,18 @@ struct uda134x_platform_data {
18 struct l3_pins l3; 18 struct l3_pins l3;
19 void (*power) (int); 19 void (*power) (int);
20 int model; 20 int model;
21 /*
22 ALSA SOC usually puts the device in standby mode when it's not used
23 for sometime. If you unset is_powered_on_standby the driver will
24 turn off the ADC/DAC when this callback is invoked and turn it back
25 on when needed. Unfortunately this will result in a very light bump
26 (it can be audible only with good earphones). If this bothers you
27 set is_powered_on_standby, you will have slightly higher power
28 consumption. Please note that sending the L3 command for ADC is
29 enough to make the bump, so it doesn't make difference if you
30 completely take off power from the codec.
31 */
32 int is_powered_on_standby;
21#define UDA134X_UDA1340 1 33#define UDA134X_UDA1340 1
22#define UDA134X_UDA1341 2 34#define UDA134X_UDA1341 2
23#define UDA134X_UDA1344 3 35#define UDA134X_UDA1344 3