You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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 ...
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
|
||||
+100
-75
@@ -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);
|
||||
int (*digital_mute)(struct snd_soc_dai *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;
|
||||
};
|
||||
|
||||
/* 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"
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
/* 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 ""
|
||||
|
||||
Reference in New Issue
Block a user