Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230463
b: refs/heads/master
c: d4686c6
h: refs/heads/master
i:
  230461: 215efc5
  230459: 7ac9b70
  230455: dfc5fc3
  230447: 9d0edf2
  230431: 1eb723a
  230399: 650b1a5
v: v3
  • Loading branch information
Jorge Eduardo Candelaria authored and Liam Girdwood committed Dec 23, 2010
1 parent 466b6cf commit d4d6967
Show file tree
Hide file tree
Showing 64 changed files with 625 additions and 6,960 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03cfbdf9f7a1d392146718f67e50fa9ab2844f22
refs/heads/master: d4686c654bb1d7ea226578d5725ca34911d6e34c
1 change: 0 additions & 1 deletion trunk/drivers/video/sh_mobile_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>

Expand Down
43 changes: 18 additions & 25 deletions trunk/include/sound/soc-dapm.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@
#define SND_SOC_DAPM_MUX(wname, wreg, wshift, winvert, wcontrols) \
{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \
.invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1}
#define SND_SOC_DAPM_VIRT_MUX(wname, wreg, wshift, winvert, wcontrols) \
{ .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \
.invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1}
#define SND_SOC_DAPM_VALUE_MUX(wname, wreg, wshift, winvert, wcontrols) \
{ .id = snd_soc_dapm_value_mux, .name = wname, .reg = wreg, \
.shift = wshift, .invert = winvert, .kcontrols = wcontrols, \
Expand Down Expand Up @@ -151,11 +148,6 @@
{ .id = snd_soc_dapm_mux, .name = wname, .reg = wreg, .shift = wshift, \
.invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \
.event = wevent, .event_flags = wflags}
#define SND_SOC_DAPM_VIRT_MUX_E(wname, wreg, wshift, winvert, wcontrols, \
wevent, wflags) \
{ .id = snd_soc_dapm_virt_mux, .name = wname, .reg = wreg, .shift = wshift, \
.invert = winvert, .kcontrols = wcontrols, .num_kcontrols = 1, \
.event = wevent, .event_flags = wflags}

