Skip to content

Commit ba252af

Browse files
committed
Merge branch 'topic/asoc' into for-linus
* topic/asoc: (135 commits) ASoC: Apostrophe patrol ASoC: codec tlv320aic23 fix bogus divide by 0 message ASoC: fix NULL pointer dereference in soc_suspend() ASoC: Fix build error in twl4030.c ASoC: SSM2602: assign last substream to the master when shutting down ASoC: Blackfin: document how anomaly 05000250 is handled ASoC: Blackfin: set the transfer size according the ac97_frame size ASoC: SSM2602: remove unsupported sample rates ASoC: TWL4030: Check the interface format for 4 channel mode ASoC: TWL4030: Use reg_cache in twl4030_init_chip ASoC: Initialise dev for the dummy S/PDIF DAI ASoC: Add dummy S/PDIF codec support ASoC: correct print specifiers for unsigneds ASoC: Modify mpc5200 AC97 driver to use V9 of spin_event_timeout() ASoC: Switch FSL SSI DAI over to symmetric_rates ASoC: Mark MPC5200 AC97 as BROKEN until PowerPC merge issues are resolved ASoC: Fabric bindings for STAC9766 on the Efika ASoC: Support for AC97 on Phytec pmc030 base board. ASoC: AC97 driver for mpc5200 ASoC: Main rewite of the mpc5200 audio DMA code ...
2 parents 07a2039 + 74b8f95 commit ba252af

101 files changed

Lines changed: 12466 additions & 1646 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/sound/alsa/soc/dapm.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Audio DAPM widgets fall into a number of types:-
6262
o Mic - Mic (and optional Jack)
6363
o Line - Line Input/Output (and optional Jack)
6464
o Speaker - Speaker
65+
o Supply - Power or clock supply widget used by other widgets.
6566
o Pre - Special PRE widget (exec before all others)
6667
o Post - Special POST widget (exec after all others)
6768

‎MAINTAINERS‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4574,7 +4574,8 @@ F: drivers/pcmcia/pxa2xx*
45744574
F: drivers/spi/pxa2xx*
45754575
F: drivers/usb/gadget/pxa2*
45764576
F: include/sound/pxa2xx-lib.h
4577-
F: sound/soc/pxa/pxa2xx*
4577+
F: sound/arm/pxa*
4578+
F: sound/soc/pxa
45784579

45794580
PXA168 SUPPORT
45804581
P: Eric Miao
@@ -5302,11 +5303,12 @@ P: Liam Girdwood
53025303
M: lrg@slimlogic.co.uk
53035304
P: Mark Brown
53045305
M: broonie@opensource.wolfsonmicro.com
5305-
T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc
5306+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git
53065307
L: alsa-devel@alsa-project.org (subscribers-only)
53075308
W: http://alsa-project.org/main/index.php/ASoC
53085309
S: Supported
53095310
F: sound/soc/
5311+
F: include/sound/soc*
53105312

53115313
SPARC + UltraSPARC (sparc/sparc64)
53125314
P: David S. Miller

‎arch/powerpc/include/asm/mpc52xx_psc.h‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
#define MPC52xx_PSC_MAXNUM 6
2929

3030
/* Programmable Serial Controller (PSC) status register bits */
31+
#define MPC52xx_PSC_SR_UNEX_RX 0x0001
32+
#define MPC52xx_PSC_SR_DATA_VAL 0x0002
33+
#define MPC52xx_PSC_SR_DATA_OVR 0x0004
34+
#define MPC52xx_PSC_SR_CMDSEND 0x0008
3135
#define MPC52xx_PSC_SR_CDE 0x0080
3236
#define MPC52xx_PSC_SR_RXRDY 0x0100
3337
#define MPC52xx_PSC_SR_RXFULL 0x0200
@@ -61,6 +65,12 @@
6165
#define MPC52xx_PSC_RXTX_FIFO_EMPTY 0x0001
6266

6367
/* PSC interrupt status/mask bits */
68+
#define MPC52xx_PSC_IMR_UNEX_RX_SLOT 0x0001
69+
#define MPC52xx_PSC_IMR_DATA_VALID 0x0002
70+
#define MPC52xx_PSC_IMR_DATA_OVR 0x0004
71+
#define MPC52xx_PSC_IMR_CMD_SEND 0x0008
72+
#define MPC52xx_PSC_IMR_ERROR 0x0040
73+
#define MPC52xx_PSC_IMR_DEOF 0x0080
6474
#define MPC52xx_PSC_IMR_TXRDY 0x0100
6575
#define MPC52xx_PSC_IMR_RXRDY 0x0200
6676
#define MPC52xx_PSC_IMR_DB 0x0400
@@ -117,6 +127,7 @@
117127
#define MPC52xx_PSC_SICR_SIM_FIR (0x6 << 24)
118128
#define MPC52xx_PSC_SICR_SIM_CODEC_24 (0x7 << 24)
119129
#define MPC52xx_PSC_SICR_SIM_CODEC_32 (0xf << 24)
130+
#define MPC52xx_PSC_SICR_AWR (1 << 30)
120131
#define MPC52xx_PSC_SICR_GENCLK (1 << 23)
121132
#define MPC52xx_PSC_SICR_I2S (1 << 22)
122133
#define MPC52xx_PSC_SICR_CLKPOL (1 << 21)

