From bd8a71a7b0f50da9350d202d325c3926ffd6b189 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sat, 3 Jan 2009 16:56:56 +0000 Subject: ALSA: Reduce boilerplate for new jack types Use a lookup table rather than explicit code to map input subsystem jack types into ASoC ones, implemented as suggested by Takashi Iwai. Signed-off-by: Mark Brown --- include/sound/jack.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/sound') diff --git a/include/sound/jack.h b/include/sound/jack.h index 2e0315cdd0d..85266a2f5c6 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h @@ -30,6 +30,9 @@ struct input_dev; /** * Jack types which can be reported. These values are used as a * bitmask. + * + * Note that this must be kept in sync with the lookup table in + * sound/core/jack.c. */ enum snd_jack_types { SND_JACK_HEADPHONE = 0x0001, -- cgit v1.2.3 From d506fc322ec2af04fc47be83d796a1c9e1a16022 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Wed, 7 Jan 2009 11:54:25 +0200 Subject: ALSA: Add support for video out to the jack reporting API Add support for reporting new jack types SND_JACK_VIDEOOUT and SND_JACK_AVOUT (a combination of LINEOUT and VIDEOOUT) to the jack reporting API. Also add the corresponding SW_VIDEOOUT_INSERT switch to the input system header. Signed-off-by: Jani Nikula Signed-off-by: Mark Brown --- include/sound/jack.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sound') diff --git a/include/sound/jack.h b/include/sound/jack.h index 85266a2f5c6..6b013c6f6a0 100644 --- a/include/sound/jack.h +++ b/include/sound/jack.h @@ -40,6 +40,8 @@ enum snd_jack_types { SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE, SND_JACK_LINEOUT = 0x0004, SND_JACK_MECHANICAL = 0x0008, /* If detected separately */ + SND_JACK_VIDEOOUT = 0x0010, + SND_JACK_AVOUT = SND_JACK_LINEOUT | SND_JACK_VIDEOOUT, }; struct snd_jack { -- cgit v1.2.3 From cade9f8a9cf1cd41f6f9e8850c6a0465a21248c3 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 19 Jan 2009 12:08:58 +0100 Subject: ALSA: Release v1.0.19 Signed-off-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- include/sound/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/version.h b/include/sound/version.h index 2b48237e23b..a7e74e23ad2 100644 --- a/include/sound/version.h +++ b/include/sound/version.h @@ -1,3 +1,3 @@ /* include/version.h */ -#define CONFIG_SND_VERSION "1.0.18a" +#define CONFIG_SND_VERSION "1.0.19" #define CONFIG_SND_DATE "" -- cgit v1.2.3 From a17ac45a5da76f851faf0b6502f66c1205159469 Mon Sep 17 00:00:00 2001 From: Krzysztof Helt Date: Wed, 21 Jan 2009 15:14:09 +0100 Subject: ALSA: ad1816a: enable hardware timer Enable hardware timer with 10 usec resolution. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai --- include/sound/ad1816a.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sound') diff --git a/include/sound/ad1816a.h b/include/sound/ad1816a.h index b3aa62ee3c8..d010858c33c 100644 --- a/include/sound/ad1816a.h +++ b/include/sound/ad1816a.h @@ -169,5 +169,7 @@ extern int snd_ad1816a_create(struct snd_card *card, unsigned long port, extern int snd_ad1816a_pcm(struct snd_ad1816a *chip, int device, struct snd_pcm **rpcm); extern int snd_ad1816a_mixer(struct snd_ad1816a *chip); +extern int snd_ad1816a_timer(struct snd_ad1816a *chip, int device, + struct snd_timer **rtimer); #endif /* __SOUND_AD1816A_H */ -- cgit v1.2.3 From bb9f113f5ca7d182256dee69bcaebd4c79062305 Mon Sep 17 00:00:00 2001 From: Jaswinder Singh Rajput Date: Fri, 30 Jan 2009 22:33:29 +0530 Subject: headers_check fix: sound/hdsp.h fix the following 'make headers_check' warning: usr/include/sound/hdsp.h:33: found __[us]{8,16,32,64} type without #include Signed-off-by: Jaswinder Singh Rajput --- include/sound/hdsp.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sound') diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h index dec6b1dc37e..d98a78dff2d 100644 --- a/include/sound/hdsp.h +++ b/include/sound/hdsp.h @@ -19,6 +19,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include + #define HDSP_MATRIX_MIXER_SIZE 2048 enum HDSP_IO_Type { -- cgit v1.2.3 From e0d80648c0037b8b815317a52b782d4ea0c287f0 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 5 Feb 2009 09:17:50 +0100 Subject: ALSA: hwdep - Fix coding style Fix misc coding style issues in hwdep.h and add some comments. Signed-off-by: Takashi Iwai --- include/sound/hwdep.h | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'include/sound') diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h index d9eea013c75..8c05e47a409 100644 --- a/include/sound/hwdep.h +++ b/include/sound/hwdep.h @@ -27,18 +27,28 @@ struct snd_hwdep; +/* hwdep file ops; all ops can be NULL */ struct snd_hwdep_ops { - long long (*llseek) (struct snd_hwdep *hw, struct file * file, long long offset, int orig); - long (*read) (struct snd_hwdep *hw, char __user *buf, long count, loff_t *offset); - long (*write) (struct snd_hwdep *hw, const char __user *buf, long count, loff_t *offset); - int (*open) (struct snd_hwdep * hw, struct file * file); - int (*release) (struct snd_hwdep *hw, struct file * file); - unsigned int (*poll) (struct snd_hwdep *hw, struct file * file, poll_table * wait); - int (*ioctl) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg); - int (*ioctl_compat) (struct snd_hwdep *hw, struct file * file, unsigned int cmd, unsigned long arg); - int (*mmap) (struct snd_hwdep *hw, struct file * file, struct vm_area_struct * vma); - int (*dsp_status) (struct snd_hwdep *hw, struct snd_hwdep_dsp_status *status); - int (*dsp_load) (struct snd_hwdep *hw, struct snd_hwdep_dsp_image *image); + long long (*llseek)(struct snd_hwdep *hw, struct file *file, + long long offset, int orig); + long (*read)(struct snd_hwdep *hw, char __user *buf, + long count, loff_t *offset); + long (*write)(struct snd_hwdep *hw, const char __user *buf, + long count, loff_t *offset); + int (*open)(struct snd_hwdep *hw, struct file * file); + int (*release)(struct snd_hwdep *hw, struct file * file); + unsigned int (*poll)(struct snd_hwdep *hw, struct file *file, + poll_table *wait); + int (*ioctl)(struct snd_hwdep *hw, struct file *file, + unsigned int cmd, unsigned long arg); + int (*ioctl_compat)(struct snd_hwdep *hw, struct file *file, + unsigned int cmd, unsigned long arg); + int (*mmap)(struct snd_hwdep *hw, struct file *file, + struct vm_area_struct *vma); + int (*dsp_status)(struct snd_hwdep *hw, + struct snd_hwdep_dsp_status *status); + int (*dsp_load)(struct snd_hwdep *hw, + struct snd_hwdep_dsp_image *image); }; struct snd_hwdep { @@ -61,9 +71,9 @@ struct snd_hwdep { void (*private_free) (struct snd_hwdep *hwdep); struct mutex open_mutex; - int used; - unsigned int dsp_loaded; - unsigned int exclusive: 1; + int used; /* reference counter */ + unsigned int dsp_loaded; /* bit fields of loaded dsp indices */ + unsigned int exclusive:1; /* exclusive access mode */ }; extern int snd_hwdep_new(struct snd_card *card, char *id, int device, -- cgit v1.2.3 From e6161653094f14b1add10efe3493a2e526fe9538 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Thu, 5 Feb 2009 13:01:54 +0100 Subject: ALSA: snd_pcm_new api cleanup Impact: cleanup snd_pcm_new takes a char *id argument, although it is not modifying the string. it can therefore be declared as const char *id. Signed-off-by: Tim Blechmann Signed-off-by: Takashi Iwai --- include/sound/pcm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 40c5a6fa6bc..ee0e887e49d 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -451,7 +451,7 @@ struct snd_pcm_notify { extern const struct file_operations snd_pcm_f_ops[2]; -int snd_pcm_new(struct snd_card *card, char *id, int device, +int snd_pcm_new(struct snd_card *card, const char *id, int device, int playback_count, int capture_count, struct snd_pcm **rpcm); int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count); -- cgit v1.2.3 From e4967d6016b7785edafdb871e6d3e4426cb4bd1f Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Thu, 5 Feb 2009 13:10:59 +0100 Subject: ALSA: Add ALSA driver for Atmel Audio Bitstream DAC This patch adds ALSA support for the Audio Bistream DAC found on Atmel AVR32 devices. The ABDAC is an Atmel IP which might show up on AT91 devices in the future, hence making a generic driver which can be utilized by AT91 arch if needed. Datasheet describing the ABDAC peripheral is available in the AT32AP7000 datasheet, http://www.atmel.com/dyn/products/datasheets.asp?family_id=682 Tested on ATSTK1006 + ATSTK1000 with a class D amplifier stage. Signed-off-by: Hans-Christian Egtvedt Signed-off-by: Takashi Iwai --- include/sound/atmel-abdac.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 include/sound/atmel-abdac.h (limited to 'include/sound') diff --git a/include/sound/atmel-abdac.h b/include/sound/atmel-abdac.h new file mode 100644 index 00000000000..edff6a8ba1b --- /dev/null +++ b/include/sound/atmel-abdac.h @@ -0,0 +1,23 @@ +/* + * Driver for the Atmel Audio Bitstream DAC (ABDAC) + * + * Copyright (C) 2009 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ +#ifndef __INCLUDE_SOUND_ATMEL_ABDAC_H +#define __INCLUDE_SOUND_ATMEL_ABDAC_H + +#include + +/** + * struct atmel_abdac_pdata - board specific ABDAC configuration + * @dws: DMA slave interface to use for sound playback. + */ +struct atmel_abdac_pdata { + struct dw_dma_slave dws; +}; + +#endif /* __INCLUDE_SOUND_ATMEL_ABDAC_H */ -- cgit v1.2.3 From 4ede028f8716523fc31e0d3d01b81405613dfb8f Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Thu, 5 Feb 2009 13:11:00 +0100 Subject: ALSA: Add ALSA driver for Atmel AC97 controller This patch adds ALSA support for the AC97 controller found on Atmel AVR32 devices. Tested on ATSTK1006 + ATSTK1000 with a development board with a AC97 codec. Signed-off-by: Hans-Christian Egtvedt Signed-off-by: Takashi Iwai --- include/sound/atmel-ac97c.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 include/sound/atmel-ac97c.h (limited to 'include/sound') diff --git a/include/sound/atmel-ac97c.h b/include/sound/atmel-ac97c.h new file mode 100644 index 00000000000..e6aabdb4586 --- /dev/null +++ b/include/sound/atmel-ac97c.h @@ -0,0 +1,40 @@ +/* + * Driver for the Atmel AC97C controller + * + * Copyright (C) 2005-2009 Atmel Corporation + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ +#ifndef __INCLUDE_SOUND_ATMEL_AC97C_H +#define __INCLUDE_SOUND_ATMEL_AC97C_H + +#include + +#define AC97C_CAPTURE 0x01 +#define AC97C_PLAYBACK 0x02 +#define AC97C_BOTH (AC97C_CAPTURE | AC97C_PLAYBACK) + +/** + * struct atmel_ac97c_pdata - board specific AC97C configuration + * @rx_dws: DMA slave interface to use for sound capture. + * @tx_dws: DMA slave interface to use for sound playback. + * @reset_pin: GPIO pin wired to the reset input on the external AC97 codec, + * optional to use, set to -ENODEV if not in use. AC97 layer will + * try to do a software reset of the external codec anyway. + * @flags: Flags for which directions should be enabled. + * + * If the user do not want to use a DMA channel for playback or capture, i.e. + * only one feature is required on the board. The slave for playback or capture + * can be set to NULL. The AC97C driver will take use of this when setting up + * the sound streams. + */ +struct ac97c_platform_data { + struct dw_dma_slave rx_dws; + struct dw_dma_slave tx_dws; + unsigned int flags; + int reset_pin; +}; + +#endif /* __INCLUDE_SOUND_ATMEL_AC97C_H */ -- cgit v1.2.3 From 8bd4bb7a35e8ebb015a531218614c48e10a3c4ee Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 30 Jan 2009 17:27:45 +0100 Subject: ALSA: Add subdevice_mask field to quirk entries Introduced a new field, subdevice_mask, which specifies the bitmask to match with the given subdevice ID. Signed-off-by: Takashi Iwai --- include/sound/core.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'include/sound') diff --git a/include/sound/core.h b/include/sound/core.h index f632484bc74..f67952a61a2 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -446,21 +446,33 @@ static inline int __snd_bug_on(int cond) struct snd_pci_quirk { unsigned short subvendor; /* PCI subvendor ID */ unsigned short subdevice; /* PCI subdevice ID */ + unsigned short subdevice_mask; /* bitmask to match */ int value; /* value */ #ifdef CONFIG_SND_DEBUG_VERBOSE const char *name; /* name of the device (optional) */ #endif }; -#define _SND_PCI_QUIRK_ID(vend,dev) \ - .subvendor = (vend), .subdevice = (dev) +#define _SND_PCI_QUIRK_ID_MASK(vend, mask, dev) \ + .subvendor = (vend), .subdevice = (dev), .subdevice_mask = (mask) +#define _SND_PCI_QUIRK_ID(vend, dev) \ + _SND_PCI_QUIRK_ID_MASK(vend, 0xffff, dev) #define SND_PCI_QUIRK_ID(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)} #ifdef CONFIG_SND_DEBUG_VERBOSE #define SND_PCI_QUIRK(vend,dev,xname,val) \ {_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)} +#define SND_PCI_QUIRK_VENDOR(vend, xname, val) \ + {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val), .name = (xname)} +#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \ + {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), \ + .value = (val), .name = (xname)} #else #define SND_PCI_QUIRK(vend,dev,xname,val) \ {_SND_PCI_QUIRK_ID(vend, dev), .value = (val)} +#define SND_PCI_QUIRK_MASK(vend, mask, dev, xname, val) \ + {_SND_PCI_QUIRK_ID_MASK(vend, mask, dev), .value = (val)} +#define SND_PCI_QUIRK_VENDOR(vend, xname, val) \ + {_SND_PCI_QUIRK_ID_MASK(vend, 0, 0), .value = (val)} #endif const struct snd_pci_quirk * -- cgit v1.2.3 From c2b73d1458014a9f461b75bc1756a699a6c0781f Mon Sep 17 00:00:00 2001 From: Krzysztof Helt Date: Mon, 16 Feb 2009 21:38:37 +0100 Subject: ALSA: cs4236: cs4232 and cs4236 driver merge to solve PnP BIOS detection cs4232 and cs4236 driver merge to solve PnP BIOS detection. Also, the patch adds recognition if the chip is cs4236b+ or earlier part. This unifies drivers for both cs4232 and cs4236+ chips. It allows to use the PnP BIOS detection for the cs4236+ chips. Previously, only the snd-cs4232 could be detected by the PnP BIOS. The cs4232+ cards reports two separate PnP BIOS ids. The patch adds search for the second id to find out resources assigned to a control port. Signed-off-by: Krzysztof Helt Signed-off-by: Takashi Iwai --- include/sound/wss.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/sound') diff --git a/include/sound/wss.h b/include/sound/wss.h index fd01f22825c..6d65f322f1d 100644 --- a/include/sound/wss.h +++ b/include/sound/wss.h @@ -154,6 +154,7 @@ int snd_wss_create(struct snd_card *card, unsigned short hardware, unsigned short hwshare, struct snd_wss **rchip); +int snd_wss_free(struct snd_wss *chip); int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); int snd_wss_mixer(struct snd_wss *chip); -- cgit v1.2.3 From ce71bfd1aa6d6a4069929eeceed254e13400ddf4 Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Sun, 22 Feb 2009 20:33:41 +0100 Subject: ALSA: ALS4000, slight mixer improvements - add 8kHz / 20 kHz low-pass filter switch control - add ALS4000 Mono capture route control - add annotations to specs pages - improve ALS4000 PM saved regs selection (remove SB dummy register, add missing ones) - add some missing ALS4000 register defines - constify two variables Signed-off-by: Andreas Mohr Signed-off-by: Takashi Iwai --- include/sound/sb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/sb.h b/include/sound/sb.h index 85f93c5fe1e..4e62ee1e411 100644 --- a/include/sound/sb.h +++ b/include/sound/sb.h @@ -249,6 +249,7 @@ struct snd_sb { #define SB_ALS4000_3D_AUTO_MUTE 0x52 #define SB_ALS4000_ANALOG_BLOCK_CTRL 0x53 #define SB_ALS4000_3D_DELAYLINE_PATTERN 0x54 +#define SB_ALS4000_CR3_CONFIGURATION 0xc3 /* bit 7 is Digital Loop Enable */ #define SB_ALS4000_QSOUND 0xdb /* IRQ setting bitmap */ @@ -330,7 +331,8 @@ enum { SB_MIX_DOUBLE, SB_MIX_INPUT_SW, SB_MIX_CAPTURE_PRO, - SB_MIX_CAPTURE_DT019X + SB_MIX_CAPTURE_DT019X, + SB_MIX_MONO_CAPTURE_ALS4K }; #define SB_MIXVAL_DOUBLE(left_reg, right_reg, left_shift, right_shift, mask) \ -- cgit v1.2.3 From 85122ea40c4fc82af5b66b8683f525c2c4a36d1a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 6 Mar 2009 16:30:07 +0100 Subject: ALSA: Remove unneeded snd_pcm_substream.timer_lock The timer callbacks are called in the protected status by the lock of the timer instance, so there is no need for an extra lock in the PCM substream. Signed-off-by: Takashi Iwai --- include/sound/pcm.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 40c5a6fa6bc..e4f60076e6c 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -364,7 +364,6 @@ struct snd_pcm_substream { /* -- timer section -- */ struct snd_timer *timer; /* timer */ unsigned timer_running: 1; /* time is running */ - spinlock_t timer_lock; /* -- next substream -- */ struct snd_pcm_substream *next; /* -- linked substreams -- */ -- cgit v1.2.3 From f5b1db634280ecaf3147ee996f26aad0ed4828c4 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 16 Jan 2009 18:15:22 +0100 Subject: ALSA: add snd_ctl_add_slave_uncached() Added snd_ctl_add_slave_uncached() function to add a slave element with volatile controls. The values of normal slave elements are supposed to be cachable, i.e. they are changed only via the put callbacks. OTOH, when a slave element is volatile and its values may be changed by other reason (e.g. hardware status change), the values will get inconsistent. The new function allows the slave elements with volatile changes. When the slave is tied with this call, the native get callback is issued at each time so that the values are always updated. Signed-off-by: Takashi Iwai --- include/sound/control.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'include/sound') diff --git a/include/sound/control.h b/include/sound/control.h index 4721b4bba05..4cf8f7aaa13 100644 --- a/include/sound/control.h +++ b/include/sound/control.h @@ -171,6 +171,22 @@ int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol, */ struct snd_kcontrol *snd_ctl_make_virtual_master(char *name, const unsigned int *tlv); -int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave); - +int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, + unsigned int flags); +/* optional flags for slave */ +#define SND_CTL_SLAVE_NEED_UPDATE (1 << 0) + +static inline int +snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) +{ + return _snd_ctl_add_slave(master, slave, 0); +} + +static inline int +snd_ctl_add_slave_uncached(struct snd_kcontrol *master, + struct snd_kcontrol *slave) +{ + return _snd_ctl_add_slave(master, slave, SND_CTL_SLAVE_NEED_UPDATE); +} + #endif /* __SOUND_CONTROL_H */ -- cgit v1.2.3 From 79c7cdd5441f5d3900c1632adcc8cd2bee35c8da Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 9 Feb 2009 14:47:19 +0100 Subject: ALSA: Add kernel-doc comments to vmaster stuff Signed-off-by: Takashi Iwai --- include/sound/control.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'include/sound') diff --git a/include/sound/control.h b/include/sound/control.h index 4cf8f7aaa13..ef96f07aa03 100644 --- a/include/sound/control.h +++ b/include/sound/control.h @@ -176,12 +176,44 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave, /* optional flags for slave */ #define SND_CTL_SLAVE_NEED_UPDATE (1 << 0) +/** + * snd_ctl_add_slave - Add a virtual slave control + * @master: vmaster element + * @slave: slave element to add + * + * Add a virtual slave control to the given master element created via + * snd_ctl_create_virtual_master() beforehand. + * Returns zero if successful or a negative error code. + * + * All slaves must be the same type (returning the same information + * via info callback). The fucntion doesn't check it, so it's your + * responsibility. + * + * Also, some additional limitations: + * at most two channels, + * logarithmic volume control (dB level) thus no linear volume, + * master can only attenuate the volume without gain + */ static inline int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave) { return _snd_ctl_add_slave(master, slave, 0); } +/** + * snd_ctl_add_slave_uncached - Add a virtual slave control + * @master: vmaster element + * @slave: slave element to add + * + * Add a virtual slave control to the given master. + * Unlike snd_ctl_add_slave(), the element added via this function + * is supposed to have volatile values, and get callback is called + * at each time quried from the master. + * + * When the control peeks the hardware values directly and the value + * can be changed by other means than the put callback of the element, + * this function should be used to keep the value always up-to-date. + */ static inline int snd_ctl_add_slave_uncached(struct snd_kcontrol *master, struct snd_kcontrol *slave) -- cgit v1.2.3 From 118dd6bfe7e0cddc8ab417ead19cc76000e92773 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 23 Feb 2009 16:35:21 +0100 Subject: ALSA: Clean up snd_monitor_file management Use the standard linked list for snd_monitor_file management. Also, move the list deletion of shutdown_list element into snd_disconnect_release() (for simplification). Signed-off-by: Takashi Iwai --- include/sound/core.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/sound') diff --git a/include/sound/core.h b/include/sound/core.h index f632484bc74..bd4529e0c27 100644 --- a/include/sound/core.h +++ b/include/sound/core.h @@ -97,9 +97,9 @@ struct snd_device { struct snd_monitor_file { struct file *file; - struct snd_monitor_file *next; const struct file_operations *disconnected_f_op; - struct list_head shutdown_list; + struct list_head shutdown_list; /* still need to shutdown */ + struct list_head list; /* link of monitor files */ }; /* main structure for soundcard */ @@ -134,7 +134,7 @@ struct snd_card { struct snd_info_entry *proc_id; /* the card id */ struct proc_dir_entry *proc_root_link; /* number link to real id */ - struct snd_monitor_file *files; /* all files associated to this card */ + struct list_head files_list; /* all files associated to this card */ struct snd_shutdown_f_ops *s_f_ops; /* file operations in the shutdown state */ spinlock_t files_lock; /* lock the files for this card */ -- cgit v1.2.3 From 9a1b64caac82aa02cb74587ffc798e6f42c6170a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 11 Feb 2009 17:03:49 +0100 Subject: ALSA: rawmidi - Refactor rawmidi open/close codes Refactor rawmidi open/close code messes. Signed-off-by: Takashi Iwai --- include/sound/rawmidi.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h index b550a416d07..c23c2658570 100644 --- a/include/sound/rawmidi.h +++ b/include/sound/rawmidi.h @@ -42,7 +42,6 @@ #define SNDRV_RAWMIDI_LFLG_INPUT (1<<1) #define SNDRV_RAWMIDI_LFLG_OPEN (3<<0) #define SNDRV_RAWMIDI_LFLG_APPEND (1<<2) -#define SNDRV_RAWMIDI_LFLG_NOOPENLOCK (1<<3) struct snd_rawmidi; struct snd_rawmidi_substream; -- cgit v1.2.3 From 47e78ecc2adb778c7d2b54924e90433a0182a6ba Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 11 Mar 2009 09:50:19 +0100 Subject: ALSA: Remove obsolete snd_xferv struct and ioctls Removed obsleted snd_xferv struct and ioctls that are no longer used in the current codebase. Signed-off-by: Takashi Iwai --- include/sound/asound.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'include/sound') diff --git a/include/sound/asound.h b/include/sound/asound.h index 1c02ed1d7c4..b6e01e6b3f8 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -919,18 +919,4 @@ struct snd_ctl_event { #define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" #define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what -/* - * - */ - -struct snd_xferv { - const struct iovec *vector; - unsigned long count; -}; - -enum { - SNDRV_IOCTL_READV = _IOW('K', 0x00, struct snd_xferv), - SNDRV_IOCTL_WRITEV = _IOW('K', 0x01, struct snd_xferv), -}; - #endif /* __SOUND_ASOUND_H */ -- cgit v1.2.3 From 78a05b522044a50dc2a6811d10b9ee3f7c3e78f8 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 11 Mar 2009 09:52:28 +0100 Subject: ALSA: Use define for ioctl definitions Use define instead of enum for ioctl definitions since strace can't parse ioctls defined via enum properly. Signed-off-by: Takashi Iwai --- include/sound/asound.h | 171 +++++++++++++++++++++------------------------- include/sound/sfnt_info.h | 14 ++-- 2 files changed, 85 insertions(+), 100 deletions(-) (limited to 'include/sound') diff --git a/include/sound/asound.h b/include/sound/asound.h index b6e01e6b3f8..fad3e0c7b93 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -126,12 +126,10 @@ struct snd_hwdep_dsp_image { unsigned long driver_data; /* W: driver-specific data */ }; -enum { - SNDRV_HWDEP_IOCTL_PVERSION = _IOR ('H', 0x00, int), - SNDRV_HWDEP_IOCTL_INFO = _IOR ('H', 0x01, struct snd_hwdep_info), - SNDRV_HWDEP_IOCTL_DSP_STATUS = _IOR('H', 0x02, struct snd_hwdep_dsp_status), - SNDRV_HWDEP_IOCTL_DSP_LOAD = _IOW('H', 0x03, struct snd_hwdep_dsp_image) -}; +#define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int) +#define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info) +#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status) +#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) /***************************************************************************** * * @@ -451,40 +449,35 @@ enum { SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, }; -enum { - SNDRV_PCM_IOCTL_PVERSION = _IOR('A', 0x00, int), - SNDRV_PCM_IOCTL_INFO = _IOR('A', 0x01, struct snd_pcm_info), - SNDRV_PCM_IOCTL_TSTAMP = _IOW('A', 0x02, int), - SNDRV_PCM_IOCTL_TTSTAMP = _IOW('A', 0x03, int), - SNDRV_PCM_IOCTL_HW_REFINE = _IOWR('A', 0x10, struct snd_pcm_hw_params), - SNDRV_PCM_IOCTL_HW_PARAMS = _IOWR('A', 0x11, struct snd_pcm_hw_params), - SNDRV_PCM_IOCTL_HW_FREE = _IO('A', 0x12), - SNDRV_PCM_IOCTL_SW_PARAMS = _IOWR('A', 0x13, struct snd_pcm_sw_params), - SNDRV_PCM_IOCTL_STATUS = _IOR('A', 0x20, struct snd_pcm_status), - SNDRV_PCM_IOCTL_DELAY = _IOR('A', 0x21, snd_pcm_sframes_t), - SNDRV_PCM_IOCTL_HWSYNC = _IO('A', 0x22), - SNDRV_PCM_IOCTL_SYNC_PTR = _IOWR('A', 0x23, struct snd_pcm_sync_ptr), - SNDRV_PCM_IOCTL_CHANNEL_INFO = _IOR('A', 0x32, struct snd_pcm_channel_info), - SNDRV_PCM_IOCTL_PREPARE = _IO('A', 0x40), - SNDRV_PCM_IOCTL_RESET = _IO('A', 0x41), - SNDRV_PCM_IOCTL_START = _IO('A', 0x42), - SNDRV_PCM_IOCTL_DROP = _IO('A', 0x43), - SNDRV_PCM_IOCTL_DRAIN = _IO('A', 0x44), - SNDRV_PCM_IOCTL_PAUSE = _IOW('A', 0x45, int), - SNDRV_PCM_IOCTL_REWIND = _IOW('A', 0x46, snd_pcm_uframes_t), - SNDRV_PCM_IOCTL_RESUME = _IO('A', 0x47), - SNDRV_PCM_IOCTL_XRUN = _IO('A', 0x48), - SNDRV_PCM_IOCTL_FORWARD = _IOW('A', 0x49, snd_pcm_uframes_t), - SNDRV_PCM_IOCTL_WRITEI_FRAMES = _IOW('A', 0x50, struct snd_xferi), - SNDRV_PCM_IOCTL_READI_FRAMES = _IOR('A', 0x51, struct snd_xferi), - SNDRV_PCM_IOCTL_WRITEN_FRAMES = _IOW('A', 0x52, struct snd_xfern), - SNDRV_PCM_IOCTL_READN_FRAMES = _IOR('A', 0x53, struct snd_xfern), - SNDRV_PCM_IOCTL_LINK = _IOW('A', 0x60, int), - SNDRV_PCM_IOCTL_UNLINK = _IO('A', 0x61), -}; - -/* Trick to make alsa-lib/acinclude.m4 happy */ -#define SNDRV_PCM_IOCTL_REWIND SNDRV_PCM_IOCTL_REWIND +#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) +#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) +#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) +#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int) +#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params) +#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params) +#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12) +#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params) +#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status) +#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) +#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) +#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) +#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) +#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) +#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) +#define SNDRV_PCM_IOCTL_START _IO('A', 0x42) +#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43) +#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44) +#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int) +#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t) +#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47) +#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48) +#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t) +#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi) +#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi) +#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern) +#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern) +#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int) +#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) /***************************************************************************** * * @@ -538,14 +531,12 @@ struct snd_rawmidi_status { unsigned char reserved[16]; /* reserved for future use */ }; -enum { - SNDRV_RAWMIDI_IOCTL_PVERSION = _IOR('W', 0x00, int), - SNDRV_RAWMIDI_IOCTL_INFO = _IOR('W', 0x01, struct snd_rawmidi_info), - SNDRV_RAWMIDI_IOCTL_PARAMS = _IOWR('W', 0x10, struct snd_rawmidi_params), - SNDRV_RAWMIDI_IOCTL_STATUS = _IOWR('W', 0x20, struct snd_rawmidi_status), - SNDRV_RAWMIDI_IOCTL_DROP = _IOW('W', 0x30, int), - SNDRV_RAWMIDI_IOCTL_DRAIN = _IOW('W', 0x31, int), -}; +#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int) +#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info) +#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params) +#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status) +#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int) +#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int) /* * Timer section - /dev/snd/timer @@ -654,23 +645,21 @@ struct snd_timer_status { unsigned char reserved[64]; /* reserved */ }; -enum { - SNDRV_TIMER_IOCTL_PVERSION = _IOR('T', 0x00, int), - SNDRV_TIMER_IOCTL_NEXT_DEVICE = _IOWR('T', 0x01, struct snd_timer_id), - SNDRV_TIMER_IOCTL_TREAD = _IOW('T', 0x02, int), - SNDRV_TIMER_IOCTL_GINFO = _IOWR('T', 0x03, struct snd_timer_ginfo), - SNDRV_TIMER_IOCTL_GPARAMS = _IOW('T', 0x04, struct snd_timer_gparams), - SNDRV_TIMER_IOCTL_GSTATUS = _IOWR('T', 0x05, struct snd_timer_gstatus), - SNDRV_TIMER_IOCTL_SELECT = _IOW('T', 0x10, struct snd_timer_select), - SNDRV_TIMER_IOCTL_INFO = _IOR('T', 0x11, struct snd_timer_info), - SNDRV_TIMER_IOCTL_PARAMS = _IOW('T', 0x12, struct snd_timer_params), - SNDRV_TIMER_IOCTL_STATUS = _IOR('T', 0x14, struct snd_timer_status), - /* The following four ioctls are changed since 1.0.9 due to confliction */ - SNDRV_TIMER_IOCTL_START = _IO('T', 0xa0), - SNDRV_TIMER_IOCTL_STOP = _IO('T', 0xa1), - SNDRV_TIMER_IOCTL_CONTINUE = _IO('T', 0xa2), - SNDRV_TIMER_IOCTL_PAUSE = _IO('T', 0xa3), -}; +#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int) +#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id) +#define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int) +#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo) +#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams) +#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus) +#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select) +#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info) +#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params) +#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status) +/* The following four ioctls are changed since 1.0.9 due to confliction */ +#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0) +#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1) +#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2) +#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3) struct snd_timer_read { unsigned int resolution; @@ -847,33 +836,31 @@ struct snd_ctl_tlv { unsigned int tlv[0]; /* first TLV */ }; -enum { - SNDRV_CTL_IOCTL_PVERSION = _IOR('U', 0x00, int), - SNDRV_CTL_IOCTL_CARD_INFO = _IOR('U', 0x01, struct snd_ctl_card_info), - SNDRV_CTL_IOCTL_ELEM_LIST = _IOWR('U', 0x10, struct snd_ctl_elem_list), - SNDRV_CTL_IOCTL_ELEM_INFO = _IOWR('U', 0x11, struct snd_ctl_elem_info), - SNDRV_CTL_IOCTL_ELEM_READ = _IOWR('U', 0x12, struct snd_ctl_elem_value), - SNDRV_CTL_IOCTL_ELEM_WRITE = _IOWR('U', 0x13, struct snd_ctl_elem_value), - SNDRV_CTL_IOCTL_ELEM_LOCK = _IOW('U', 0x14, struct snd_ctl_elem_id), - SNDRV_CTL_IOCTL_ELEM_UNLOCK = _IOW('U', 0x15, struct snd_ctl_elem_id), - SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS = _IOWR('U', 0x16, int), - SNDRV_CTL_IOCTL_ELEM_ADD = _IOWR('U', 0x17, struct snd_ctl_elem_info), - SNDRV_CTL_IOCTL_ELEM_REPLACE = _IOWR('U', 0x18, struct snd_ctl_elem_info), - SNDRV_CTL_IOCTL_ELEM_REMOVE = _IOWR('U', 0x19, struct snd_ctl_elem_id), - SNDRV_CTL_IOCTL_TLV_READ = _IOWR('U', 0x1a, struct snd_ctl_tlv), - SNDRV_CTL_IOCTL_TLV_WRITE = _IOWR('U', 0x1b, struct snd_ctl_tlv), - SNDRV_CTL_IOCTL_TLV_COMMAND = _IOWR('U', 0x1c, struct snd_ctl_tlv), - SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE = _IOWR('U', 0x20, int), - SNDRV_CTL_IOCTL_HWDEP_INFO = _IOR('U', 0x21, struct snd_hwdep_info), - SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE = _IOR('U', 0x30, int), - SNDRV_CTL_IOCTL_PCM_INFO = _IOWR('U', 0x31, struct snd_pcm_info), - SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE = _IOW('U', 0x32, int), - SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE = _IOWR('U', 0x40, int), - SNDRV_CTL_IOCTL_RAWMIDI_INFO = _IOWR('U', 0x41, struct snd_rawmidi_info), - SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE = _IOW('U', 0x42, int), - SNDRV_CTL_IOCTL_POWER = _IOWR('U', 0xd0, int), - SNDRV_CTL_IOCTL_POWER_STATE = _IOR('U', 0xd1, int), -}; +#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) +#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info) +#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list) +#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info) +#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value) +#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value) +#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id) +#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id) +#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int) +#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info) +#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info) +#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id) +#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv) +#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv) +#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv) +#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int) +#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info) +#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int) +#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info) +#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int) +#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) +#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info) +#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) +#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) +#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) /* * Read interface. diff --git a/include/sound/sfnt_info.h b/include/sound/sfnt_info.h index 5d1ab9c4950..1bce7fd1725 100644 --- a/include/sound/sfnt_info.h +++ b/include/sound/sfnt_info.h @@ -202,13 +202,11 @@ struct snd_emux_misc_mode { int value2; /* reserved */ }; -enum { - SNDRV_EMUX_IOCTL_VERSION = _IOR('H', 0x80, unsigned int), - SNDRV_EMUX_IOCTL_LOAD_PATCH = _IOWR('H', 0x81, struct soundfont_patch_info), - SNDRV_EMUX_IOCTL_RESET_SAMPLES = _IO('H', 0x82), - SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES = _IO('H', 0x83), - SNDRV_EMUX_IOCTL_MEM_AVAIL = _IOW('H', 0x84, int), - SNDRV_EMUX_IOCTL_MISC_MODE = _IOWR('H', 0x84, struct snd_emux_misc_mode), -}; +#define SNDRV_EMUX_IOCTL_VERSION _IOR('H', 0x80, unsigned int) +#define SNDRV_EMUX_IOCTL_LOAD_PATCH _IOWR('H', 0x81, struct soundfont_patch_info) +#define SNDRV_EMUX_IOCTL_RESET_SAMPLES _IO('H', 0x82) +#define SNDRV_EMUX_IOCTL_REMOVE_LAST_SAMPLES _IO('H', 0x83) +#define SNDRV_EMUX_IOCTL_MEM_AVAIL _IOW('H', 0x84, int) +#define SNDRV_EMUX_IOCTL_MISC_MODE _IOWR('H', 0x84, struct snd_emux_misc_mode) #endif /* __SOUND_SFNT_INFO_H */ -- cgit v1.2.3 From 323a59613e5be6094c93261486de48a08d3a53f2 Mon Sep 17 00:00:00 2001 From: Dmitry Artamonow Date: Fri, 13 Mar 2009 01:03:49 +0100 Subject: ALSA: drop outdated and broken sa11xx-uda1341 driver It depends on L3 support from 2.4 kernel (CONFIG_L3) that never got merged into mainline. Since there's no way to use it on any of supported machines (iPaq h3100 or h3600), better drop it for now. It can be reimplemented later using ASoC infrastructure (there's already a driver for uda1341 codec in mainline, so only CPU and machine parts need to be written). Signed-off-by: Dmitry Artamonow Cc: Russell King Signed-off-by: Takashi Iwai --- include/sound/uda1341.h | 126 ------------------------------------------------ 1 file changed, 126 deletions(-) delete mode 100644 include/sound/uda1341.h (limited to 'include/sound') diff --git a/include/sound/uda1341.h b/include/sound/uda1341.h deleted file mode 100644 index 110d5dc3a2b..00000000000 --- a/include/sound/uda1341.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * linux/include/linux/l3/uda1341.h - * - * Philips UDA1341 mixer device driver for ALSA - * - * Copyright (c) 2002 Tomas Kasparek - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License. - * - * History: - * - * 2002-03-13 Tomas Kasparek Initial release - based on uda1341.h from OSS - * 2002-03-30 Tomas Kasparek Proc filesystem support, complete mixer and DSP - * features support - */ - -#define UDA1341_ALSA_NAME "snd-uda1341" - -/* - * Default rate set after inicialization - */ -#define AUDIO_RATE_DEFAULT 44100 - -/* - * UDA1341 L3 address and command types - */ -#define UDA1341_L3ADDR 5 -#define UDA1341_DATA0 (UDA1341_L3ADDR << 2 | 0) -#define UDA1341_DATA1 (UDA1341_L3ADDR << 2 | 1) -#define UDA1341_STATUS (UDA1341_L3ADDR << 2 | 2) - -enum uda1341_onoff { - OFF=0, - ON, -}; - -enum uda1341_format { - I2S=0, - LSB16, - LSB18, - LSB20, - MSB, - LSB16MSB, - LSB18MSB, - LSB20MSB, -}; - -enum uda1341_fs { - F512=0, - F384, - F256, - Funused, -}; - -enum uda1341_peak { - BEFORE=0, - AFTER, -}; - -enum uda1341_filter { - FLAT=0, - MIN, - MIN2, - MAX, -}; - -enum uda1341_mixer { - DOUBLE, - LINE, - MIC, - MIXER, -}; - -enum uda1341_deemp { - NONE, - D32, - D44, - D48, -}; - -enum uda1341_config { - CMD_READ_REG = 0, - CMD_RESET, - CMD_FS, - CMD_FORMAT, - CMD_OGAIN, - CMD_IGAIN, - CMD_DAC, - CMD_ADC, - CMD_VOLUME, - CMD_BASS, - CMD_TREBBLE, - CMD_PEAK, - CMD_DEEMP, - CMD_MUTE, - CMD_FILTER, - CMD_CH1, - CMD_CH2, - CMD_MIC, - CMD_MIXER, - CMD_AGC, - CMD_IG, - CMD_AGC_TIME, - CMD_AGC_LEVEL, -#ifdef CONFIG_PM - CMD_SUSPEND, - CMD_RESUME, -#endif - CMD_LAST, -}; - -enum write_through { - //used in update_bits (write_cfg) to avoid l3_write - just update local copy of regs. - REGS_ONLY=0, - //update local regs and write value to uda1341 - do l3_write - FLUSH, -}; - -int __init snd_chip_uda1341_mixer_new(struct snd_card *card, struct l3_client **clnt); - -/* - * Local variables: - * indent-tabs-mode: t - * End: - */ -- cgit v1.2.3 From 85efde6f4e0de9577256c5f0030088d3fd4347c1 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 26 Feb 2009 00:51:39 +0100 Subject: make exported headers use strict posix types A number of standard posix types are used in exported headers, which is not allowed if __STRICT_KERNEL_NAMES is defined. In order to get rid of the non-__STRICT_KERNEL_NAMES part and to make sane headers the default, we have to change them all to safe types. There are also still some leftovers in reiserfs_fs.h, elfcore.h and coda.h, but these files have not compiled in user space for a long time. This leaves out the various integer types ({u_,u,}int{8,16,32,64}_t), which we take care of separately. Signed-off-by: Arnd Bergmann Acked-by: Mauro Carvalho Chehab Cc: David Airlie Cc: Arnaldo Carvalho de Melo Cc: YOSHIFUJI Hideaki Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: David Woodhouse Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar --- include/sound/asound.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/sound') diff --git a/include/sound/asound.h b/include/sound/asound.h index 1c02ed1d7c4..16684c5a608 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -385,7 +385,7 @@ struct snd_pcm_sw_params { struct snd_pcm_channel_info { unsigned int channel; - off_t offset; /* mmap offset */ + __kernel_off_t offset; /* mmap offset */ unsigned int first; /* offset to first sample in bits */ unsigned int step; /* samples distance in bits */ }; @@ -789,7 +789,7 @@ struct snd_ctl_elem_info { snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ unsigned int count; /* count of values */ - pid_t owner; /* owner's PID of this control */ + __kernel_pid_t owner; /* owner's PID of this control */ union { struct { long min; /* R: minimum value */ -- cgit v1.2.3 From 9adfbfb611307060db54691bc7e6d53fdc12312b Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 26 Feb 2009 00:51:40 +0100 Subject: make most exported headers use strict integer types This takes care of all files that have only a small number of non-strict integer type uses. Signed-off-by: Arnd Bergmann Cc: Mauro Carvalho Chehab Cc: David Airlie Cc: Arnaldo Carvalho de Melo Cc: YOSHIFUJI Hideaki Cc: netdev@vger.kernel.org Cc: linux-ppp@vger.kernel.org Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: David Woodhouse Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar --- include/sound/asound.h | 5 +++-- include/sound/emu10k1.h | 12 ++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'include/sound') diff --git a/include/sound/asound.h b/include/sound/asound.h index 16684c5a608..d9beda5f74a 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -23,9 +23,10 @@ #ifndef __SOUND_ASOUND_H #define __SOUND_ASOUND_H +#include + #ifdef __KERNEL__ #include -#include #include #include @@ -342,7 +343,7 @@ struct snd_interval { #define SNDRV_MASK_MAX 256 struct snd_mask { - u_int32_t bits[(SNDRV_MASK_MAX+31)/32]; + __u32 bits[(SNDRV_MASK_MAX+31)/32]; }; struct snd_pcm_hw_params { diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index 10ee28eac01..c380056ff26 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -1,6 +1,8 @@ #ifndef __SOUND_EMU10K1_H #define __SOUND_EMU10K1_H +#include + /* * Copyright (c) by Jaroslav Kysela , * Creative Labs, Inc. @@ -34,6 +36,8 @@ #include #include #include +#include + #include /* ------------------- DEFINES -------------------- */ @@ -2171,7 +2175,7 @@ struct snd_emu10k1_fx8010_code { char name[128]; DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ - u_int32_t __user *gpr_map; /* initializers */ + __u32 __user *gpr_map; /* initializers */ unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */ @@ -2184,11 +2188,11 @@ struct snd_emu10k1_fx8010_code { struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ - u_int32_t __user *tram_data_map; /* data initializers */ - u_int32_t __user *tram_addr_map; /* map initializers */ + __u32 __user *tram_data_map; /* data initializers */ + __u32 __user *tram_addr_map; /* map initializers */ DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ - u_int32_t __user *code; /* one instruction - 64 bits */ + __u32 __user *code; /* one instruction - 64 bits */ }; struct snd_emu10k1_fx8010_tram { -- cgit v1.2.3 From f9f35677d81adb0feedcd6e0e661784805c8facd Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 26 Feb 2009 09:57:27 +0100 Subject: emu101k1.h: fix duplicate include of Impact: cleanup The earlier patch 'make most exported headers use strict integer types' accidentally includes both from the common and from the kernel-only parts. Signed-off-by: Arnd Bergmann Acked-by: Takashi Iwai Signed-off-by: H. Peter Anvin Signed-off-by: Ingo Molnar --- include/sound/emu10k1.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h index c380056ff26..6a664c3f7c1 100644 --- a/include/sound/emu10k1.h +++ b/include/sound/emu10k1.h @@ -36,7 +36,6 @@ #include #include #include -#include #include -- cgit v1.2.3 From 9b76ede411145d7456ae5e467b65003ca7990b06 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 27 Feb 2009 11:51:24 -0300 Subject: V4L/DVB (10771): tea575x-tuner: convert it to V4L2 API Signed-off-by: Mauro Carvalho Chehab --- include/sound/tea575x-tuner.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/sound') diff --git a/include/sound/tea575x-tuner.h b/include/sound/tea575x-tuner.h index 426899e529c..5718a02d3af 100644 --- a/include/sound/tea575x-tuner.h +++ b/include/sound/tea575x-tuner.h @@ -22,8 +22,9 @@ * */ -#include +#include #include +#include struct snd_tea575x; @@ -35,11 +36,10 @@ struct snd_tea575x_ops { struct snd_tea575x { struct snd_card *card; - struct video_device vd; /* video device */ - struct v4l2_file_operations fops; + struct video_device *vd; /* video device */ int dev_nr; /* requested device number + 1 */ - int vd_registered; /* video device is registered */ int tea5759; /* 5759 chip is present */ + int mute; /* Device is muted? */ unsigned int freq_fixup; /* crystal onboard */ unsigned int val; /* hw value */ unsigned long freq; /* frequency */ -- cgit v1.2.3