/* Simplified versions of above macros, assuming wncontrols = ARRAY_SIZE(wcontrols) */
#define SOC_PGA_E_ARRAY(wname, wreg, wshift, winvert, wcontrols, \
Expand Down Expand Up @@ -235,13 +227,29 @@
.info = snd_soc_info_volsw, \
.get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \
.private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
#define SOC_DAPM_DOUBLE(xname, reg, shift_left, shift_right, max, invert, \
power) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = (xname), \
.info = snd_soc_info_volsw, \
.get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \
.private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) |\
((max) << 16) | ((invert) << 24) }
#define SOC_DAPM_SINGLE_TLV(xname, reg, shift, max, invert, tlv_array) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_volsw, \
.access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE,\
.tlv.p = (tlv_array), \
.get = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \
.private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
#define SOC_DAPM_DOUBLE_TLV(xname, reg, shift_left, shift_right, max, invert, \
power, 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 = snd_soc_dapm_get_volsw, .put = snd_soc_dapm_put_volsw, \
.private_value = (reg) | ((shift_left) << 8) | ((shift_right) << 12) |\
((max) << 16) | ((invert) << 24) }
#define SOC_DAPM_ENUM(xname, xenum) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_enum_double, \
Expand Down Expand Up @@ -365,7 +373,6 @@ enum snd_soc_dapm_type {
snd_soc_dapm_input = 0, /* input pin */
snd_soc_dapm_output, /* output pin */
snd_soc_dapm_mux, /* selects 1 analog signal from many inputs */
snd_soc_dapm_virt_mux, /* virtual version of snd_soc_dapm_mux */
snd_soc_dapm_value_mux, /* selects 1 analog signal from many inputs */
snd_soc_dapm_mixer, /* mixes several analog signals together */
snd_soc_dapm_mixer_named_ctl, /* mixer with named controls */
Expand Down Expand Up @@ -469,32 +476,18 @@ struct snd_soc_dapm_widget {
struct list_head power_list;
};

struct snd_soc_dapm_update {
struct snd_soc_dapm_widget *widget;
struct snd_kcontrol *kcontrol;
int reg;
int mask;
int val;
};

/* DAPM context */
struct snd_soc_dapm_context {
int n_widgets; /* number of widgets in this context */
struct list_head widgets;
struct list_head paths;
enum snd_soc_bias_level bias_level;
enum snd_soc_bias_level suspend_bias_level;
struct delayed_work delayed_work;
unsigned int idle_bias_off:1; /* Use BIAS_OFF instead of STANDBY */

struct snd_soc_dapm_update *update;

struct device *dev; /* from parent - for debug */
struct snd_soc_codec *codec; /* parent codec */
struct snd_soc_card *card; /* parent card */

/* used during DAPM updates */
int dev_power;
struct list_head list;

#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_dapm;
#endif
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,6 @@ struct snd_soc_card {
struct list_head platform_dev_list;
struct list_head dai_dev_list;

struct list_head widgets;
struct list_head paths;
struct list_head dapm_list;

#ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_card_root;
struct dentry *debugfs_pop_time;
Expand Down
17 changes: 2 additions & 15 deletions trunk/sound/soc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

menuconfig SND_SOC
tristate "ALSA for SoC audio support"
select LZO_COMPRESS
select LZO_DECOMPRESS
select SND_PCM
select AC97_BUS if SND_SOC_AC97_BUS
select SND_JACK if INPUT=y || INPUT=SND
Expand All @@ -20,21 +22,6 @@ menuconfig SND_SOC

if SND_SOC

config SND_SOC_CACHE_LZO
bool "Support LZO compression for register caches"
select LZO_COMPRESS
select LZO_DECOMPRESS
---help---
Select this to enable LZO compression for register caches.
This will allow machine or CODEC drivers to compress register
caches in memory, reducing the memory consumption at the
expense of performance. If this is not present and is used
the system will fall back to uncompressed caches.

Usually it is safe to disable this option, where cache
compression in used the rbtree option will typically perform
better.

config SND_SOC_AC97_BUS
bool

Expand Down
8 changes: 1 addition & 7 deletions trunk/sound/soc/codecs/88pm860x-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <sound/tlv.h>
#include <sound/initval.h>
#include <sound/jack.h>
#include <trace/events/asoc.h>

#include "88pm860x-codec.h"

Expand Down Expand Up @@ -146,6 +145,7 @@ struct pm860x_priv {

int irq[4];
unsigned char name[4][MAX_NAME_LEN];
unsigned char reg_cache[REG_CACHE_SIZE];
};

/* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */
Expand Down Expand Up @@ -1262,12 +1262,6 @@ static irqreturn_t pm860x_codec_handler(int irq, void *data)
mask = pm860x->det.hs_shrt | pm860x->det.hook_det | pm860x->det.lo_shrt
| pm860x->det.hp_det;

#ifndef CONFIG_SND_SOC_88PM860X_MODULE
if (status & (HEADSET_STATUS | MIC_STATUS | SHORT_HS1 | SHORT_HS2 |
SHORT_LO1 | SHORT_LO2))
trace_snd_soc_jack_irq(dev_name(pm860x->codec->dev));
#endif

if ((pm860x->det.hp_det & SND_JACK_HEADPHONE)
&& (status & HEADSET_STATUS))
report |= SND_JACK_HEADPHONE;
Expand Down
4 changes: 0 additions & 4 deletions trunk/sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ config SND_SOC_ALL_CODECS
select SND_SOC_WM8990 if I2C
select SND_SOC_WM8993 if I2C
select SND_SOC_WM8994 if MFD_WM8994
select SND_SOC_WM8995 if SND_SOC_I2C_AND_SPI
select SND_SOC_WM9081 if I2C
select SND_SOC_WM9090 if I2C
select SND_SOC_WM9705 if SND_SOC_AC97_BUS
Expand Down Expand Up @@ -307,9 +306,6 @@ config SND_SOC_WM8993
config SND_SOC_WM8994
tristate

config SND_SOC_WM8995
tristate

config SND_SOC_WM9081
tristate

Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ snd-soc-wm8988-objs := wm8988.o
snd-soc-wm8990-objs := wm8990.o
snd-soc-wm8993-objs := wm8993.o
snd-soc-wm8994-objs := wm8994.o wm8994-tables.o
snd-soc-wm8995-objs := wm8995.o
snd-soc-wm9081-objs := wm9081.o
snd-soc-wm9705-objs := wm9705.o
snd-soc-wm9712-objs := wm9712.o
Expand Down Expand Up @@ -141,7 +140,6 @@ obj-$(CONFIG_SND_SOC_WM8988) += snd-soc-wm8988.o
obj-$(CONFIG_SND_SOC_WM8990) += snd-soc-wm8990.o
obj-$(CONFIG_SND_SOC_WM8993) += snd-soc-wm8993.o
obj-$(CONFIG_SND_SOC_WM8994) += snd-soc-wm8994.o
obj-$(CONFIG_SND_SOC_WM8995) += snd-soc-wm8995.o
obj-$(CONFIG_SND_SOC_WM9081) += snd-soc-wm9081.o
obj-$(CONFIG_SND_SOC_WM9705) += snd-soc-wm9705.o
obj-$(CONFIG_SND_SOC_WM9712) += snd-soc-wm9712.o
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/ad193x.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

/* codec private data */
struct ad193x_priv {
u8 reg_cache[AD193X_NUM_REGS];
enum snd_soc_control_type bus_type;
void *control_data;
int sysclk;
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/ak4671.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
struct ak4671_priv {
enum snd_soc_control_type control_type;
void *control_data;
u8 reg_cache[AK4671_CACHEREGNUM];
};

/* ak4671 register cache & default register settings */
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/cs4270.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ static const char *supply_names[] = {
struct cs4270_private {
enum snd_soc_control_type control_type;
void *control_data;
u8 reg_cache[CS4270_NUMREGS];
unsigned int mclk; /* Input frequency of the MCLK pin */
unsigned int mode; /* The mode (I2S or left-justified) */
unsigned int slave_mode;
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/cs42l51.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct cs42l51_private {
unsigned int mclk;
unsigned int audio_mode; /* The mode (I2S or left-justified) */
enum master_slave_mode func;
u8 reg_cache[CS42L51_NUMREGS];
};

#define CS42L51_FORMATS ( \
Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/cx20442.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
struct cx20442_priv {
enum snd_soc_control_type control_type;
void *control_data;
u8 reg_cache[1];
};

#define CX20442_PM 0x0
Expand Down
10 changes: 6 additions & 4 deletions trunk/sound/soc/codecs/max98088.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct max98088_cdata {
};

struct max98088_priv {
u8 reg_cache[M98088_REG_CNT];
enum max98088_type devtype;
void *control_data;
struct max98088_pdata *pdata;
Expand Down Expand Up @@ -1588,7 +1589,7 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai,

static void max98088_sync_cache(struct snd_soc_codec *codec)
{
u16 *reg_cache = codec->reg_cache;
struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
int i;

if (!codec->cache_sync)
Expand All @@ -1599,14 +1600,14 @@ static void max98088_sync_cache(struct snd_soc_codec *codec)
/* write back cached values if they're writeable and
* different from the hardware default.
*/
for (i = 1; i < codec->driver->reg_cache_size; i++) {
for (i = 1; i < ARRAY_SIZE(max98088->reg_cache); i++) {
if (!max98088_access[i].writable)
continue;

if (reg_cache[i] == max98088_reg[i])
if (max98088->reg_cache[i] == max98088_reg[i])
continue;

snd_soc_write(codec, i, reg_cache[i]);
snd_soc_write(codec, i, max98088->reg_cache[i]);
}

codec->cache_sync = 0;
Expand Down Expand Up @@ -1951,6 +1952,7 @@ static int max98088_probe(struct snd_soc_codec *codec)
int ret = 0;

codec->cache_sync = 1;
memcpy(codec->reg_cache, max98088_reg, sizeof(max98088_reg));

ret = snd_soc_codec_set_cache_io(codec, 8, 8, SND_SOC_I2C);
if (ret != 0) {
Expand Down
4 changes: 3 additions & 1 deletion trunk/sound/soc/codecs/tlv320aic26.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ MODULE_LICENSE("GPL");
struct aic26 {
struct spi_device *spi;
struct snd_soc_codec codec;
u16 reg_cache[AIC26_NUM_REGS]; /* shadow registers */
int master;
int datfm;
int mclk;
Expand Down Expand Up @@ -353,6 +354,7 @@ static DEVICE_ATTR(keyclick, 0644, aic26_keyclick_show, aic26_keyclick_set);
*/
static int aic26_probe(struct snd_soc_codec *codec)
{
struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec);
int ret, err, i, reg;

dev_info(codec->dev, "Probing AIC26 SoC CODEC driver\n");
Expand All @@ -370,7 +372,7 @@ static int aic26_probe(struct snd_soc_codec *codec)
aic26_reg_write(codec, AIC26_REG_AUDIO_CTRL3, reg);

/* Fill register cache */
for (i = 0; i < codec->driver->reg_cache_size; i++)
for (i = 0; i < ARRAY_SIZE(aic26->reg_cache); i++)
aic26_reg_read(codec, i);

/* Register the sysfs files for debugging */
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/soc/codecs/tlv320aic3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,

if (snd_soc_test_bits(widget->codec, reg, val_mask, val)) {
/* find dapm widget path assoc with kcontrol */
list_for_each_entry(path, &widget->dapm->card->paths, list) {
list_for_each_entry(path, &widget->dapm->paths, list) {
if (path->kcontrol != kcontrol)
continue;

Expand Down
1 change: 1 addition & 0 deletions trunk/sound/soc/codecs/uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
/* codec private data */
struct uda1380_priv {
struct snd_soc_codec *codec;
u16 reg_cache[UDA1380_CACHEREGNUM];
unsigned int dac_clk;
struct work_struct work;
void *control_data;
Expand Down
Loading

0 comments on commit d4d6967

Please sign in to comment.