‎include/sound/soc-dai.h‎

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,6 @@ struct snd_pcm_substream;
4444
#define SND_SOC_DAIFMT_CONT (0 << 4) /* continuous clock */
4545
#define SND_SOC_DAIFMT_GATED (1 << 4) /* clock is gated */
4646

47-
/*
48-
* DAI Left/Right Clocks.
49-
*
50-
* Specifies whether the DAI can support different samples for similtanious
51-
* playback and capture. This usually requires a seperate physical frame
52-
* clock for playback and capture.
53-
*/
54-
#define SND_SOC_DAIFMT_SYNC (0 << 5) /* Tx FRM = Rx FRM */
55-
#define SND_SOC_DAIFMT_ASYNC (1 << 5) /* Tx FRM ~ Rx FRM */
56-
57-
/*
58-
* TDM
59-
*
60-
* Time Division Multiplexing. Allows PCM data to be multplexed with other
61-
* data on the DAI.
62-
*/
63-
#define SND_SOC_DAIFMT_TDM (1 << 6)
64-
6547
/*
6648
* DAI hardware signal inversions.
6749
*
@@ -96,6 +78,10 @@ struct snd_pcm_substream;
9678
#define SND_SOC_CLOCK_IN 0
9779
#define SND_SOC_CLOCK_OUT 1
9880

81+
#define SND_SOC_STD_AC97_FMTS (SNDRV_PCM_FMTBIT_S16_LE |\
82+
SNDRV_PCM_FMTBIT_S32_LE |\
83+
SNDRV_PCM_FMTBIT_S32_BE)
84+
9985
struct snd_soc_dai_ops;
10086
struct snd_soc_dai;
10187
struct snd_ac97_bus_ops;
@@ -208,6 +194,7 @@ struct snd_soc_dai {
208194
/* DAI capabilities */
209195
struct snd_soc_pcm_stream capture;
210196
struct snd_soc_pcm_stream playback;
197+
unsigned int symmetric_rates:1;
211198

212199
/* DAI runtime info */
213200
struct snd_pcm_runtime *runtime;
@@ -219,11 +206,8 @@ struct snd_soc_dai {
219206
/* DAI private data */
220207
void *private_data;
221208

222-
/* parent codec/platform */
223-
union {
224-
struct snd_soc_codec *codec;
225-
struct snd_soc_platform *platform;
226-
};
209+
/* parent platform */
210+
struct snd_soc_platform *platform;
227211

228212
struct list_head list;
229213
};

‎include/sound/soc-dapm.h‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,30 @@
140140
#define SND_SOC_DAPM_DAC(wname, stname, wreg, wshift, winvert) \
141141
{ .id = snd_soc_dapm_dac, .name = wname, .sname = stname, .reg = wreg, \
142142
.shift = wshift, .invert = winvert}
143+
#define SND_SOC_DAPM_DAC_E(wname, stname, wreg, wshift, winvert, \
144+
wevent, wflags) \
145+
{ .id = snd_soc_dapm_dac, .name = wname, .sname = stname, .reg = wreg, \
146+
.shift = wshift, .invert = winvert, \
147+
.event = wevent, .event_flags = wflags}
143148
#define SND_SOC_DAPM_ADC(wname, stname, wreg, wshift, winvert) \
144149
{ .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \
145150
.shift = wshift, .invert = winvert}
151+
#define SND_SOC_DAPM_ADC_E(wname, stname, wreg, wshift, winvert, \
152+
wevent, wflags) \
153+
{ .id = snd_soc_dapm_adc, .name = wname, .sname = stname, .reg = wreg, \
154+
.shift = wshift, .invert = winvert, \
155+
.event = wevent, .event_flags = wflags}
146156

147-
/* generic register modifier widget */
157+
/* generic widgets */
148158
#define SND_SOC_DAPM_REG(wid, wname, wreg, wshift, wmask, won_val, woff_val) \
149159
{ .id = wid, .name = wname, .kcontrols = NULL, .num_kcontrols = 0, \
150160
.reg = -((wreg) + 1), .shift = wshift, .mask = wmask, \
151161
.on_val = won_val, .off_val = woff_val, .event = dapm_reg_event, \
152162
.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}
163+
#define SND_SOC_DAPM_SUPPLY(wname, wreg, wshift, winvert, wevent, wflags) \
164+
{ .id = snd_soc_dapm_supply, .name = wname, .reg = wreg, \
165+
.shift = wshift, .invert = winvert, .event = wevent, \
166+
.event_flags = wflags}
153167

154168
/* dapm kcontrol types */
155169
#define SOC_DAPM_SINGLE(xname, reg, shift, max, invert) \
@@ -265,8 +279,6 @@ int snd_soc_dapm_add_routes(struct snd_soc_codec *codec,
265279
/* dapm events */
266280
int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, char *stream,
267281
int event);
268-
int snd_soc_dapm_set_bias_level(struct snd_soc_device *socdev,
269-
enum snd_soc_bias_level level);
270282

271283
/* dapm sys fs - used by the core */
272284
int snd_soc_dapm_sys_add(struct device *dev);
@@ -298,6 +310,7 @@ enum snd_soc_dapm_type {
298310
snd_soc_dapm_vmid, /* codec bias/vmid - to minimise pops */
299311
snd_soc_dapm_pre, /* machine specific pre widget - exec first */
300312
snd_soc_dapm_post, /* machine specific post widget - exec last */
313+
snd_soc_dapm_supply, /* power/clock supply */
301314
};
302315

303316
/*
@@ -357,6 +370,8 @@ struct snd_soc_dapm_widget {
357370
unsigned char suspend:1; /* was active before suspend */
358371
unsigned char pmdown:1; /* waiting for timeout */
359372

373+
int (*power_check)(struct snd_soc_dapm_widget *w);
374+
360375
/* external events */
361376
unsigned short event_flags; /* flags to specify event types */
362377
int (*event)(struct snd_soc_dapm_widget*, struct snd_kcontrol *, int);
@@ -368,6 +383,9 @@ struct snd_soc_dapm_widget {
368383
/* widget input and outputs */
369384
struct list_head sources;
370385
struct list_head sinks;
386+
387+
/* used during DAPM updates */
388+
struct list_head power_list;
371389
};
372390

373391
#endif

‎include/sound/soc.h‎

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@
118118
.info = snd_soc_info_volsw, \
119119
.get = xhandler_get, .put = xhandler_put, \
120120
.private_value = SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) }
121+
#define SOC_DOUBLE_EXT(xname, xreg, shift_left, shift_right, xmax, xinvert,\
122+
xhandler_get, xhandler_put) \
123+
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname),\
124+
.info = snd_soc_info_volsw, \
125+
.get = xhandler_get, .put = xhandler_put, \
126+
.private_value = (unsigned long)&(struct soc_mixer_control) \
127+
{.reg = xreg, .shift = shift_left, .rshift = shift_right, \
128+
.max = xmax, .invert = xinvert} }
121129
#define SOC_SINGLE_EXT_TLV(xname, xreg, xshift, xmax, xinvert,\
122130
xhandler_get, xhandler_put, tlv_array) \
123131
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
@@ -206,10 +214,6 @@ void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
206214
struct snd_soc_jack_gpio *gpios);
207215
#endif
208216

