Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.alsa-project.org/alsa-kernel
Browse files Browse the repository at this point in the history
* 'for-linus' of git://git.alsa-project.org/alsa-kernel: (179 commits)
  ALSA: Release v1.0.17
  ALSA: correct kcalloc usage
  ALSA: ALSA driver for SGI O2 audio board
  ALSA: asoc: kbuild - only show menus for the current ASoC CPU platform.
  ALSA: ALSA driver for SGI HAL2 audio device
  ALSA: hda - Fix FSC V5505 model
  ALSA: hda - Fix missing init for unsol events on micsense model
  ALSA: hda - Fix internal mic vref pin setup
  ALSA: hda: 92hd71bxx PC Beep
  ALSA: HDA - HP dc7600 with pci sub IDs 0x103c/0x3011 belongs to hp-3013 model
  ALSA: usb-audio: add some Yamaha USB MIDI quirks
  ALSA: usb-audio: fix Yamaha KX quirk
  ALSA: ASoC: Au12x0/Au1550 PSC Audio support
  ALSA: Add Yamaha KX49 (USB MIDI controller) to usbquirks.h
  ALSA: ASoC: pxa2xx-ac97: fix warning due to missing argument in fuction declaration
  ALSA: tosa: fix compilation with new DAPM API
  ALSA: wavefront - add const
  ALSA: remove CONFIG_KMOD from sound
  ALSA: Fix a const to non-const assignment in the Digigram VXpocket sound driver
  ALSA: Fix a const pointer usage warning in the Digigram VX soundcard driver
  ...
  • Loading branch information
Linus Torvalds committed Jul 14, 2008
2 parents b7f80af + fe0a3fe commit b5cf43c
Show file tree
Hide file tree
Showing 201 changed files with 16,473 additions and 3,893 deletions.
17 changes: 14 additions & 3 deletions Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

[Multiple options for each card instance]
model - force the model name
position_fix - Fix DMA pointer (0 = auto, 1 = none, 2 = POSBUF, 3 = FIFO size)
position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF)
probe_mask - Bitmask to probe codecs (default = -1, meaning all slots)
bdl_pos_adj - Specifies the DMA IRQ timing delay in samples.
Passing -1 will make the driver to choose the appropriate
value based on the controller chip.

[Single (global) options]
single_cmd - Use single immediate commands to communicate with
Expand Down Expand Up @@ -845,14 +848,18 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
ALC269
basic Basic preset

ALC662
ALC662/663
3stack-dig 3-stack (2-channel) with SPDIF
3stack-6ch 3-stack (6-channel)
3stack-6ch-dig 3-stack (6-channel) with SPDIF
6stack-dig 6-stack with SPDIF
lenovo-101e Lenovo laptop
eeepc-p701 ASUS Eeepc P701
eeepc-ep20 ASUS Eeepc EP20
m51va ASUS M51VA
g71v ASUS G71V
h13 ASUS H13
g50v ASUS G50V
auto auto-config reading BIOS (default)

ALC882/885
Expand Down Expand Up @@ -1091,7 +1098,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
This occurs when the access to non-existing or non-working codec slot
(likely a modem one) causes a stall of the communication via HD-audio
bus. You can see which codec slots are probed by enabling
CONFIG_SND_DEBUG_DETECT, or simply from the file name of the codec
CONFIG_SND_DEBUG_VERBOSE, or simply from the file name of the codec
proc files. Then limit the slots to probe by probe_mask option.
For example, probe_mask=1 means to probe only the first slot, and
probe_mask=4 means only the third slot.
Expand Down Expand Up @@ -2267,6 +2274,10 @@ case above again, the first two slots are already reserved. If any
other driver (e.g. snd-usb-audio) is loaded before snd-interwave or
snd-ens1371, it will be assigned to the third or later slot.

When a module name is given with '!', the slot will be given for any
modules but that name. For example, "slots=!snd-pcsp" will reserve
the first slot for any modules but snd-pcsp.


ALSA PCM devices to OSS devices mapping
=======================================
Expand Down
4 changes: 2 additions & 2 deletions Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6127,8 +6127,8 @@ struct _snd_pcm_runtime {

<para>
<function>snd_printdd()</function> is compiled in only when
<constant>CONFIG_SND_DEBUG_DETECT</constant> is set. Please note
that <constant>DEBUG_DETECT</constant> is not set as default
<constant>CONFIG_SND_DEBUG_VERBOSE</constant> is set. Please note
that <constant>CONFIG_SND_DEBUG_VERBOSE</constant> is not set as default
even if you configure the alsa-driver with
<option>--with-debug=full</option> option. You need to give
explicitly <option>--with-debug=detect</option> option instead.
Expand Down
8 changes: 8 additions & 0 deletions include/asm-mips/mach-au1x00/au1xxx_psc.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ typedef struct psc_i2s {
u32 psc_i2sudf;
} psc_i2s_t;

#define PSC_I2SCFG_OFFSET 0x08
#define PSC_I2SMASK_OFFSET 0x0C
#define PSC_I2SPCR_OFFSET 0x10
#define PSC_I2SSTAT_OFFSET 0x14
#define PSC_I2SEVENT_OFFSET 0x18
#define PSC_I2SRXTX_OFFSET 0x1C
#define PSC_I2SUDF_OFFSET 0x20

/* I2S Config Register. */
#define PSC_I2SCFG_RT_MASK (3 << 30)
#define PSC_I2SCFG_RT_FIFO1 (0 << 30)
Expand Down
46 changes: 46 additions & 0 deletions include/sound/ad1843.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
* Copyright 2003 Vivien Chappelier <vivien.chappelier@linux-mips.org>
* Copyright 2008 Thomas Bogendoerfer <tsbogend@franken.de>
*/

#ifndef __SOUND_AD1843_H
#define __SOUND_AD1843_H

struct snd_ad1843 {
void *chip;
int (*read)(void *chip, int reg);
int (*write)(void *chip, int reg, int val);
};

#define AD1843_GAIN_RECLEV 0
#define AD1843_GAIN_LINE 1
#define AD1843_GAIN_LINE_2 2
#define AD1843_GAIN_MIC 3
#define AD1843_GAIN_PCM_0 4
#define AD1843_GAIN_PCM_1 5
#define AD1843_GAIN_SIZE (AD1843_GAIN_PCM_1+1)

int ad1843_get_gain_max(struct snd_ad1843 *ad1843, int id);
int ad1843_get_gain(struct snd_ad1843 *ad1843, int id);
int ad1843_set_gain(struct snd_ad1843 *ad1843, int id, int newval);
int ad1843_get_recsrc(struct snd_ad1843 *ad1843);
int ad1843_set_recsrc(struct snd_ad1843 *ad1843, int newsrc);
void ad1843_setup_dac(struct snd_ad1843 *ad1843,
unsigned int id,
unsigned int framerate,
snd_pcm_format_t fmt,
unsigned int channels);
void ad1843_shutdown_dac(struct snd_ad1843 *ad1843,
unsigned int id);
void ad1843_setup_adc(struct snd_ad1843 *ad1843,
unsigned int framerate,
snd_pcm_format_t fmt,
unsigned int channels);
void ad1843_shutdown_adc(struct snd_ad1843 *ad1843);
int ad1843_init(struct snd_ad1843 *ad1843);

#endif /* __SOUND_AD1843_H */
3 changes: 0 additions & 3 deletions include/sound/control.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ int snd_ctl_unregister_ioctl_compat(snd_kctl_ioctl_func_t fcn);
#define snd_ctl_unregister_ioctl_compat(fcn)
#endif

int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control);
int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file, struct snd_ctl_elem_value *control);

