Commit b5cf43c4 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.alsa-project.org/alsa-kernel

* '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
  ...
parents b7f80afa fe0a3fe3
......@@ -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
......@@ -845,7 +848,7 @@ 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
......@@ -853,6 +856,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
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
......@@ -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.
......@@ -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
=======================================
......
......@@ -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.
......
......@@ -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)
......
/*
* 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 */
......@@ -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;
......
......@@ -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
......@@ -442,7 +442,7 @@ 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
};
......@@ -450,7 +450,7 @@ struct snd_pci_quirk {
#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
......
......@@ -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 */
......@@ -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)
......@@ -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);
......
......@@ -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 */
......
......@@ -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
......
......@@ -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, \
......@@ -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,
......@@ -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 {
......@@ -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;
......@@ -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 */
......
......@@ -73,6 +73,15 @@
.get = snd_soc_get_volsw_2r, .put = snd_soc_put_volsw_2r, \
.private_value = (reg_left) | ((shift) << 8) | \
((max) << 12) | ((invert) << 20) | ((reg_right) << 24) }
#define SOC_DOUBLE_S8_TLV(xname, reg, min, max, 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_s8, .get = snd_soc_get_volsw_s8, \
.put = snd_soc_put_volsw_s8, \
.private_value = (reg) | (((signed char)max) << 16) | \
(((signed char)min) << 24) }
#define SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, xtexts) \
{ .reg = xreg, .shift_l = xshift_l, .shift_r = xshift_r, \
.mask = xmask, .texts = xtexts }
......@@ -91,6 +100,15 @@
.info = snd_soc_info_volsw, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = SOC_SINGLE_VALUE(xreg, xshift, xmask, xinvert) }
#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmask, xinvert,\
xhandler_get, xhandler_put, 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, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = SOC_SINGLE_VALUE(xreg, xshift, xmask, xinvert) }
#define SOC_SINGLE_BOOL_EXT(xname, xdata, xhandler_get, xhandler_put) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_bool_ext, \
......@@ -102,6 +120,24 @@
.get = xhandler_get, .put = xhandler_put, \
.private_value = (unsigned long)&xenum }
/*
* Bias levels
*
* @ON: Bias is fully on for audio playback and capture operations.
* @PREPARE: Prepare for audio operations. Called before DAPM switching for
* stream start and stop operations.
* @STANDBY: Low power standby state when no playback/capture operations are
* in progress. NOTE: The transition time between STANDBY and ON
* should be as fast as possible and no longer than 10ms.
* @OFF: Power Off. No restrictions on transition times.
*/
enum snd_soc_bias_level {
SND_SOC_BIAS_ON,
SND_SOC_BIAS_PREPARE,
SND_SOC_BIAS_STANDBY,
SND_SOC_BIAS_OFF,
};
/*
* Digital Audio Interface (DAI) types
*/
......@@ -185,8 +221,7 @@ struct snd_soc_pcm_stream;
struct snd_soc_ops;
struct snd_soc_dai_mode;
struct snd_soc_pcm_runtime;
struct snd_soc_codec_dai;
struct snd_soc_cpu_dai;
struct snd_soc_dai;
struct snd_soc_codec;
struct snd_soc_machine_config;
struct soc_enum;
......@@ -221,6 +256,27 @@ int snd_soc_new_ac97_codec(struct snd_soc_codec *codec,
struct snd_ac97_bus_ops *ops, int num);
void snd_soc_free_ac97_codec(struct snd_soc_codec *codec);
/* Digital Audio Interface clocking API.*/
int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
unsigned int freq, int dir);
int snd_soc_dai_set_clkdiv(struct snd_soc_dai *dai,
int div_id, int div);
int snd_soc_dai_set_pll(struct snd_soc_dai *dai,
int pll_id, unsigned int freq_in, unsigned int freq_out);
/* Digital Audio interface formatting */
int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt);
int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
unsigned int mask, int slots);
int snd_soc_dai_set_tristate(struct snd_soc_dai *dai, int tristate);
/* Digital Audio Interface mute */
int snd_soc_dai_digital_mute(struct snd_soc_dai *dai, int mute);
/*
*Controls
*/
......@@ -249,6 +305,12 @@ int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
int snd_soc_info_volsw_s8(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo);
int snd_soc_get_volsw_s8(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol);
/* SoC PCM stream information */
struct snd_soc_pcm_stream {
......@@ -272,87 +334,45 @@ struct snd_soc_ops {
int (*trigger)(struct snd_pcm_substream *, int);
};
/* ASoC codec DAI ops */
struct snd_soc_codec_ops {
/* codec DAI clocking configuration */
int (*set_sysclk)(struct snd_soc_codec_dai *codec_dai,
/* ASoC DAI ops */
struct snd_soc_dai_ops {
/* DAI clocking configuration */
int (*set_sysclk)(struct snd_soc_dai *dai,
int clk_id, unsigned int freq, int dir);
int (*set_pll)(struct snd_soc_codec_dai *codec_dai,
int (*set_pll)(struct snd_soc_dai *dai,
int pll_id, unsigned int freq_in, unsigned int freq_out);
int (*set_clkdiv)(struct snd_soc_codec_dai *codec_dai,
int div_id, int div);
int (*set_clkdiv)(struct snd_soc_dai *dai, int div_id, int div);
/* CPU DAI format configuration */
int (*set_fmt)(struct snd_soc_codec_dai *codec_dai,
unsigned int fmt);
int (*set_tdm_slot)(struct snd_soc_codec_dai *codec_dai,
/* DAI format configuration */
int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt);
int (*set_tdm_slot)(struct snd_soc_dai *dai,
unsigned int mask, int slots);
int (*set_tristate)(struct snd_soc_codec_dai *, int tristate);
int (*set_tristate)(struct snd_soc_dai *dai, int tristate);
/* digital mute */
int (*digital_mute)(struct snd_soc_codec_dai *, int mute);
};
/* ASoC cpu DAI ops */
struct snd_soc_cpu_ops {
/* CPU DAI clocking configuration */
int (*set_sysclk)(struct snd_soc_cpu_dai *cpu_dai,
int clk_id, unsigned int freq, int dir);
int (*set_clkdiv)(struct snd_soc_cpu_dai *cpu_dai,
int div_id, int div);
int (*set_pll)(struct snd_soc_cpu_dai *cpu_dai,
int pll_id, unsigned int freq_in, unsigned int freq_out);
/* CPU DAI format configuration */
int (*set_fmt)(struct snd_soc_cpu_dai *cpu_dai,
unsigned int fmt);
int (*set_tdm_slot)(struct snd_soc_cpu_dai *cpu_dai,
unsigned int mask, int slots);
int (*set_tristate)(struct snd_soc_cpu_dai *, int tristate);
};
/* SoC Codec DAI */
struct snd_soc_codec_dai {
char *name;
int id;
unsigned char type;
/* DAI capabilities */
struct snd_soc_pcm_stream playback;
struct snd_soc_pcm_stream capture;
/* DAI runtime info */
struct snd_soc_codec *codec;
unsigned int active;
unsigned char pop_wait:1;
/* ops */
struct snd_soc_ops ops;
struct snd_soc_codec_ops dai_ops;
/* DAI private data */
void *private_data;
int (*digital_mute)(struct snd_soc_dai *dai, int mute);
};
/* SoC CPU DAI */
struct snd_soc_cpu_dai {
/* SoC DAI (Digital Audio Interface) */
struct snd_soc_dai {
/* DAI description */
char *name;
unsigned int id;
unsigned char type;
/* DAI callbacks */
int (*probe)(struct platform_device *pdev);
void (*remove)(struct platform_device *pdev);
int (*probe)(struct platform_device *pdev,
struct snd_soc_dai *dai);
void (*remove)(struct platform_device *pdev,
struct snd_soc_dai *dai);
int (*suspend)(struct platform_device *pdev,
struct snd_soc_cpu_dai *cpu_dai);
struct snd_soc_dai *dai);
int (*resume)(struct platform_device *pdev,
struct snd_soc_cpu_dai *cpu_dai);
struct snd_soc_dai *dai);
/* ops */
struct snd_soc_ops ops;
struct snd_soc_cpu_ops dai_ops;
struct snd_soc_dai_ops dai_ops;
/* DAI capabilities */
struct snd_soc_pcm_stream capture;
......@@ -360,7 +380,9 @@ struct snd_soc_cpu_dai {
/* DAI runtime info */
struct snd_pcm_runtime *runtime;
unsigned char active:1;
struct snd_soc_codec *codec;
unsigned int active;
unsigned char pop_wait:1;
void *dma_data;
/* DAI private data */
......@@ -374,7 +396,8 @@ struct snd_soc_codec {
struct mutex mutex;
/* callbacks */
int (*dapm_event)(struct snd_soc_codec *codec, int event);
int (*set_bias_level)(struct snd_soc_codec *,
enum snd_soc_bias_level level);
/* runtime */
struct snd_card *card;
......@@ -396,12 +419,12 @@ struct snd_soc_codec {
/* dapm */
struct list_head dapm_widgets;
struct list_head dapm_paths;
unsigned int dapm_state;
unsigned int suspend_dapm_state;
enum snd_soc_bias_level bias_level;
enum snd_soc_bias_level suspend_bias_level;
struct delayed_work delayed_work;
/* codec DAI's */
struct snd_soc_codec_dai *dai;
struct snd_soc_dai *dai;
unsigned int num_dai;
};
......@@ -420,12 +443,12 @@ struct snd_soc_platform {
int (*probe)(struct platform_device *pdev);
int (*remove)(struct platform_device *pdev);
int (*suspend)(struct platform_device *pdev,
struct snd_soc_cpu_dai *cpu_dai);
struct snd_soc_dai *dai);
int (*resume)(struct platform_device *pdev,
struct snd_soc_cpu_dai *cpu_dai);
struct snd_soc_dai *dai);
/* pcm creation and destruction */
int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *,
int (*pcm_new)(struct snd_card *, struct snd_soc_dai *,
struct snd_pcm *);
void (*pcm_free)(struct snd_pcm *);
......@@ -439,8 +462,8 @@ struct snd_soc_dai_link {
char *stream_name; /* Stream name */
/* DAI */
struct snd_soc_codec_dai *codec_dai;
struct snd_soc_cpu_dai *cpu_dai;
struct snd_soc_dai *codec_dai;
struct snd_soc_dai *cpu_dai;
/* machine stream operations */
struct snd_soc_ops *ops;
......@@ -467,7 +490,8 @@ struct snd_soc_machine {
int (*resume_post)(struct platform_device *pdev);
/* callbacks */
int (*dapm_event)(struct snd_soc_machine *, int event);
int (*set_bias_level)(struct snd_soc_machine *,
enum snd_soc_bias_level level);
/* CPU <--> Codec DAI links */
struct snd_soc_dai_link *dai_link;
......@@ -482,6 +506,7 @@ struct snd_soc_device {
struct snd_soc_codec *codec;
struct snd_soc_codec_device *codec_dev;
struct delayed_work delayed_work;
struct work_struct deferred_resume_work;
void *codec_data;
};
......
......@@ -15,8 +15,6 @@
* features support
*/
/* $Id: uda1341.h,v 1.8 2005/11/17 14:17:21 tiwai Exp $ */
#define UDA1341_ALSA_NAME "snd-uda1341"
/*
......
/* include/version.h. Generated by alsa/ksync script. */
#define CONFIG_SND_VERSION "1.0.16"
/* include/version.h */
#define CONFIG_SND_VERSION "1.0.17"
#define CONFIG_SND_DATE ""
# sound/Config.in
#
menu "Sound"
depends on HAS_IOMEM
config SOUND
menuconfig SOUND
tristate "Sound card support"
depends on HAS_IOMEM
help
If you have a sound card in your computer, i.e. if it can say more
than an occasional beep, say Y. Be sure to have all the information
......@@ -28,22 +26,22 @@ config SOUND
and read <file:Documentation/sound/oss/README.modules>; the module
will be called soundcore.
if SOUND
source "sound/oss/dmasound/Kconfig"
if !M68K
menu "Advanced Linux Sound Architecture"
depends on SOUND!=n
config SND
menuconfig SND
tristate "Advanced Linux Sound Architecture"
depends on SOUND
help
Say 'Y' or 'M' to enable ALSA (Advanced Linux Sound Architecture),
the new base sound system.
For more information, see <http://www.alsa-project.org/>
if SND
source "sound/core/Kconfig"
source "sound/drivers/Kconfig"
......@@ -58,9 +56,7 @@ source "sound/aoa/Kconfig"
source "sound/arm/Kconfig"
if SPI
source "sound/spi/Kconfig"
endif
source "sound/mips/Kconfig"
......@@ -80,22 +76,20 @@ source "sound/parisc/Kconfig"
source "sound/soc/Kconfig"
endmenu
endif # SND
menu "Open Sound System"
depends on SOUND!=n
config SOUND_PRIME
menuconfig SOUND_PRIME
tristate "Open Sound System (DEPRECATED)"
depends on SOUND
help
Say 'Y' or 'M' to enable Open Sound System drivers.
if SOUND_PRIME
source "sound/oss/Kconfig"
endmenu
endif # SOUND_PRIME
endif
endif # !M68K
config AC97_BUS
tristate
......@@ -105,4 +99,4 @@ config AC97_BUS
sound although they're sharing the AC97 bus. Concerned drivers
should "select" this.
endmenu
endif # SOUND
menu "Apple Onboard Audio driver"
depends on SND!=n && PPC_PMAC
config SND_AOA
menuconfig SND_AOA
tristate "Apple Onboard Audio driver"
depends on SND
depends on PPC_PMAC
select SND_PCM
---help---
This option enables the new driver for the various
Apple Onboard Audio components.
if SND_AOA
source "sound/aoa/fabrics/Kconfig"
source "sound/aoa/codecs/Kconfig"
source "sound/aoa/soundbus/Kconfig"
endmenu
endif # SND_AOA
config SND_AOA_ONYX
tristate "support Onyx chip"
depends on SND_AOA
select I2C
select I2C_POWERMAC
---help---
......@@ -10,7 +9,6 @@ config SND_AOA_ONYX
#config SND_AOA_TOPAZ
# tristate "support Topaz chips"
# depends on SND_AOA
# ---help---
# This option enables support for the Topaz (CS84xx)
# codec chips found in the latest Apple machines,
......@@ -19,7 +17,6 @@ config SND_AOA_ONYX
config SND_AOA_TAS
tristate "support TAS chips"
depends on SND_AOA
select I2C
select I2C_POWERMAC
---help---
......@@ -29,7 +26,6 @@ config SND_AOA_TAS
config SND_AOA_TOONIE
tristate "support Toonie chip"
depends on SND_AOA
---help---
This option enables support for the toonie codec
found in the Mac Mini. If you have a Mac Mini and
......
config SND_AOA_FABRIC_LAYOUT
tristate "layout-id fabric"
depends on SND_AOA
select SND_AOA_SOUNDBUS
select SND_AOA_SOUNDBUS_I2S
---help---
......
config SND_AOA_SOUNDBUS
tristate "Apple Soundbus support"
depends on SOUND
select SND_PCM
---help---
This option enables the generic driver for the soundbus
......
# ALSA ARM drivers
menu "ALSA ARM devices"
depends on SND!=n && ARM
menuconfig SND_ARM
bool "ARM sound devices"
depends on ARM
default y
help
Support for sound devices specific to ARM architectures.
Drivers that are implemented on ASoC can be found in
"ALSA for SoC audio support" section.
if SND_ARM
config SND_SA11XX_UDA1341
tristate "SA11xx UDA1341TS driver (iPaq H3600)"
depends on ARCH_SA1100 && SND && L3
depends on ARCH_SA1100 && L3
select SND_PCM
help
Say Y here if you have a Compaq iPaq H3x00 handheld computer
......@@ -16,7 +24,7 @@ config SND_SA11XX_UDA1341
config SND_ARMAACI
tristate "ARM PrimeCell PL041 AC Link support"
depends on SND && ARM_AMBA
depends on ARM_AMBA
select SND_PCM
select SND_AC97_CODEC
......@@ -26,11 +34,12 @@ config SND_PXA2XX_PCM
config SND_PXA2XX_AC97
tristate "AC97 driver for the Intel PXA2xx chip"
depends on ARCH_PXA && SND
depends on ARCH_PXA
select SND_PXA2XX_PCM
select SND_AC97_CODEC
help
Say Y or M if you want to support any AC97 codec attached to
the PXA2xx AC97 interface.
endmenu
endif # SND_ARM
......@@ -21,8 +21,6 @@
* merged HAL layer (patches from Brian)
*/
/* $Id: sa11xx-uda1341.c,v 1.27 2005/12/07 09:13:42 cladisch Exp $ */
/***************************************************************************************************
*
* To understand what Alsa Drivers should be doing look at "Writing an Alsa Driver" by Takashi Iwai
......
# ALSA soundcard-configuration
config SND_TIMER
tristate
depends on SND
config SND_PCM
tristate
select SND_TIMER
depends on SND
config SND_HWDEP
tristate
depends on SND
config SND_RAWMIDI
tristate
depends on SND
config SND_SEQUENCER
tristate "Sequencer support"
depends on SND
select SND_TIMER
help
Say Y or M to enable MIDI sequencer and router support. This
......@@ -44,11 +39,9 @@ config SND_SEQ_DUMMY
config SND_OSSEMUL
bool
depends on SND
config SND_MIXER_OSS
tristate "OSS Mixer API"
depends on SND
select SND_OSSEMUL
help
To enable OSS mixer API emulation (/dev/mixer*), say Y here
......@@ -61,7 +54,6 @@ config SND_MIXER_OSS
config SND_PCM_OSS
tristate "OSS PCM (digital audio) API"
depends on SND
select SND_OSSEMUL
select SND_PCM
help
......@@ -84,7 +76,7 @@ config SND_PCM_OSS_PLUGINS
config SND_SEQUENCER_OSS
bool "OSS Sequencer API"
depends on SND && SND_SEQUENCER
depends on SND_SEQUENCER
select SND_OSSEMUL
help
Say Y here to enable OSS sequencer emulation (both
......@@ -98,7 +90,7 @@ config SND_SEQUENCER_OSS
config SND_RTCTIMER
tristate "RTC Timer support"
depends on SND && RTC
depends on RTC
select SND_TIMER
help
Say Y here to enable RTC timer support for ALSA. ALSA uses
......@@ -123,7 +115,6 @@ config SND_SEQ_RTCTIMER_DEFAULT
config SND_DYNAMIC_MINORS
bool "Dynamic device file minor numbers"
depends on SND
help
If you say Y here, the minor numbers of ALSA device files in
/dev/snd/ are allocated dynamically. This allows you to have
......@@ -134,7 +125,6 @@ config SND_DYNAMIC_MINORS
config SND_SUPPORT_OLD_API
bool "Support old ALSA API"
depends on SND
default y
help
Say Y here to support the obsolete ALSA PCM API (ver.0.9.0 rc3
......@@ -142,7 +132,7 @@ config SND_SUPPORT_OLD_API
config SND_VERBOSE_PROCFS
bool "Verbose procfs contents"
depends on SND && PROC_FS
depends on PROC_FS
default y
help
Say Y here to include code for verbose procfs contents (provides
......@@ -151,7 +141,6 @@ config SND_VERBOSE_PROCFS
config SND_VERBOSE_PRINTK
bool "Verbose printk"
depends on SND
help
Say Y here to enable verbose log messages. These messages
will help to identify source file and position containing
......@@ -161,16 +150,17 @@ config SND_VERBOSE_PRINTK
config SND_DEBUG
bool "Debug"
depends on SND
help
Say Y here to enable ALSA debug code.
config SND_DEBUG_DETECT
bool "Debug detection"
config SND_DEBUG_VERBOSE
bool "More verbose debug"
depends on SND_DEBUG
help
Say Y here to enable extra-verbose log messages printed when
detecting devices.
Say Y here to enable extra-verbose debugging messages.
Let me repeat: it enables EXTRA-VERBOSE DEBUGGING messages.
So, say Y only if you are ready to be annoyed.
config SND_PCM_XRUN_DEBUG
bool "Enable PCM ring buffer overrun/underrun debugging"
......@@ -184,4 +174,3 @@ config SND_PCM_XRUN_DEBUG
config SND_VMASTER
bool
depends on SND
......@@ -684,7 +684,8 @@ static int snd_ctl_elem_info_user(struct snd_ctl_file *ctl,
return result;
}
int snd_ctl_elem_read(struct snd_card *card, struct snd_ctl_elem_value *control)
static int snd_ctl_elem_read(struct snd_card *card,
struct snd_ctl_elem_value *control)
{
struct snd_kcontrol *kctl;
struct snd_kcontrol_volatile *vd;
......@@ -734,8 +735,8 @@ static int snd_ctl_elem_read_user(struct snd_card *card,
return result;
}
int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,
struct snd_ctl_elem_value *control)
static int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,
struct snd_ctl_elem_value *control)
{
struct snd_kcontrol *kctl;
struct snd_kcontrol_volatile *vd;
......
......@@ -46,17 +46,24 @@ static char *slots[SNDRV_CARDS];
module_param_array(slots, charp, NULL, 0444);
MODULE_PARM_DESC(slots, "Module names assigned to the slots.");
/* return non-zero if the given index is already reserved for another
/* return non-zero if the given index is reserved for the given
* module via slots option
*/
static int module_slot_mismatch(struct module *module, int idx)
static int module_slot_match(struct module *module, int idx)
{
int match = 1;
#ifdef MODULE
char *s1, *s2;
const char *s1, *s2;
if (!module || !module->name || !slots[idx])
return 0;
s1 = slots[idx];
s2 = module->name;
s1 = module->name;
s2 = slots[idx];
if (*s2 == '!') {
match = 0; /* negative match */
s2++;
}
/* compare module name strings
* hyphens are handled as equivalent with underscore
*/
......@@ -68,12 +75,12 @@ static int module_slot_mismatch(struct module *module, int idx)
if (c2 == '-')
c2 = '_';
if (c1 != c2)
return 1;
return !match;
if (!c1)
break;
}
#endif
return 0;
#endif /* MODULE */
return match;
}
#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
......@@ -129,7 +136,7 @@ struct snd_card *snd_card_new(int idx, const char *xid,
struct module *module, int extra_size)
{
struct snd_card *card;
int err;
int err, idx2;
if (extra_size < 0)
extra_size = 0;
......@@ -144,35 +151,41 @@ struct snd_card *snd_card_new(int idx, const char *xid,
err = 0;
mutex_lock(&snd_card_mutex);
if (idx < 0) {
int idx2;
for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++)
/* idx == -1 == 0xffff means: take any free slot */
if (~snd_cards_lock & idx & 1<<idx2) {
if (module_slot_mismatch(module, idx2))
continue;
idx = idx2;
if (idx >= snd_ecards_limit)
snd_ecards_limit = idx + 1;
break;
if (module_slot_match(module, idx2)) {
idx = idx2;
break;
}
}
}
if (idx < 0) {
for (idx2 = 0; idx2 < SNDRV_CARDS; idx2++)
/* idx == -1 == 0xffff means: take any free slot */
if (~snd_cards_lock & idx & 1<<idx2) {
if (!slots[idx2] || !*slots[idx2]) {
idx = idx2;
break;
}
}
} else {
if (idx < snd_ecards_limit) {
if (snd_cards_lock & (1 << idx))
err = -EBUSY; /* invalid */
} else {
if (idx < SNDRV_CARDS)
snd_ecards_limit = idx + 1; /* increase the limit */
else
err = -ENODEV;
}
}
if (idx < 0 || err < 0) {
if (idx < 0)
err = -ENODEV;
else if (idx < snd_ecards_limit) {
if (snd_cards_lock & (1 << idx))
err = -EBUSY; /* invalid */
} else if (idx >= SNDRV_CARDS)
err = -ENODEV;
if (err < 0) {
mutex_unlock(&snd_card_mutex);
snd_printk(KERN_ERR "cannot find the slot for index %d (range 0-%i), error: %d\n",
idx, snd_ecards_limit - 1, err);
goto __error;
}
snd_cards_lock |= 1 << idx; /* lock it */
if (idx >= snd_ecards_limit)
snd_ecards_limit = idx + 1; /* increase the limit */
mutex_unlock(&snd_card_mutex);
card->number = idx;
card->module = module;
......
......@@ -79,68 +79,6 @@ struct snd_mem_list {
#define snd_assert(expr, args...) /**/
#endif
/*
* Hacks
*/
#if defined(__i386__)
/*
* A hack to allocate large buffers via dma_alloc_coherent()
*
* since dma_alloc_coherent always tries GFP_DMA when the requested
* pci memory region is below 32bit, it happens quite often that even
* 2 order of pages cannot be allocated.
*
* so in the following, we allocate at first without dma_mask, so that
* allocation will be done without GFP_DMA. if the area doesn't match
* with the requested region, then realloate with the original dma_mask
* again.
*
* Really, we want to move this type of thing into dma_alloc_coherent()
* so dma_mask doesn't have to be messed with.
*/
static void *snd_dma_hack_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_handle,
gfp_t flags)
{
void *ret;
u64 dma_mask, coherent_dma_mask;
if (dev == NULL || !dev->dma_mask)
return dma_alloc_coherent(dev, size, dma_handle, flags);
dma_mask = *dev->dma_mask;
coherent_dma_mask = dev->coherent_dma_mask;
*dev->dma_mask = 0xffffffff; /* do without masking */
dev->coherent_dma_mask = 0xffffffff; /* do without masking */
ret = dma_alloc_coherent(dev, size, dma_handle, flags);
*dev->dma_mask = dma_mask; /* restore */
dev->coherent_dma_mask = coherent_dma_mask; /* restore */
if (ret) {
/* obtained address is out of range? */
if (((unsigned long)*dma_handle + size - 1) & ~dma_mask) {
/* reallocate with the proper mask */
dma_free_coherent(dev, size, ret, *dma_handle);
ret = dma_alloc_coherent(dev, size, dma_handle, flags);
}
} else {
/* wish to success now with the proper mask... */
if (dma_mask != 0xffffffffUL) {
/* allocation with GFP_ATOMIC to avoid the long stall */
flags &= ~GFP_KERNEL;
flags |= GFP_ATOMIC;
ret = dma_alloc_coherent(dev, size, dma_handle, flags);
}
}
return ret;
}
/* redefine dma_alloc_coherent for some architectures */
#undef dma_alloc_coherent
#define dma_alloc_coherent snd_dma_hack_alloc_coherent
#endif /* arch */
/*
*
* Generic memory allocators
......
......@@ -148,7 +148,7 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid)
return NULL;
}
spin_unlock_irqrestore(&clients_lock, flags);
#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
if (!in_interrupt()) {
static char client_requested[SNDRV_SEQ_GLOBAL_CLIENTS];
static char card_requested[SNDRV_CARDS];
......
......@@ -124,7 +124,7 @@ static void snd_seq_device_info(struct snd_info_entry *entry,
* load all registered drivers (called from seq_clientmgr.c)
*/
#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
/* avoid auto-loading during module_init() */
static int snd_seq_in_init;
void snd_seq_autoload_lock(void)
......@@ -140,7 +140,7 @@ void snd_seq_autoload_unlock(void)
void snd_seq_device_load_drivers(void)
{
#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
struct ops_list *ops;
/* Calling request_module during module_init()
......@@ -566,7 +566,5 @@ EXPORT_SYMBOL(snd_seq_device_load_drivers);
EXPORT_SYMBOL(snd_seq_device_new);
EXPORT_SYMBOL(snd_seq_device_register_driver);
EXPORT_SYMBOL(snd_seq_device_unregister_driver);
#ifdef CONFIG_KMOD
EXPORT_SYMBOL(snd_seq_autoload_lock);
EXPORT_SYMBOL(snd_seq_autoload_unlock);
#endif
......@@ -60,14 +60,14 @@ EXPORT_SYMBOL(snd_ecards_limit);
static struct snd_minor *snd_minors[SNDRV_OS_MINORS];
static DEFINE_MUTEX(sound_mutex);
#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
/**
* snd_request_card - try to load the card module
* @card: the card number
*
* Tries to load the module "snd-card-X" for the given card number
* via KMOD. Returns immediately if already loaded.
* via request_module. Returns immediately if already loaded.
*/
void snd_request_card(int card)
{
......@@ -92,7 +92,7 @@ static void snd_request_other(int minor)
request_module(str);
}
#endif /* request_module support */
#endif /* modular kernel */
/**
* snd_lookup_minor_data - get user data of a registered device
......@@ -132,7 +132,7 @@ static int snd_open(struct inode *inode, struct file *file)
return -ENODEV;
mptr = snd_minors[minor];
if (mptr == NULL) {
#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
int dev = SNDRV_MINOR_DEVICE(minor);
if (dev == SNDRV_MINOR_CONTROL) {
/* /dev/aloadC? */
......
......@@ -146,7 +146,7 @@ static struct snd_timer *snd_timer_find(struct snd_timer_id *tid)
return NULL;
}
#ifdef CONFIG_KMOD
#ifdef CONFIG_MODULES
static void snd_timer_request(struct snd_timer_id *tid)
{
......@@ -259,8 +259,8 @@ int snd_timer_open(struct snd_timer_instance **ti,
/* open a master instance */
mutex_lock(&register_mutex);
timer = snd_timer_find(tid);
#ifdef CONFIG_KMOD
if (timer == NULL) {
#ifdef CONFIG_MODULES
if (!timer) {
mutex_unlock(&register_mutex);
snd_timer_request(tid);
mutex_lock(&register_mutex);
......
# ALSA generic drivers
config SND_MPU401_UART
tristate
select SND_RAWMIDI
menu "Generic devices"
depends on SND!=n
config SND_OPL3_LIB
tristate
select SND_TIMER
select SND_HWDEP
config SND_OPL4_LIB
tristate
select SND_TIMER
select SND_HWDEP
config SND_VX_LIB
tristate
select SND_HWDEP
select SND_PCM
config SND_AC97_CODEC
tristate
select SND_PCM
select AC97_BUS
select SND_VMASTER
menuconfig SND_DRIVERS
bool "Generic sound devices"
default y
help
Support for generic sound devices.
if SND_DRIVERS
config SND_PCSP
tristate "PC-Speaker support (READ HELP!)"
depends on PCSPKR_PLATFORM && X86_PC && HIGH_RES_TIMERS
depends on INPUT
depends on EXPERIMENTAL
depends on SND
select SND_PCM
help
If you don't have a sound card in your computer, you can include a
......@@ -35,33 +61,8 @@ config SND_PCSP
Say M if you don't.
Say Y only if you really know what you do.
config SND_MPU401_UART
tristate
select SND_RAWMIDI
config SND_OPL3_LIB
tristate
select SND_TIMER
select SND_HWDEP
config SND_OPL4_LIB
tristate
select SND_TIMER
select SND_HWDEP
config SND_VX_LIB
tristate
select SND_HWDEP
select SND_PCM
config SND_AC97_CODEC
tristate
select SND_PCM
select AC97_BUS
config SND_DUMMY
tristate "Dummy (/dev/null) soundcard"
depends on SND
select SND_PCM
help
Say Y here to include the dummy driver. This driver does
......@@ -90,7 +91,6 @@ config SND_VIRMIDI
config SND_MTPAV
tristate "MOTU MidiTimePiece AV multiport MIDI"
depends on SND
select SND_RAWMIDI
help
To use a MOTU MidiTimePiece AV multiport MIDI adapter
......@@ -102,7 +102,7 @@ config SND_MTPAV
config SND_MTS64
tristate "ESI Miditerminal 4140 driver"
depends on SND && PARPORT
depends on PARPORT
select SND_RAWMIDI
help
The ESI Miditerminal 4140 is a 4 In 4 Out MIDI Interface with
......@@ -115,7 +115,6 @@ config SND_MTS64
config SND_SERIAL_U16550
tristate "UART16550 serial MIDI driver"
depends on SND
select SND_RAWMIDI
help
To include support for MIDI serial port interfaces, say Y here
......@@ -131,7 +130,6 @@ config SND_SERIAL_U16550
config SND_MPU401
tristate "Generic MPU-401 UART driver"
depends on SND
select SND_MPU401_UART
help
Say Y here to include support for MIDI ports compatible with
......@@ -142,7 +140,7 @@ config SND_MPU401
config SND_PORTMAN2X4
tristate "Portman 2x4 driver"
depends on SND && PARPORT
depends on PARPORT
select SND_RAWMIDI
help
Say Y here to include support for Midiman Portman 2x4 parallel
......@@ -153,7 +151,7 @@ config SND_PORTMAN2X4
config SND_ML403_AC97CR
tristate "Xilinx ML403 AC97 Controller Reference"
depends on SND && XILINX_VIRTEX
depends on XILINX_VIRTEX
select SND_AC97_CODEC
help
Say Y here to include support for the
......@@ -163,4 +161,25 @@ config SND_ML403_AC97CR
To compile this driver as a module, choose M here: the module
will be called snd-ml403_ac97cr.
endmenu
config SND_AC97_POWER_SAVE
bool "AC97 Power-Saving Mode"
depends on SND_AC97_CODEC && EXPERIMENTAL
default n
help
Say Y here to enable the aggressive power-saving support of
AC97 codecs. In this mode, the power-mode is dynamically
controlled at each open/close.
The mode is activated by passing power_save=1 option to
snd-ac97-codec driver. You can toggle it dynamically over
sysfs, too.
config SND_AC97_POWER_SAVE_DEFAULT
int "Default time-out for AC97 power-save mode"
depends on SND_AC97_POWER_SAVE
default 0
help
The default time-out value in seconds for AC97 automatic
power-save mode. 0 means to disable the power-save mode.
endif # SND_DRIVERS
......@@ -183,7 +183,7 @@ static int vx_hwdep_dsp_load(struct snd_hwdep *hw,
kfree(fw);
return -ENOMEM;
}
if (copy_from_user(fw->data, dsp->image, dsp->length)) {
if (copy_from_user((void *)fw->data, dsp->image, dsp->length)) {
free_fw(fw);
return -EFAULT;
}
......
......@@ -23,6 +23,7 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <asm/unaligned.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
......@@ -264,10 +265,7 @@ int snd_cs8427_create(struct snd_i2c_bus *bus,
goto __fail;
}
/* write default channel status bytes */
buf[0] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 0));
buf[1] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 8));
buf[2] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 16));
buf[3] = ((unsigned char)(SNDRV_PCM_DEFAULT_CON_SPDIF >> 24));
put_unaligned_le32(SNDRV_PCM_DEFAULT_CON_SPDIF, buf);
memset(buf + 4, 0, 24 - 4);
if (snd_cs8427_send_corudata(device, 0, buf, 24) < 0)
goto __fail;
......
......@@ -17,8 +17,6 @@
* 2002-05-12 Tomas Kasparek another code cleanup
*/
/* $Id: uda1341.c,v 1.18 2005/11/17 14:17:21 tiwai Exp $ */
#include <linux/module.h>
#include <linux/init.h>
#include <linux/types.h>
......
......@@ -21,12 +21,17 @@ config SND_SB16_DSP
select SND_PCM
select SND_SB_COMMON
menu "ISA devices"
depends on SND!=n && ISA && ISA_DMA_API
menuconfig SND_ISA
bool "ISA sound devices"
depends on ISA && ISA_DMA_API
default y
help
Support for sound devices connected via the ISA bus.
if SND_ISA
config SND_ADLIB
tristate "AdLib FM card"
depends on SND
select SND_OPL3_LIB
help
Say Y here to include support for AdLib FM cards.
......@@ -36,7 +41,7 @@ config SND_ADLIB
config SND_AD1816A
tristate "Analog Devices SoundPort AD1816A"
depends on SND && PNP && ISA
depends on PNP
select ISAPNP
select SND_OPL3_LIB
select SND_MPU401_UART
......@@ -50,7 +55,6 @@ config SND_AD1816A
config SND_AD1848
tristate "Generic AD1848/CS4248 driver"
depends on SND
select SND_AD1848_LIB
help
Say Y here to include support for AD1848 (Analog Devices) or
......@@ -64,7 +68,7 @@ config SND_AD1848
config SND_ALS100
tristate "Avance Logic ALS100/ALS120"
depends on SND && PNP && ISA
depends on PNP
select ISAPNP
select SND_OPL3_LIB
select SND_MPU401_UART
......@@ -78,7 +82,7 @@ config SND_ALS100
config SND_AZT2320
tristate "Aztech Systems AZT2320"
depends on SND && PNP && ISA
depends on PNP
select ISAPNP
select SND_OPL3_LIB
select SND_MPU401_UART
......@@ -92,7 +96,6 @@ config SND_AZT2320
config SND_CMI8330
tristate "C-Media CMI8330"
depends on SND
select SND_AD1848_LIB
select SND_SB16_DSP
help
......@@ -104,7 +107,6 @@ config SND_CMI8330
config SND_CS4231
tristate "Generic Cirrus Logic CS4231 driver"
depends on SND
select SND_MPU401_UART
select SND_CS4231_LIB
help
......@@ -116,7 +118,6 @@ config SND_CS4231
config SND_CS4232
tristate "Generic Cirrus Logic CS4232 driver"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_CS4231_LIB
......@@ -129,7 +130,6 @@ config SND_CS4232
config SND_CS4236
tristate "Generic Cirrus Logic CS4236+ driver"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_CS4231_LIB
......@@ -142,7 +142,7 @@ config SND_CS4236
config SND_DT019X
tristate "Diamond Technologies DT-019X, Avance Logic ALS-007"
depends on SND && PNP && ISA
depends on PNP
select ISAPNP
select SND_OPL3_LIB
select SND_MPU401_UART
......@@ -156,7 +156,7 @@ config SND_DT019X
config SND_ES968
tristate "Generic ESS ES968 driver"
depends on SND && PNP && ISA
depends on PNP
select ISAPNP
select SND_MPU401_UART
select SND_SB8_DSP
......@@ -168,7 +168,6 @@ config SND_ES968
config SND_ES1688
tristate "Generic ESS ES688/ES1688 driver"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_PCM
......@@ -181,7 +180,6 @@ config SND_ES1688
config SND_ES18XX
tristate "Generic ESS ES18xx driver"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_PCM
......@@ -193,7 +191,7 @@ config SND_ES18XX
config SND_SC6000
tristate "Gallant SC-6000, Audio Excel DSP 16"
depends on SND && HAS_IOPORT
depends on HAS_IOPORT
select SND_AD1848_LIB
select SND_OPL3_LIB
select SND_MPU401_UART
......@@ -204,15 +202,10 @@ config SND_SC6000
To compile this driver as a module, choose M here: the module
will be called snd-sc6000.
config SND_GUS_SYNTH
tristate
config SND_GUSCLASSIC
tristate "Gravis UltraSound Classic"
depends on SND
select SND_RAWMIDI
select SND_PCM
select SND_GUS_SYNTH
help
Say Y here to include support for Gravis UltraSound Classic
soundcards.
......@@ -222,11 +215,9 @@ config SND_GUSCLASSIC
config SND_GUSEXTREME
tristate "Gravis UltraSound Extreme"
depends on SND
select SND_HWDEP
select SND_MPU401_UART
select SND_PCM
select SND_GUS_SYNTH
help
Say Y here to include support for Gravis UltraSound Extreme
soundcards.
......@@ -236,10 +227,8 @@ config SND_GUSEXTREME
config SND_GUSMAX
tristate "Gravis UltraSound MAX"
depends on SND
select SND_RAWMIDI
select SND_CS4231_LIB
select SND_GUS_SYNTH
help
Say Y here to include support for Gravis UltraSound MAX
soundcards.
......@@ -249,10 +238,9 @@ config SND_GUSMAX
config SND_INTERWAVE
tristate "AMD InterWave, Gravis UltraSound PnP"
depends on SND && PNP && ISA
depends on PNP
select SND_RAWMIDI
select SND_CS4231_LIB
select SND_GUS_SYNTH
help
Say Y here to include support for AMD InterWave based
soundcards (Gravis UltraSound Plug & Play, STB SoundRage32,
......@@ -263,10 +251,9 @@ config SND_INTERWAVE
config SND_INTERWAVE_STB
tristate "AMD InterWave + TEA6330T (UltraSound 32-Pro)"
depends on SND && PNP && ISA
depends on PNP
select SND_RAWMIDI
select SND_CS4231_LIB
select SND_GUS_SYNTH
help
Say Y here to include support for AMD InterWave based
soundcards with a TEA6330T bass and treble regulator
......@@ -277,7 +264,6 @@ config SND_INTERWAVE_STB
config SND_OPL3SA2
tristate "Yamaha OPL3-SA2/SA3"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_CS4231_LIB
......@@ -290,7 +276,6 @@ config SND_OPL3SA2
config SND_OPTI92X_AD1848
tristate "OPTi 82C92x - AD1848"
depends on SND
select SND_OPL3_LIB
select SND_OPL4_LIB
select SND_MPU401_UART
......@@ -304,7 +289,6 @@ config SND_OPTI92X_AD1848
config SND_OPTI92X_CS4231
tristate "OPTi 82C92x - CS4231"
depends on SND
select SND_OPL3_LIB
select SND_OPL4_LIB
select SND_MPU401_UART
......@@ -318,10 +302,9 @@ config SND_OPTI92X_CS4231
config SND_OPTI93X
tristate "OPTi 82C93x"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_PCM
select SND_CS4231_LIB
help
Say Y here to include support for soundcards based on Opti
82C93x chips.
......@@ -331,7 +314,6 @@ config SND_OPTI93X
config SND_MIRO
tristate "Miro miroSOUND PCM1pro/PCM12/PCM20radio driver"
depends on SND
select SND_OPL4_LIB
select SND_CS4231_LIB
select SND_MPU401_UART
......@@ -345,7 +327,6 @@ config SND_MIRO
config SND_SB8
tristate "Sound Blaster 1.0/2.0/Pro (8-bit)"
depends on SND
select SND_OPL3_LIB
select SND_RAWMIDI
select SND_SB8_DSP
......@@ -358,7 +339,6 @@ config SND_SB8
config SND_SB16
tristate "Sound Blaster 16 (PnP)"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_SB16_DSP
......@@ -371,7 +351,6 @@ config SND_SB16
config SND_SBAWE
tristate "Sound Blaster AWE (32,64) (PnP)"
depends on SND
select SND_OPL3_LIB
select SND_MPU401_UART
select SND_SB16_DSP
......@@ -402,7 +381,6 @@ config SND_SB16_CSP_FIRMWARE_IN_KERNEL
config SND_SGALAXY
tristate "Aztech Sound Galaxy"
depends on SND
select SND_AD1848_LIB
help
Say Y here to include support for Aztech Sound Galaxy
......@@ -413,7 +391,6 @@ config SND_SGALAXY
config SND_SSCAPE
tristate "Ensoniq SoundScape PnP driver"
depends on SND
select SND_HWDEP
select SND_MPU401_UART
select SND_CS4231_LIB
......@@ -426,7 +403,6 @@ config SND_SSCAPE
config SND_WAVEFRONT
tristate "Turtle Beach Maui,Tropez,Tropez+ (Wavefront)"
depends on SND
select FW_LOADER
select SND_OPL3_LIB
select SND_MPU401_UART
......@@ -448,4 +424,5 @@ config SND_WAVEFRONT_FIRMWARE_IN_KERNEL
you need to install the firmware files from the
alsa-firmware package.
endmenu
endif # SND_ISA
......@@ -119,6 +119,42 @@ static unsigned char snd_cs4231_original_image[32] =
0x00, /* 1f/31 - cbrl */
};
static unsigned char snd_opti93x_original_image[32] =
{
0x00, /* 00/00 - l_mixout_outctrl */
0x00, /* 01/01 - r_mixout_outctrl */
0x88, /* 02/02 - l_cd_inctrl */
0x88, /* 03/03 - r_cd_inctrl */
0x88, /* 04/04 - l_a1/fm_inctrl */
0x88, /* 05/05 - r_a1/fm_inctrl */
0x80, /* 06/06 - l_dac_inctrl */
0x80, /* 07/07 - r_dac_inctrl */
0x00, /* 08/08 - ply_dataform_reg */
0x00, /* 09/09 - if_conf */
0x00, /* 0a/10 - pin_ctrl */
0x00, /* 0b/11 - err_init_reg */
0x0a, /* 0c/12 - id_reg */
0x00, /* 0d/13 - reserved */
0x00, /* 0e/14 - ply_upcount_reg */
0x00, /* 0f/15 - ply_lowcount_reg */
0x88, /* 10/16 - reserved/l_a1_inctrl */
0x88, /* 11/17 - reserved/r_a1_inctrl */
0x88, /* 12/18 - l_line_inctrl */
0x88, /* 13/19 - r_line_inctrl */
0x88, /* 14/20 - l_mic_inctrl */
0x88, /* 15/21 - r_mic_inctrl */
0x80, /* 16/22 - l_out_outctrl */
0x80, /* 17/23 - r_out_outctrl */
0x00, /* 18/24 - reserved */
0x00, /* 19/25 - reserved */
0x00, /* 1a/26 - reserved */
0x00, /* 1b/27 - reserved */
0x00, /* 1c/28 - cap_dataform_reg */
0x00, /* 1d/29 - reserved */
0x00, /* 1e/30 - cap_upcount_reg */
0x00 /* 1f/31 - cap_lowcount_reg */
};
/*
* Basic I/O functions
*/
......@@ -895,7 +931,7 @@ static int snd_cs4231_capture_prepare(struct snd_pcm_substream *substream)
return 0;
}
static void snd_cs4231_overrange(struct snd_cs4231 *chip)
void snd_cs4231_overrange(struct snd_cs4231 *chip)
{
unsigned long flags;
unsigned char res;
......@@ -1054,8 +1090,11 @@ static int snd_cs4231_probe(struct snd_cs4231 *chip)
chip->image[CS4231_IFACE_CTRL] =
(chip->image[CS4231_IFACE_CTRL] & ~CS4231_SINGLE_DMA) |
(chip->single_dma ? CS4231_SINGLE_DMA : 0);
chip->image[CS4231_ALT_FEATURE_1] = 0x80;
chip->image[CS4231_ALT_FEATURE_2] = chip->hardware == CS4231_HW_INTERWAVE ? 0xc2 : 0x01;
if (chip->hardware != CS4231_HW_OPTI93X) {
chip->image[CS4231_ALT_FEATURE_1] = 0x80;
chip->image[CS4231_ALT_FEATURE_2] =
chip->hardware == CS4231_HW_INTERWAVE ? 0xc2 : 0x01;
}
ptr = (unsigned char *) &chip->image;
snd_cs4231_mce_down(chip);
spin_lock_irqsave(&chip->reg_lock, flags);
......@@ -1376,6 +1415,7 @@ const char *snd_cs4231_chip_id(struct snd_cs4231 *chip)
case CS4231_HW_INTERWAVE: return "AMD InterWave";
case CS4231_HW_OPL3SA2: return chip->card->shortname;
case CS4231_HW_AD1845: return "AD1845";
case CS4231_HW_OPTI93X: return "OPTi 93x";
default: return "???";
}
}
......@@ -1401,8 +1441,13 @@ static int snd_cs4231_new(struct snd_card *card,
chip->rate_constraint = snd_cs4231_xrate;
chip->set_playback_format = snd_cs4231_playback_format;
chip->set_capture_format = snd_cs4231_capture_format;
memcpy(&chip->image, &snd_cs4231_original_image, sizeof(snd_cs4231_original_image));
if (chip->hardware == CS4231_HW_OPTI93X)
memcpy(&chip->image, &snd_opti93x_original_image,
sizeof(snd_opti93x_original_image));
else
memcpy(&chip->image, &snd_cs4231_original_image,
sizeof(snd_cs4231_original_image));
*rchip = chip;
return 0;
}
......@@ -1790,6 +1835,48 @@ CS4231_SINGLE("Loopback Capture Switch", 0, CS4231_LOOPBACK, 0, 1, 0),
CS4231_SINGLE("Loopback Capture Volume", 0, CS4231_LOOPBACK, 2, 63, 1)
};
static struct snd_kcontrol_new snd_opti93x_controls[] = {
CS4231_DOUBLE("Master Playback Switch", 0,
OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 7, 7, 1, 1),
CS4231_DOUBLE("Master Playback Volume", 0,
OPTi93X_OUT_LEFT, OPTi93X_OUT_RIGHT, 1, 1, 31, 1),
CS4231_DOUBLE("PCM Playback Switch", 0,
CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 7, 7, 1, 1),
CS4231_DOUBLE("PCM Playback Volume", 0,
CS4231_LEFT_OUTPUT, CS4231_RIGHT_OUTPUT, 0, 0, 31, 1),
CS4231_DOUBLE("FM Playback Switch", 0,
CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 7, 7, 1, 1),
CS4231_DOUBLE("FM Playback Volume", 0,
CS4231_AUX2_LEFT_INPUT, CS4231_AUX2_RIGHT_INPUT, 1, 1, 15, 1),
CS4231_DOUBLE("Line Playback Switch", 0,
CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 7, 7, 1, 1),
CS4231_DOUBLE("Line Playback Volume", 0,
CS4231_LEFT_LINE_IN, CS4231_RIGHT_LINE_IN, 0, 0, 15, 1),
CS4231_DOUBLE("Mic Playback Switch", 0,
OPTi93X_MIC_LEFT_INPUT, OPTi93X_MIC_RIGHT_INPUT, 7, 7, 1, 1),
CS4231_DOUBLE("Mic Playback Volume", 0,
OPTi93X_MIC_LEFT_INPUT, OPTi93X_MIC_RIGHT_INPUT, 1, 1, 15, 1),
CS4231_DOUBLE("Mic Boost", 0,
CS4231_LEFT_INPUT, CS4231_RIGHT_INPUT, 5, 5, 1, 0),
CS4231_DOUBLE("CD Playback Switch", 0,
CS4231_AUX1_LEFT_INPUT, CS4231_AUX1_RIGHT_INPUT, 7, 7, 1, 1),
CS4231_DOUBLE("CD Playback Volume", 0,
CS4231_AUX1_LEFT_INPUT, CS4231_AUX1_RIGHT_INPUT, 1, 1, 15, 1),
CS4231_DOUBLE("Aux Playback Switch", 0,
OPTi931_AUX_LEFT_INPUT, OPTi931_AUX_RIGHT_INPUT, 7, 7, 1, 1),
CS4231_DOUBLE("Aux Playback Volume", 0,
OPTi931_AUX_LEFT_INPUT, OPTi931_AUX_RIGHT_INPUT, 1, 1, 15, 1),
CS4231_DOUBLE("Capture Volume", 0,
CS4231_LEFT_INPUT, CS4231_RIGHT_INPUT, 0, 0, 15, 0),
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Capture Source",
.info = snd_cs4231_info_mux,
.get = snd_cs4231_get_mux,
.put = snd_cs4231_put_mux,
}
};
int snd_cs4231_mixer(struct snd_cs4231 *chip)
{
struct snd_card *card;
......@@ -1802,10 +1889,22 @@ int snd_cs4231_mixer(struct snd_cs4231 *chip)
strcpy(card->mixername, chip->pcm->name);
for (idx = 0; idx < ARRAY_SIZE(snd_cs4231_controls); idx++) {
if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_cs4231_controls[idx], chip))) < 0)
return err;
}
if (chip->hardware == CS4231_HW_OPTI93X)
for (idx = 0; idx < ARRAY_SIZE(snd_opti93x_controls); idx++) {
err = snd_ctl_add(card,
snd_ctl_new1(&snd_opti93x_controls[idx],
chip));
if (err < 0)
return err;
}
else
for (idx = 0; idx < ARRAY_SIZE(snd_cs4231_controls); idx++) {
err = snd_ctl_add(card,
snd_ctl_new1(&snd_cs4231_controls[idx],
chip));
if (err < 0)
return err;
}
return 0;
}
......@@ -1815,6 +1914,7 @@ EXPORT_SYMBOL(snd_cs4236_ext_out);
EXPORT_SYMBOL(snd_cs4236_ext_in);
EXPORT_SYMBOL(snd_cs4231_mce_up);
EXPORT_SYMBOL(snd_cs4231_mce_down);
EXPORT_SYMBOL(snd_cs4231_overrange);
EXPORT_SYMBOL(snd_cs4231_interrupt);
EXPORT_SYMBOL(snd_cs4231_chip_id);
EXPORT_SYMBOL(snd_cs4231_create);
......
This diff is collapsed.
......@@ -34,5 +34,3 @@ ifeq ($(CONFIG_SND_SB16_CSP),y)
obj-$(CONFIG_SND_SBAWE) += snd-sb16-csp.o
endif
obj-$(call sequencer,$(CONFIG_SND_SBAWE)) += snd-emu8000-synth.o
obj-m := $(sort $(obj-m))
......@@ -1939,7 +1939,7 @@ static int __devinit
wavefront_download_firmware (snd_wavefront_t *dev, char *path)
{
unsigned char *buf;
const unsigned char *buf;
int len, err;
int section_cnt_downloaded = 0;
const struct firmware *firmware;
......
# ALSA MIPS drivers
menu "ALSA MIPS devices"
depends on SND!=n && MIPS
menuconfig SND_MIPS
bool "MIPS sound devices"
depends on MIPS
default y
help
Support for sound devices of MIPS architectures.
if SND_MIPS
config SND_SGI_O2
tristate "SGI O2 Audio"
depends on SGI_IP32
help
Sound support for the SGI O2 Workstation.
config SND_SGI_HAL2
tristate "SGI HAL2 Audio"
depends on SGI_HAS_HAL2
help
Sound support for the SGI Indy and Indigo2 Workstation.
config SND_AU1X00
tristate "Au1x00 AC97 Port Driver"
depends on (SOC_AU1000 || SOC_AU1100 || SOC_AU1500) && SND
depends on SOC_AU1000 || SOC_AU1100 || SOC_AU1500
select SND_PCM
select SND_AC97_CODEC
help
ALSA Sound driver for the Au1x00's AC97 port.
endmenu
endif # SND_MIPS
......@@ -3,6 +3,10 @@
#
snd-au1x00-objs := au1x00.o
snd-sgi-o2-objs := sgio2audio.o ad1843.o
snd-sgi-hal2-objs := hal2.o
# Toplevel Module Dependency
obj-$(CONFIG_SND_AU1X00) += snd-au1x00.o
obj-$(CONFIG_SND_SGI_O2) += snd-sgi-o2.o
obj-$(CONFIG_SND_SGI_HAL2) += snd-sgi-hal2.o
This diff is collapsed.
This diff is collapsed.
#ifndef __HAL2_H
#define __HAL2_H
/*
* Driver for HAL2 sound processors
* Copyright (c) 1999 Ulf Carlsson <ulfc@bun.falkenberg.se>
* Copyright (c) 2001, 2002, 2003 Ladislav Michl <ladis@linux-mips.org>
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#include <linux/types.h>
/* Indirect status register */
#define H2_ISR_TSTATUS 0x01 /* RO: transaction status 1=busy */
#define H2_ISR_USTATUS 0x02 /* RO: utime status bit 1=armed */
#define H2_ISR_QUAD_MODE 0x04 /* codec mode 0=indigo 1=quad */
#define H2_ISR_GLOBAL_RESET_N 0x08 /* chip global reset 0=reset */
#define H2_ISR_CODEC_RESET_N 0x10 /* codec/synth reset 0=reset */
/* Revision register */
#define H2_REV_AUDIO_PRESENT 0x8000 /* RO: audio present 0=present */
#define H2_REV_BOARD_M 0x7000 /* RO: bits 14:12, board revision */
#define H2_REV_MAJOR_CHIP_M 0x00F0 /* RO: bits 7:4, major chip revision */
#define H2_REV_MINOR_CHIP_M 0x000F /* RO: bits 3:0, minor chip revision */
/* Indirect address register */
/*
* Address of indirect internal register to be accessed. A write to this
* register initiates read or write access to the indirect registers in the
* HAL2. Note that there af four indirect data registers for write access to
* registers larger than 16 byte.
*/
#define H2_IAR_TYPE_M 0xF000 /* bits 15:12, type of functional */
/* block the register resides in */
/* 1=DMA Port */
/* 9=Global DMA Control */
/* 2=Bresenham */
/* 3=Unix Timer */
#define H2_IAR_NUM_M 0x0F00 /* bits 11:8 instance of the */
/* blockin which the indirect */
/* register resides */
/* If IAR_TYPE_M=DMA Port: */
/* 1=Synth In */
/* 2=AES In */
/* 3=AES Out */
/* 4=DAC Out */
/* 5=ADC Out */
/* 6=Synth Control */
/* If IAR_TYPE_M=Global DMA Control: */
/* 1=Control */
/* If IAR_TYPE_M=Bresenham: */
/* 1=Bresenham Clock Gen 1 */
/* 2=Bresenham Clock Gen 2 */
/* 3=Bresenham Clock Gen 3 */
/* If IAR_TYPE_M=Unix Timer: */
/* 1=Unix Timer */
#define H2_IAR_ACCESS_SELECT 0x0080 /* 1=read 0=write */
#define H2_IAR_PARAM 0x000C /* Parameter Select */
#define H2_IAR_RB_INDEX_M 0x0003 /* Read Back Index */
/* 00:word0 */
/* 01:word1 */
/* 10:word2 */
/* 11:word3 */
/*
* HAL2 internal addressing
*
* The HAL2 has "indirect registers" (idr) which are accessed by writing to the
* Indirect Data registers. Write the address to the Indirect Address register
* to transfer the data.
*
* We define the H2IR_* to the read address and H2IW_* to the write address and
* H2I_* to be fields in whatever register is referred to.
*
* When we write to indirect registers which are larger than one word (16 bit)
* we have to fill more than one indirect register before writing. When we read
* back however we have to read several times, each time with different Read
* Back Indexes (there are defs for doing this easily).
*/
/*
* Relay Control
*/
#define H2I_RELAY_C 0x9100
#define H2I_RELAY_C_STATE 0x01 /* state of RELAY pin signal */
/* DMA port enable */
#define H2I_DMA_PORT_EN 0x9104
#define H2I_DMA_PORT_EN_SY_IN 0x01 /* Synth_in DMA port */
#define H2I_DMA_PORT_EN_AESRX 0x02 /* AES receiver DMA port */
#define H2I_DMA_PORT_EN_AESTX 0x04 /* AES transmitter DMA port */
#define H2I_DMA_PORT_EN_CODECTX 0x08 /* CODEC transmit DMA port */
#define H2I_DMA_PORT_EN_CODECR 0x10 /* CODEC receive DMA port */
#define H2I_DMA_END 0x9108 /* global dma endian select */
#define H2I_DMA_END_SY_IN 0x01 /* Synth_in DMA port */
#define H2I_DMA_END_AESRX 0x02 /* AES receiver DMA port */
#define H2I_DMA_END_AESTX 0x04 /* AES transmitter DMA port */
#define H2I_DMA_END_CODECTX 0x08 /* CODEC transmit DMA port */
#define H2I_DMA_END_CODECR 0x10 /* CODEC receive DMA port */
/* 0=b_end 1=l_end */
#define H2I_DMA_DRV 0x910C /* global PBUS DMA enable */
#define H2I_SYNTH_C 0x1104 /* Synth DMA control */
#define H2I_AESRX_C 0x1204 /* AES RX dma control */
#define H2I_C_TS_EN 0x20 /* Timestamp enable */
#define H2I_C_TS_FRMT 0x40 /* Timestamp format */
#define H2I_C_NAUDIO 0x80 /* Sign extend */
/* AESRX CTL, 16 bit */
#define H2I_AESTX_C 0x1304 /* AES TX DMA control */
#define H2I_AESTX_C_CLKID_SHIFT 3 /* Bresenham Clock Gen 1-3 */
#define H2I_AESTX_C_CLKID_M 0x18
#define H2I_AESTX_C_DATAT_SHIFT 8 /* 1=mono 2=stereo (3=quad) */
#define H2I_AESTX_C_DATAT_M 0x300
/* CODEC registers */
#define H2I_DAC_C1 0x1404 /* DAC DMA control, 16 bit */
#define H2I_DAC_C2 0x1408 /* DAC DMA control, 32 bit */
#define H2I_ADC_C1 0x1504 /* ADC DMA control, 16 bit */
#define H2I_ADC_C2 0x1508 /* ADC DMA control, 32 bit */
/* Bits in CTL1 register */
#define H2I_C1_DMA_SHIFT 0 /* DMA channel */
#define H2I_C1_DMA_M 0x7
#define H2I_C1_CLKID_SHIFT 3 /* Bresenham Clock Gen 1-3 */
#define H2I_C1_CLKID_M 0x18
#define H2I_C1_DATAT_SHIFT 8 /* 1=mono 2=stereo (3=quad) */
#define H2I_C1_DATAT_M 0x300
/* Bits in CTL2 register */
#define H2I_C2_R_GAIN_SHIFT 0 /* right a/d input gain */
#define H2I_C2_R_GAIN_M 0xf
#define H2I_C2_L_GAIN_SHIFT 4 /* left a/d input gain */
#define H2I_C2_L_GAIN_M 0xf0
#define H2I_C2_R_SEL 0x100 /* right input select */
#define H2I_C2_L_SEL 0x200 /* left input select */
#define H2I_C2_MUTE 0x400 /* mute */
#define H2I_C2_DO1 0x00010000 /* digital output port bit 0 */
#define H2I_C2_DO2 0x00020000 /* digital output port bit 1 */
#define H2I_C2_R_ATT_SHIFT 18 /* right d/a output - */
#define H2I_C2_R_ATT_M 0x007c0000 /* attenuation */
#define H2I_C2_L_ATT_SHIFT 23 /* left d/a output - */
#define H2I_C2_L_ATT_M 0x0f800000 /* attenuation */
#define H2I_SYNTH_MAP_C 0x1104 /* synth dma handshake ctrl */
/* Clock generator CTL 1, 16 bit */
#define H2I_BRES1_C1 0x2104
#define H2I_BRES2_C1 0x2204
#define H2I_BRES3_C1 0x2304
#define H2I_BRES_C1_SHIFT 0 /* 0=48.0 1=44.1 2=aes_rx */
#define H2I_BRES_C1_M 0x03
/* Clock generator CTL 2, 32 bit */
#define H2I_BRES1_C2 0x2108
#define H2I_BRES2_C2 0x2208
#define H2I_BRES3_C2 0x2308
#define H2I_BRES_C2_INC_SHIFT 0 /* increment value */
#define H2I_BRES_C2_INC_M 0xffff
#define H2I_BRES_C2_MOD_SHIFT 16 /* modcontrol value */
#define H2I_BRES_C2_MOD_M 0xffff0000 /* modctrl=0xffff&(modinc-1) */
/* Unix timer, 64 bit */
#define H2I_UTIME 0x3104
#define H2I_UTIME_0_LD 0xffff /* microseconds, LSB's */
#define H2I_UTIME_1_LD0 0x0f /* microseconds, MSB's */
#define H2I_UTIME_1_LD1 0xf0 /* tenths of microseconds */
#define H2I_UTIME_2_LD 0xffff /* seconds, LSB's */
#define H2I_UTIME_3_LD 0xffff /* seconds, MSB's */
struct hal2_ctl_regs {
u32 _unused0[4];
u32 isr; /* 0x10 Status Register */
u32 _unused1[3];
u32 rev; /* 0x20 Revision Register */
u32 _unused2[3];
u32 iar; /* 0x30 Indirect Address Register */
u32 _unused3[3];
u32 idr0; /* 0x40 Indirect Data Register 0 */
u32 _unused4[3];
u32 idr1; /* 0x50 Indirect Data Register 1 */
u32 _unused5[3];
u32 idr2; /* 0x60 Indirect Data Register 2 */
u32 _unused6[3];
u32 idr3; /* 0x70 Indirect Data Register 3 */
};
struct hal2_aes_regs {
u32 rx_stat[2]; /* Status registers */
u32 rx_cr[2]; /* Control registers */
u32 rx_ud[4]; /* User data window */
u32 rx_st[24]; /* Channel status data */
u32 tx_stat[1]; /* Status register */
u32 tx_cr[3]; /* Control registers */
u32 tx_ud[4]; /* User data window */
u32 tx_st[24]; /* Channel status data */
};
struct hal2_vol_regs {
u32 right; /* Right volume */
u32 left; /* Left volume */
};
struct hal2_syn_regs {
u32 _unused0[2];
u32 page; /* DOC Page register */
u32 regsel; /* DOC Register selection */
u32 dlow; /* DOC Data low */
u32 dhigh; /* DOC Data high */
u32 irq; /* IRQ Status */
u32 dram; /* DRAM Access */
};
#endif /* __HAL2_H */
This diff is collapsed.
This diff is collapsed.
......@@ -211,10 +211,6 @@ static int state_unit = -1;
static int irq_installed;
#endif /* MODULE */
/* software implemented recording volume! */
uint software_input_volume = SW_INPUT_VOLUME_SCALE * SW_INPUT_VOLUME_DEFAULT;
EXPORT_SYMBOL(software_input_volume);
/* control over who can modify resources shared between play/record */
static mode_t shared_resource_owner;
static int shared_resources_initialised;
......@@ -1188,7 +1184,7 @@ static struct {
/* publish this function for use by low-level code, if required */
char *get_afmt_string(int afmt)
static char *get_afmt_string(int afmt)
{
switch(afmt) {
case AFMT_MU_LAW:
......@@ -1551,4 +1547,3 @@ EXPORT_SYMBOL(dmasound_catchRadius);
EXPORT_SYMBOL(dmasound_ulaw2dma8);
EXPORT_SYMBOL(dmasound_alaw2dma8);
#endif
EXPORT_SYMBOL(get_afmt_string) ;
......@@ -710,7 +710,7 @@ static MACHINE machAmiga = {
/*** Config & Setup **********************************************************/
int __init dmasound_paula_init(void)
static int __init dmasound_paula_init(void)
{
int err;
......
......@@ -611,7 +611,7 @@ static MACHINE machQ40 = {
/*** Config & Setup **********************************************************/
int __init dmasound_q40_init(void)
static int __init dmasound_q40_init(void)
{
if (MACH_IS_Q40) {
dmasound.mach = machQ40;
......
......@@ -20,8 +20,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: msnd.c,v 1.17 1999/03/21 16:50:09 andrewtv Exp $
*
********************************************************************/
#include <linux/module.h>
......
......@@ -24,8 +24,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: msnd.h,v 1.36 1999/03/21 17:05:42 andrewtv Exp $
*
********************************************************************/
#ifndef __MSND_H
#define __MSND_H
......
......@@ -24,8 +24,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: msnd_classic.h,v 1.10 1999/03/21 17:36:09 andrewtv Exp $
*
********************************************************************/
#ifndef __MSND_CLASSIC_H
#define __MSND_CLASSIC_H
......
......@@ -29,13 +29,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: msnd_pinnacle.c,v 1.8 2000/12/30 00:33:21 sycamore Exp $
*
* 12-3-2000 Modified IO port validation Steve Sycamore
*
*
* $$$: msnd_pinnacle.c,v 1.75 1999/03/21 16:50:09 andrewtv $$$ $
*
********************************************************************/
#include <linux/kernel.h>
......
......@@ -24,8 +24,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: msnd_pinnacle.h,v 1.11 1999/03/21 17:36:09 andrewtv Exp $
*
********************************************************************/
#ifndef __MSND_PINNACLE_H
#define __MSND_PINNACLE_H
......
# ALSA PA-RISC drivers
menu "GSC devices"
depends on SND!=n && GSC
menuconfig SND_GSC
bool "GSC sound devices"
depends on GSC
default y
help
Support for GSC sound devices on PA-RISC architectures.
if SND_GSC
config SND_HARMONY
tristate "Harmony/Vivace sound chip"
depends on SND
select SND_PCM
help
Say 'Y' or 'M' to include support for the Harmony/Vivace sound
chip found in most GSC-based PA-RISC workstations. It's frequently
provided as part of the Lasi multi-function IC.
endmenu
endif # SND_GSC
This diff is collapsed.
......@@ -13,7 +13,7 @@ snd-bt87x-objs := bt87x.o
snd-cmipci-objs := cmipci.o
snd-cs4281-objs := cs4281.o
snd-cs5530-objs := cs5530.o
snd-ens1370-objs := ens1370.o
snd-ens1370-objs := ens1370.o ak4531_codec.o
snd-ens1371-objs := ens1371.o
snd-es1938-objs := es1938.o
snd-es1968-objs := es1968.o
......
......@@ -3,16 +3,8 @@
# Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz>
#
snd-ac97-codec-objs := ac97_codec.o ac97_pcm.o
ifneq ($(CONFIG_PROC_FS),)
snd-ac97-codec-objs += ac97_proc.o
endif
snd-ak4531-codec-objs := ak4531_codec.o
snd-ac97-codec-y := ac97_codec.o ac97_pcm.o
snd-ac97-codec-$(CONFIG_PROC_FS) += ac97_proc.o
# Toplevel Module Dependency
obj-$(CONFIG_SND_AC97_CODEC) += snd-ac97-codec.o
obj-$(CONFIG_SND_ENS1370) += snd-ak4531-codec.o
obj-m := $(sort $(obj-m))
......@@ -49,8 +49,9 @@ MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control");
#ifdef CONFIG_SND_AC97_POWER_SAVE
static int power_save = CONFIG_SND_AC97_POWER_SAVE_DEFAULT;
module_param(power_save, bool, 0644);
MODULE_PARM_DESC(power_save, "Enable AC97 power-saving control");
module_param(power_save, int, 0644);
MODULE_PARM_DESC(power_save, "Automatic power-saving timeout "
"(in second, 0 = disable).");
#endif
/*
......@@ -2294,9 +2295,11 @@ static void snd_ac97_powerdown(struct snd_ac97 *ac97)
power |= AC97_PD_PR0 | AC97_PD_PR1; /* ADC & DAC powerdown */
snd_ac97_write(ac97, AC97_POWERDOWN, power);
udelay(100);
power |= AC97_PD_PR2 | AC97_PD_PR3; /* Analog Mixer powerdown */
power |= AC97_PD_PR2; /* Analog Mixer powerdown (Vref on) */
snd_ac97_write(ac97, AC97_POWERDOWN, power);
if (ac97_is_power_save_mode(ac97)) {
power |= AC97_PD_PR3; /* Analog Mixer powerdown */
snd_ac97_write(ac97, AC97_POWERDOWN, power);
udelay(100);
/* AC-link powerdown, internal Clk disable */
/* FIXME: this may cause click noises on some boards */
......@@ -2362,7 +2365,7 @@ int snd_ac97_update_power(struct snd_ac97 *ac97, int reg, int powerup)
* that open/close frequently)
*/
schedule_delayed_work(&ac97->power_work,
msecs_to_jiffies(2000));
msecs_to_jiffies(power_save * 1000));
else {
cancel_delayed_work(&ac97->power_work);
update_power_regs(ac97);
......
This diff is collapsed.
/*
* $Id: au88x0_game.c,v 1.9 2003/09/22 03:51:28 mjander Exp $
*
* Manuel Jander.
*
* Based on the work of:
......
This diff is collapsed.
This diff is collapsed.
......@@ -249,6 +249,11 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
.name = "MSI K8N Diamond MB [SB0438]",
.gpio_type = 2,
.i2c_adc = 1 } ,
/* Another MSI K8N Diamond MB, which has apprently a different SSID */
{ .serial = 0x10091102,
.name = "MSI K8N Diamond MB",
.gpio_type = 2,
.i2c_adc = 1 } ,
/* Shuttle XPC SD31P which has an onboard Creative Labs
* Sound Blaster Live! 24-bit EAX
* high-definition 7.1 audio processor".
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment