Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142708
b: refs/heads/master
c: 8321fc0
h: refs/heads/master
v: v3
  • Loading branch information
Hans-Christian Egtvedt authored and Takashi Iwai committed Apr 6, 2009
1 parent 844c532 commit 4210f8e
Show file tree
Hide file tree
Showing 19 changed files with 74 additions and 866 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: c707e950015750c48fdc82c2746415213c0c534d
refs/heads/master: 8321fc0113a1be0cdfc9cbad1db1de74073acd8f
71 changes: 0 additions & 71 deletions trunk/Documentation/sound/alsa/soc/jack.txt

This file was deleted.

15 changes: 5 additions & 10 deletions trunk/sound/arm/pxa2xx-ac97-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@ static inline void pxa_ac97_cold_pxa3xx(void)

bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
{
unsigned long gsr;

#ifdef CONFIG_PXA25x
if (cpu_is_pxa25x())
pxa_ac97_warm_pxa25x();
Expand All @@ -256,10 +254,10 @@ bool pxa2xx_ac97_try_warm_reset(struct snd_ac97 *ac97)
else
#endif
BUG();
gsr = GSR | gsr_bits;
if (!(gsr & (GSR_PCR | GSR_SCR))) {

if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) {
printk(KERN_INFO "%s: warm reset timeout (GSR=%#lx)\n",
__func__, gsr);
__func__, gsr_bits);

return false;
}
Expand All @@ -270,8 +268,6 @@ EXPORT_SYMBOL_GPL(pxa2xx_ac97_try_warm_reset);

bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
{
unsigned long gsr;

#ifdef CONFIG_PXA25x
if (cpu_is_pxa25x())
pxa_ac97_cold_pxa25x();
Expand All @@ -289,10 +285,9 @@ bool pxa2xx_ac97_try_cold_reset(struct snd_ac97 *ac97)
#endif
BUG();

gsr = GSR | gsr_bits;
if (!(gsr & (GSR_PCR | GSR_SCR))) {
if (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR))) {
printk(KERN_INFO "%s: cold reset timeout (GSR=%#lx)\n",
__func__, gsr);
__func__, gsr_bits);

return false;
}
Expand Down
14 changes: 8 additions & 6 deletions trunk/sound/atmel/ac97c.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Register definitions for the Atmel AC97C controller
* Register definitions for Atmel AC97C
*
* Copyright (C) 2005-2009 Atmel Corporation
*
Expand All @@ -17,10 +17,6 @@
#define AC97C_CATHR 0x24
#define AC97C_CASR 0x28
#define AC97C_CAMR 0x2c
#define AC97C_CBRHR 0x30
#define AC97C_CBTHR 0x34
#define AC97C_CBSR 0x38
#define AC97C_CBMR 0x3c
#define AC97C_CORHR 0x40
#define AC97C_COTHR 0x44
#define AC97C_COSR 0x48
Expand All @@ -46,8 +42,10 @@
#define AC97C_MR_VRA (1 << 2)

#define AC97C_CSR_TXRDY (1 << 0)
#define AC97C_CSR_TXEMPTY (1 << 1)
#define AC97C_CSR_UNRUN (1 << 2)
#define AC97C_CSR_RXRDY (1 << 4)
#define AC97C_CSR_OVRUN (1 << 5)
#define AC97C_CSR_ENDTX (1 << 10)
#define AC97C_CSR_ENDRX (1 << 14)

Expand All @@ -61,11 +59,15 @@
#define AC97C_CMR_DMAEN (1 << 22)

#define AC97C_SR_CAEVT (1 << 3)
#define AC97C_SR_COEVT (1 << 2)
#define AC97C_SR_WKUP (1 << 1)
#define AC97C_SR_SOF (1 << 0)

#define AC97C_CH_MASK(slot) \
(0x7 << (3 * (AC97_SLOT_##slot - 3)))
#define AC97C_CH_ASSIGN(slot, channel) \
(AC97C_CHANNEL_##channel << (3 * (AC97_SLOT_##slot - 3)))
#define AC97C_CHANNEL_NONE 0x0
#define AC97C_CHANNEL_A 0x1
#define AC97C_CHANNEL_B 0x2

#endif /* __SOUND_ATMEL_AC97C_H */
1 change: 0 additions & 1 deletion trunk/sound/isa/opl3sa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ OPL3SA2_DOUBLE_TLV("Master Playback Volume", 0, 0x07, 0x08, 0, 0, 15, 1,
OPL3SA2_SINGLE("Mic Playback Switch", 0, 0x09, 7, 1, 1),
OPL3SA2_SINGLE_TLV("Mic Playback Volume", 0, 0x09, 0, 31, 1,
db_scale_5bit_12db_max),
OPL3SA2_SINGLE("ZV Port Switch", 0, 0x02, 0, 1, 0),
};

static struct snd_kcontrol_new snd_opl3sa2_tone_controls[] = {
Expand Down
5 changes: 0 additions & 5 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -8764,10 +8764,6 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
{}
};

static hda_nid_t alc883_slave_dig_outs[] = {
ALC1200_DIGOUT_NID, 0,
};

static hda_nid_t alc1200_slave_dig_outs[] = {
ALC883_DIGOUT_NID, 0,
};
Expand Down Expand Up @@ -8813,7 +8809,6 @@ static struct alc_config_preset alc883_presets[] = {
.dac_nids = alc883_dac_nids,
.dig_out_nid = ALC883_DIGOUT_NID,
.dig_in_nid = ALC883_DIGIN_NID,
.slave_dig_outs = alc883_slave_dig_outs,
.num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_intel_modes),
.channel_mode = alc883_3ST_6ch_intel_modes,
.need_dac_fix = 1,
Expand Down
2 changes: 0 additions & 2 deletions trunk/sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4895,7 +4895,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
switch (codec->vendor_id) {
case 0x111d7604:
case 0x111d7605:
case 0x111d76d5:
if (spec->board_config == STAC_92HD83XXX_PWR_REF)
break;
spec->num_pwrs = 0;
Expand Down Expand Up @@ -5708,7 +5707,6 @@ static struct hda_codec_preset snd_hda_preset_sigmatel[] = {
{ .id = 0x111d7603, .name = "92HD75B3X5", .patch = patch_stac92hd71bxx},
{ .id = 0x111d7604, .name = "92HD83C1X5", .patch = patch_stac92hd83xxx},
{ .id = 0x111d7605, .name = "92HD81B1X5", .patch = patch_stac92hd83xxx},
{ .id = 0x111d76d5, .name = "92HD81B1C5", .patch = patch_stac92hd83xxx},
{ .id = 0x111d7608, .name = "92HD75B2X5", .patch = patch_stac92hd71bxx},
{ .id = 0x111d7674, .name = "92HD73D1X5", .patch = patch_stac92hd73xx },
{ .id = 0x111d7675, .name = "92HD73C1X5", .patch = patch_stac92hd73xx },
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/ppc/powermac.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static struct platform_device *device;
/*
*/

static int __devinit snd_pmac_probe(struct platform_device *devptr)
static int __init snd_pmac_probe(struct platform_device *devptr)
{
struct snd_card *card;
struct snd_pmac *chip;
Expand Down
59 changes: 1 addition & 58 deletions trunk/sound/soc/codecs/twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ struct twl4030_priv {
unsigned int bypass_state;
unsigned int codec_powered;
unsigned int codec_muted;

struct snd_pcm_substream *master_substream;
struct snd_pcm_substream *slave_substream;
};

/*
Expand Down Expand Up @@ -1220,64 +1217,15 @@ static int twl4030_set_bias_level(struct snd_soc_codec *codec,
return 0;
}

static int twl4030_startup(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->codec;
struct twl4030_priv *twl4030 = codec->private_data;

/* If we already have a playback or capture going then constrain
* this substream to match it.
*/
if (twl4030->master_substream) {
struct snd_pcm_runtime *master_runtime;
master_runtime = twl4030->master_substream->runtime;

snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_RATE,
master_runtime->rate,
master_runtime->rate);

snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
master_runtime->sample_bits,
master_runtime->sample_bits);

twl4030->slave_substream = substream;
} else
twl4030->master_substream = substream;

return 0;
}

static void twl4030_shutdown(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->codec;
struct twl4030_priv *twl4030 = codec->private_data;

if (twl4030->master_substream == substream)
twl4030->master_substream = twl4030->slave_substream;

twl4030->slave_substream = NULL;
}

static int twl4030_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params,
struct snd_soc_dai *dai)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_device *socdev = rtd->socdev;
struct snd_soc_codec *codec = socdev->card->codec;
struct twl4030_priv *twl4030 = codec->private_data;
u8 mode, old_mode, format, old_format;

if (substream == twl4030->slave_substream)
/* Ignoring hw_params for slave substream */
return 0;

/* bit rate */
old_mode = twl4030_read_reg_cache(codec,
TWL4030_REG_CODEC_MODE) & ~TWL4030_CODECPDZ;
Expand Down Expand Up @@ -1311,9 +1259,6 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,
case 48000:
mode |= TWL4030_APLL_RATE_48000;
break;
case 96000:
mode |= TWL4030_APLL_RATE_96000;
break;
default:
printk(KERN_ERR "TWL4030 hw params: unknown rate %d\n",
params_rate(params));
Expand Down Expand Up @@ -1439,8 +1384,6 @@ static int twl4030_set_dai_fmt(struct snd_soc_dai *codec_dai,
#define TWL4030_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE)

static struct snd_soc_dai_ops twl4030_dai_ops = {
.startup = twl4030_startup,
.shutdown = twl4030_shutdown,
.hw_params = twl4030_hw_params,
.set_sysclk = twl4030_set_dai_sysclk,
.set_fmt = twl4030_set_dai_fmt,
Expand All @@ -1452,7 +1395,7 @@ struct snd_soc_dai twl4030_dai = {
.stream_name = "Playback",
.channels_min = 2,
.channels_max = 2,
.rates = TWL4030_RATES | SNDRV_PCM_RATE_96000,
.rates = TWL4030_RATES,
.formats = TWL4030_FORMATS,},
.capture = {
.stream_name = "Capture",
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/soc/codecs/twl4030.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
#define TWL4030_APLL_RATE_32000 0x80
#define TWL4030_APLL_RATE_44100 0x90
#define TWL4030_APLL_RATE_48000 0xA0
#define TWL4030_APLL_RATE_96000 0xE0
#define TWL4030_SEL_16K 0x04
#define TWL4030_CODECPDZ 0x02
#define TWL4030_OPT_MODE 0x01
Expand Down
37 changes: 0 additions & 37 deletions trunk/sound/soc/codecs/wm9705.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,41 +317,6 @@ static int wm9705_reset(struct snd_soc_codec *codec)
return -EIO;
}

#ifdef CONFIG_PM
static int wm9705_soc_suspend(struct platform_device *pdev)
{
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_codec *codec = socdev->card->codec;

soc_ac97_ops.write(codec->ac97, AC97_POWERDOWN, 0xffff);

return 0;
}

static int wm9705_soc_resume(struct platform_device *pdev)
{
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_codec *codec = socdev->card->codec;
int i, ret;
u16 *cache = codec->reg_cache;

ret = wm9705_reset(codec);
if (ret < 0) {
printk(KERN_ERR "could not reset AC97 codec\n");
return ret;
}

for (i = 2; i < ARRAY_SIZE(wm9705_reg) << 1; i += 2) {
soc_ac97_ops.write(codec->ac97, i, cache[i>>1]);
}

return 0;
}
#else
#define wm9705_soc_suspend NULL
#define wm9705_soc_resume NULL
#endif

static int wm9705_soc_probe(struct platform_device *pdev)
{
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
Expand Down Expand Up @@ -442,8 +407,6 @@ static int wm9705_soc_remove(struct platform_device *pdev)
struct snd_soc_codec_device soc_codec_dev_wm9705 = {
.probe = wm9705_soc_probe,
.remove = wm9705_soc_remove,
.suspend = wm9705_soc_suspend,
.resume = wm9705_soc_resume,
};
EXPORT_SYMBOL_GPL(soc_codec_dev_wm9705);

Expand Down
Loading

0 comments on commit 4210f8e

Please sign in to comment.