static inline unsigned int snd_ctl_get_ioffnum(struct snd_kcontrol *kctl, struct snd_ctl_elem_id *id)
{
return id->numid - kctl->id.numid;
Expand Down
8 changes: 4 additions & 4 deletions include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,13 @@ void snd_verbose_printd(const char *file, int line, const char *format, ...)

#endif /* CONFIG_SND_DEBUG */

#ifdef CONFIG_SND_DEBUG_DETECT
#ifdef CONFIG_SND_DEBUG_VERBOSE
/**
* snd_printdd - debug printk
* @format: format string
*
* Works like snd_printk() for debugging purposes.
* Ignored when CONFIG_SND_DEBUG_DETECT is not set.
* Ignored when CONFIG_SND_DEBUG_VERBOSE is not set.
*/
#define snd_printdd(format, args...) snd_printk(format, ##args)
#else
Expand All @@ -442,15 +442,15 @@ struct snd_pci_quirk {
unsigned short subvendor; /* PCI subvendor ID */
unsigned short subdevice; /* PCI subdevice ID */
int value; /* value */
#ifdef CONFIG_SND_DEBUG_DETECT
#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(vend,dev) {_SND_PCI_QUIRK_ID(vend, dev)}
#ifdef CONFIG_SND_DEBUG_DETECT
#ifdef CONFIG_SND_DEBUG_VERBOSE
#define SND_PCI_QUIRK(vend,dev,xname,val) \
{_SND_PCI_QUIRK_ID(vend, dev), .value = (val), .name = (xname)}
#else
Expand Down
8 changes: 8 additions & 0 deletions include/sound/cs4231-regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,12 @@
#define CS4236_RIGHT_WAVE 0x1c /* right wavetable serial port volume */
#define CS4236_VERSION 0x9c /* chip version and ID */

/* definitions for extended registers - OPTI93X */
#define OPTi931_AUX_LEFT_INPUT 0x10
#define OPTi931_AUX_RIGHT_INPUT 0x11
#define OPTi93X_MIC_LEFT_INPUT 0x14
#define OPTi93X_MIC_RIGHT_INPUT 0x15
#define OPTi93X_OUT_LEFT 0x16
#define OPTi93X_OUT_RIGHT 0x17

#endif /* __SOUND_CS4231_REGS_H */
3 changes: 3 additions & 0 deletions include/sound/cs4231.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
/* compatible, but clones */
#define CS4231_HW_INTERWAVE 0x1000 /* InterWave chip */
#define CS4231_HW_OPL3SA2 0x1101 /* OPL3-SA2 chip, similar to cs4231 */
#define CS4231_HW_OPTI93X 0x1102 /* Opti 930/931/933 */

/* defines for codec.hwshare */
#define CS4231_HWSHARE_IRQ (1<<0)
Expand Down Expand Up @@ -120,6 +121,8 @@ unsigned char snd_cs4236_ext_in(struct snd_cs4231 *chip, unsigned char reg);
void snd_cs4231_mce_up(struct snd_cs4231 *chip);
void snd_cs4231_mce_down(struct snd_cs4231 *chip);

void snd_cs4231_overrange(struct snd_cs4231 *chip);

irqreturn_t snd_cs4231_interrupt(int irq, void *dev_id);

const char *snd_cs4231_chip_id(struct snd_cs4231 *chip);
Expand Down
1 change: 1 addition & 0 deletions include/sound/emu10k1.h
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,7 @@ struct snd_emu_chip_details {
unsigned char spi_dac; /* SPI interface for DAC */
unsigned char i2c_adc; /* I2C interface for ADC */
unsigned char adc_1361t; /* Use Philips 1361T ADC */
unsigned char invert_shared_spdif; /* analog/digital switch inverted */
const char *driver;
const char *name;
const char *id; /* for backward compatibility - can be NULL if not needed */
Expand Down
2 changes: 1 addition & 1 deletion include/sound/seq_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
int cap, int type, int midi_channels, int midi_voices, char *portname);
int snd_seq_event_port_detach(int client, int port);

#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
void snd_seq_autoload_lock(void);
void snd_seq_autoload_unlock(void);
#else
Expand Down
42 changes: 36 additions & 6 deletions include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@
{ .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \
.shift = wshift, .invert = winvert}

/* generic register modifier widget */
#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \
{ .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \
.reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \
.on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \
.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}

/* dapm kcontrol types */
#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
Expand Down Expand Up @@ -193,6 +200,7 @@ struct snd_soc_dapm_widget;
enum snd_soc_dapm_type;
struct snd_soc_dapm_path;
struct snd_soc_dapm_pin;
struct snd_soc_dapm_route;

/* dapm controls */
int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
Expand All @@ -205,25 +213,32 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
int snd_soc_dapm_new_control(struct snd_soc_codec *codec,
const struct snd_soc_dapm_widget *widget);
int snd_soc_dapm_new_controls(struct snd_soc_codec *codec,
const struct snd_soc_dapm_widget *widget,
int num);

/* dapm path setup */
int snd_soc_dapm_connect_input(struct snd_soc_codec *codec,
int __deprecated snd_soc_dapm_connect_input(struct snd_soc_codec *codec,
const char *sink_name, const char *control_name, const char *src_name);
int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec);
void snd_soc_dapm_free(struct snd_soc_device *socdev);
int snd_soc_dapm_add_routes(struct snd_soc_codec *codec,
const struct snd_soc_dapm_route *route, int num);

/* dapm events */
int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream,
int event);
int snd_soc_dapm_device_event(struct snd_soc_device *socdev, int event);
int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
enum snd_soc_bias_level level);

/* dapm sys fs - used by the core */
int snd_soc_dapm_sys_add(struct device *dev);

/* dapm audio endpoint control */
int snd_soc_dapm_set_endpoint(struct snd_soc_codec *codec,
char *pin, int status);
int snd_soc_dapm_sync_endpoints(struct snd_soc_codec *codec);
/* dapm audio pin control and status */
int snd_soc_dapm_enable_pin(struct snd_soc_codec *codec, char *pin);
int snd_soc_dapm_disable_pin(struct snd_soc_codec *codec, char *pin);
int snd_soc_dapm_get_pin_status(struct snd_soc_codec *codec, char *pin);
int snd_soc_dapm_sync(struct snd_soc_codec *codec);

/* dapm widget types */
enum snd_soc_dapm_type {
Expand All @@ -245,6 +260,18 @@ enum snd_soc_dapm_type {
snd_soc_dapm_post, /* machine specific post widget - exec last */
};

/*
* DAPM audio route definition.
*
* Defines an audio route originating at source via control and finishing
* at sink.
*/
struct snd_soc_dapm_route {
const char *sink;
const char *control;
const char *source;
};

/* dapm audio path between two widgets */
struct snd_soc_dapm_path {
char *name;
Expand Down Expand Up @@ -277,6 +304,9 @@ struct snd_soc_dapm_widget {
unsigned char shift; /* bits to shift */
unsigned int saved_value; /* widget saved value */
unsigned int value; /* widget current value */
unsigned int mask; /* non-shifted mask */
unsigned int on_val; /* on state value */
unsigned int off_val; /* off state value */
unsigned char power:1; /* block power status */
unsigned char invert:1; /* invert the power bit */
unsigned char active:1; /* active stream on DAC, ADC's */
Expand Down
Loading

0 comments on commit b5cf43c

Please sign in to comment.