summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 17:07:31 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 17:07:31 -0700
commitfaa38b5e0e092914764cdba9f83d31a3f794d182 (patch)
treeb3e5921bdc36378033b4910eb4f29cb0dfc486e0 /include/sound
parent78417334b5cb6e1f915b8fdcc4fce3f1a1b4420c (diff)
parent74bf40f0793fed9e01eb6164c2ce63e8c27ca205 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (214 commits) ALSA: hda - Add pin-fix for HP dc5750 ALSA: als4000: Fix potentially invalid DMA mode setup ALSA: als4000: enable burst mode ALSA: hda - Fix initial capsrc selection in patch_alc269() ASoC: TWL4030: Capture route runtime DAPM ordering fix ALSA: hda - Add PC-beep whitelist for an Intel board ALSA: hda - More relax for pending period handling ALSA: hda - Define AC_FMT_* constants ALSA: hda - Fix beep frequency on IDT 92HD73xx and 92HD71Bxx codecs ALSA: hda - Add support for HDMI HBR passthrough ALSA: hda - Set Stream Type in Stream Format according to AES0 ALSA: hda - Fix Thinkpad X300 so SPDIF is not exposed ALSA: hda - FIX to not expose SPDIF on Thinkpad X301, since it does not have the ability to use SPDIF ASoC: wm9081: fix resource reclaim in wm9081_register error path ASoC: wm8978: fix a memory leak if a wm8978_register fail ASoC: wm8974: fix a memory leak if another WM8974 is registered ASoC: wm8961: fix resource reclaim in wm8961_register error path ASoC: wm8955: fix resource reclaim in wm8955_register error path ASoC: wm8940: fix a memory leak if wm8940_register return error ASoC: wm8904: fix resource reclaim in wm8904_register error path ...
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/asound.h6
-rw-r--r--include/sound/pcm.h6
-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
7 files changed, 90 insertions, 8 deletions
diff --git a/include/sound/asound.h b/include/sound/asound.h
index 9f1eecf99e6b..a1803ecea34d 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -212,7 +212,11 @@ typedef int __bitwise snd_pcm_format_t;
#define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) /* in three bytes */
#define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) /* in three bytes */
#define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) /* in three bytes */
-#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_U18_3BE
+#define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44) /* 8 samples in 3 bytes */
+#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */
+#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */
+#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */
+#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_G723_40_1B
#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 6e3a29732dc4..85f1c6bf8566 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -174,6 +174,10 @@ struct snd_pcm_ops {
#define SNDRV_PCM_FMTBIT_U18_3LE (1ULL << SNDRV_PCM_FORMAT_U18_3LE)
#define SNDRV_PCM_FMTBIT_S18_3BE (1ULL << SNDRV_PCM_FORMAT_S18_3BE)
#define SNDRV_PCM_FMTBIT_U18_3BE (1ULL << SNDRV_PCM_FORMAT_U18_3BE)
+#define SNDRV_PCM_FMTBIT_G723_24 (1ULL << SNDRV_PCM_FORMAT_G723_24)
+#define SNDRV_PCM_FMTBIT_G723_24_1B (1ULL << SNDRV_PCM_FORMAT_G723_24_1B)
+#define SNDRV_PCM_FMTBIT_G723_40 (1ULL << SNDRV_PCM_FORMAT_G723_40)
+#define SNDRV_PCM_FMTBIT_G723_40_1B (1ULL << SNDRV_PCM_FORMAT_G723_40_1B)
#ifdef SNDRV_LITTLE_ENDIAN
#define SNDRV_PCM_FMTBIT_S16 SNDRV_PCM_FMTBIT_S16_LE
@@ -313,7 +317,7 @@ struct snd_pcm_runtime {
struct snd_pcm_mmap_control *control;
/* -- locking / scheduling -- */
- unsigned int twake: 1; /* do transfer (!poll) wakeup */
+ snd_pcm_uframes_t twake; /* do transfer (!poll) wakeup if non-zero */
wait_queue_head_t sleep; /* poll sleep */
wait_queue_head_t tsleep; /* transfer sleep */
struct fasync_struct *fasync;
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 @@
* published by the Free Software Foundation.
*/
+#define FSI_PORT_A 0
+#define FSI_PORT_B 1
+
/* flags format
* 0xABCDEEFF
@@ -55,12 +58,14 @@
#define SH_FSI_GET_IFMT(x) ((x >> 8) & SH_FSI_FMT_MASK)
#define SH_FSI_GET_OFMT(x) ((x >> 0) & SH_FSI_FMT_MASK)
-#define SH_FSI_FMT_MONO (1 << 0)
-#define SH_FSI_FMT_MONO_DELAY (1 << 1)
-#define SH_FSI_FMT_PCM (1 << 2)
-#define SH_FSI_FMT_I2S (1 << 3)
-#define SH_FSI_FMT_TDM (1 << 4)
-#define SH_FSI_FMT_TDM_DELAY (1 << 5)
+#define SH_FSI_FMT_MONO 0
+#define SH_FSI_FMT_MONO_DELAY 1
+#define SH_FSI_FMT_PCM 2
+#define SH_FSI_FMT_I2S 3
+#define SH_FSI_FMT_TDM 4
+#define SH_FSI_FMT_TDM_DELAY 5
+#define SH_FSI_FMT_SPDIF 6
+
#define SH_FSI_IFMT_TDM_CH(x) \
(SH_FSI_IFMT(TDM) | SH_FSI_SET_CH_I(x))
@@ -72,9 +77,41 @@
#define SH_FSI_OFMT_TDM_DELAY_CH(x) \
(SH_FSI_OFMT(TDM_DELAY) | SH_FSI_SET_CH_O(x))
+
+/*
+ * set_rate return value
+ *
+ * see ACKMD/BPFMD on
+ * ACK_MD (FSI2)
+ * CKG1 (FSI)
+ *
+ * err: return value < 0
+ *
+ * 0x-00000AB
+ *
+ * A: ACKMD value
+ * B: BPFMD value
+ */
+
+#define SH_FSI_ACKMD_MASK (0xF << 0)
+#define SH_FSI_ACKMD_512 (1 << 0)
+#define SH_FSI_ACKMD_256 (2 << 0)
+#define SH_FSI_ACKMD_128 (3 << 0)
+#define SH_FSI_ACKMD_64 (4 << 0)
+#define SH_FSI_ACKMD_32 (5 << 0)
+
+#define SH_FSI_BPFMD_MASK (0xF << 4)
+#define SH_FSI_BPFMD_512 (1 << 4)
+#define SH_FSI_BPFMD_256 (2 << 4)
+#define SH_FSI_BPFMD_128 (3 << 4)
+#define SH_FSI_BPFMD_64 (4 << 4)
+#define SH_FSI_BPFMD_32 (5 << 4)
+#define SH_FSI_BPFMD_16 (6 << 4)
+
struct sh_fsi_platform_info {
unsigned long porta_flags;
unsigned long portb_flags;
+ int (*set_rate)(int is_porta, int rate); /* for master mode */
};
extern 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 @@
#define SND_SOC_DAPM_POST_PMD 0x8 /* after widget power down */
#define SND_SOC_DAPM_PRE_REG 0x10 /* before audio path setup */
#define SND_SOC_DAPM_POST_REG 0x20 /* after audio path setup */
+#define SND_SOC_DAPM_PRE_POST_PMD \
+ (SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMD)
/* convenience event type detection */
#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 @@
.get = xhandler_get, .put = xhandler_put, \
.private_value = (unsigned long)&xenum }
+#define SOC_DOUBLE_R_SX_TLV(xname, xreg_left, xreg_right, xshift,\
+ xmin, xmax, tlv_array) \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
+ .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | \
+ SNDRV_CTL_ELEM_ACCESS_READWRITE, \
+ .tlv.p = (tlv_array), \
+ .info = snd_soc_info_volsw_2r_sx, \
+ .get = snd_soc_get_volsw_2r_sx, \
+ .put = snd_soc_put_volsw_2r_sx, \
+ .private_value = (unsigned long)&(struct soc_mixer_control) \
+ {.reg = xreg_left, \
+ .rreg = xreg_right, .shift = xshift, \
+ .min = xmin, .max = xmax} }
+
+
/*
* Simplified versions of above macros, declaring a struct and calculating
* ARRAY_SIZE internally
@@ -329,6 +344,12 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
int snd_soc_limit_volume(struct snd_soc_codec *codec,
const char *name, int max);
+int snd_soc_info_volsw_2r_sx(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_info *uinfo);
+int snd_soc_get_volsw_2r_sx(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol);
+int snd_soc_put_volsw_2r_sx(struct snd_kcontrol *kcontrol,
+ struct snd_ctl_elem_value *ucontrol);
/**
* 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 @@
struct tlv320dac33_platform_data {
int power_gpio;
+ int mode1_latency; /* latency caused by the i2c writes in us */
+ int auto_fifo_config; /* FIFO config based on the period size */
int keep_bclk; /* Keep the BCLK running in FIFO modes */
u8 burst_bclkdiv;
};
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 {
struct l3_pins l3;
void (*power) (int);
int model;
+ /*
+ ALSA SOC usually puts the device in standby mode when it's not used
+ for sometime. If you unset is_powered_on_standby the driver will
+ turn off the ADC/DAC when this callback is invoked and turn it back
+ on when needed. Unfortunately this will result in a very light bump
+ (it can be audible only with good earphones). If this bothers you
+ set is_powered_on_standby, you will have slightly higher power
+ consumption. Please note that sending the L3 command for ADC is
+ enough to make the bump, so it doesn't make difference if you
+ completely take off power from the codec.
+ */
+ int is_powered_on_standby;
#define UDA134X_UDA1340 1
#define UDA134X_UDA1341 2
#define UDA134X_UDA1344 3