209-
/* codec IO */
210-
#define snd_soc_read(codec, reg) codec->read(codec, reg)
211-
#define snd_soc_write(codec, reg, value) codec->write(codec, reg, value)
212-
213217
/* codec register bit access */
214218
int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg,
215219
unsigned short mask, unsigned short value);
@@ -331,6 +335,7 @@ struct snd_soc_codec {
331335
struct module *owner;
332336
struct mutex mutex;
333337
struct device *dev;
338+
struct snd_soc_device *socdev;
334339

335340
struct list_head list;
336341

@@ -364,6 +369,8 @@ struct snd_soc_codec {
364369
enum snd_soc_bias_level bias_level;
365370
enum snd_soc_bias_level suspend_bias_level;
366371
struct delayed_work delayed_work;
372+
struct list_head up_list;
373+
struct list_head down_list;
367374

368375
/* codec DAI's */
369376
struct snd_soc_dai *dai;
@@ -417,6 +424,12 @@ struct snd_soc_dai_link {
417424
/* codec/machine specific init - e.g. add machine controls */
418425
int (*init)(struct snd_soc_codec *codec);
419426

427+
/* Symmetry requirements */
428+
unsigned int symmetric_rates:1;
429+
430+
/* Symmetry data - only valid if symmetry is being enforced */
431+
unsigned int rate;
432+
420433
/* DAI pcm */
421434
struct snd_pcm *pcm;
422435
};
@@ -490,6 +503,19 @@ struct soc_enum {
490503
void *dapm;
491504
};
492505

506+
/* codec IO */
507+
static inline unsigned int snd_soc_read(struct snd_soc_codec *codec,
508+
unsigned int reg)
509+
{
510+
return codec->read(codec, reg);
511+
}
512+
513+
static inline unsigned int snd_soc_write(struct snd_soc_codec *codec,
514+
unsigned int reg, unsigned int val)
515+
{
516+
return codec->write(codec, reg, val);
517+
}
518+
493519
#include <sound/soc-dai.h>
494520

495521
#endif

‎include/sound/wm9081.h‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* linux/sound/wm9081.h -- Platform data for WM9081
3+
*
4+
* Copyright 2009 Wolfson Microelectronics. PLC.
5+
*
6+
* This program is free software; you can redistribute it and/or modify
7+
* it under the terms of the GNU General Public License version 2 as
8+
* published by the Free Software Foundation.
9+
*/
10+
11+
#ifndef __LINUX_SND_WM_9081_H
12+
#define __LINUX_SND_WM_9081_H
13+
14+
struct wm9081_retune_mobile_setting {
15+
const char *name;
16+
unsigned int rate;
17+
u16 config[20];
18+
};
19+
20+
struct wm9081_retune_mobile_config {
21+
struct wm9081_retune_mobile_setting *configs;
22+
int num_configs;
23+
};
24+
25+
#endif

‎sound/aoa/fabrics/layout.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,7 +1037,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
10371037
}
10381038
ldev->selfptr_headphone.ptr = ldev;
10391039
ldev->selfptr_lineout.ptr = ldev;
1040-
sdev->ofdev.dev.driver_data = ldev;
1040+
dev_set_drvdata(&sdev->ofdev.dev, ldev);
10411041
list_add(&ldev->list, &layouts_list);
10421042
layouts_list_items++;
10431043

@@ -1081,7 +1081,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
10811081

10821082
static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
10831083
{
1084-
struct layout_dev *ldev = sdev->ofdev.dev.driver_data;
1084+
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
10851085
int i;
10861086

10871087
for (i=0; i<MAX_CODECS_PER_BUS; i++) {
@@ -1114,7 +1114,7 @@ static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
11141114
#ifdef CONFIG_PM
11151115
static int aoa_fabric_layout_suspend(struct soundbus_dev *sdev, pm_message_t state)
11161116
{
1117-
struct layout_dev *ldev = sdev->ofdev.dev.driver_data;
1117+
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
11181118

11191119
if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off)
11201120
ldev->gpio.methods->all_amps_off(&ldev->gpio);
@@ -1124,7 +1124,7 @@ static int aoa_fabric_layout_suspend(struct soundbus_dev *sdev, pm_message_t sta
11241124

11251125
static int aoa_fabric_layout_resume(struct soundbus_dev *sdev)
11261126
{
1127-
struct layout_dev *ldev = sdev->ofdev.dev.driver_data;
1127+
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
11281128

11291129
if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off)
11301130
ldev->gpio.methods->all_amps_restore(&ldev->gpio);

‎sound/aoa/soundbus/i2sbus/core.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,14 +358,14 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)
358358
return -ENODEV;
359359
}
360360

361-
dev->ofdev.dev.driver_data = control;
361+
dev_set_drvdata(&dev->ofdev.dev, control);
362362

363363
return 0;
364364
}
365365

366366
static int i2sbus_remove(struct macio_dev* dev)
367367
{
368-
struct i2sbus_control *control = dev->ofdev.dev.driver_data;
368+
struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
369369
struct i2sbus_dev *i2sdev, *tmp;
370370

371371
list_for_each_entry_safe(i2sdev, tmp, &control->list, item)
@@ -377,7 +377,7 @@ static int i2sbus_remove(struct macio_dev* dev)
377377
#ifdef CONFIG_PM
378378
static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state)
379379
{
380-
struct i2sbus_control *control = dev->ofdev.dev.driver_data;
380+
struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
381381
struct codec_info_item *cii;
382382
struct i2sbus_dev* i2sdev;
383383
int err, ret = 0;
@@ -407,7 +407,7 @@ static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state)
407407

408408
static int i2sbus_resume(struct macio_dev* dev)
409409
{
410-
struct i2sbus_control *control = dev->ofdev.dev.driver_data;
410+
struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
411411
struct codec_info_item *cii;
412412
struct i2sbus_dev* i2sdev;
413413
int err, ret = 0;

‎sound/soc/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ source "sound/soc/fsl/Kconfig"
3232
source "sound/soc/omap/Kconfig"
3333
source "sound/soc/pxa/Kconfig"
3434
source "sound/soc/s3c24xx/Kconfig"
35+
source "sound/soc/s6000/Kconfig"
3536
source "sound/soc/sh/Kconfig"
37+
source "sound/soc/txx9/Kconfig"
3638

3739
# Supported codecs
3840
source "sound/soc/codecs/Kconfig"

0 commit comments

Comments
 (0)