Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322902
b: refs/heads/master
c: 5d037f9
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Sep 15, 2012
1 parent 547fcd9 commit dce27d2
Show file tree
Hide file tree
Showing 45 changed files with 347 additions and 268 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: 985b11fa8064d55d0d5a84e68667434598911bb2
refs/heads/master: 5d037f9064a8f3b9abbe383cdfb35e159d813711
7 changes: 6 additions & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7670,23 +7670,28 @@ S: Supported
F: Documentation/hwmon/wm83??
F: arch/arm/mach-s3c64xx/mach-crag6410*
F: drivers/clk/clk-wm83*.c
F: drivers/extcon/extcon-arizona.c
F: drivers/leds/leds-wm83*.c
F: drivers/gpio/gpio-*wm*.c
F: drivers/gpio/gpio-arizona.c
F: drivers/hwmon/wm83??-hwmon.c
F: drivers/input/misc/wm831x-on.c
F: drivers/input/touchscreen/wm831x-ts.c
F: drivers/input/touchscreen/wm97*.c
F: drivers/mfd/wm8*.c
F: drivers/mfd/arizona*
F: drivers/mfd/wm*.c
F: drivers/power/wm83*.c
F: drivers/rtc/rtc-wm83*.c
F: drivers/regulator/wm8*.c
F: drivers/video/backlight/wm83*_bl.c
F: drivers/watchdog/wm83*_wdt.c
F: include/linux/mfd/arizona/
F: include/linux/mfd/wm831x/
F: include/linux/mfd/wm8350/
F: include/linux/mfd/wm8400*
F: include/linux/wm97xx.h
F: include/sound/wm????.h
F: sound/soc/codecs/arizona.?
F: sound/soc/codecs/wm*

WORKQUEUE
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,8 @@ static inline void snd_pcm_limit_isa_dma_size(int dma, size_t *max)
const char *snd_pcm_format_name(snd_pcm_format_t format);

/**
* Get a string naming the direction of a stream
* snd_pcm_stream_str - Get a string naming the direction of a stream
* @substream: the pcm substream instance
*/
static inline const char *snd_pcm_stream_str(struct snd_pcm_substream *substream)
{
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/arm/pxa2xx-ac97.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static struct pxa2xx_pcm_client pxa2xx_ac97_pcm_client = {
.prepare = pxa2xx_ac97_pcm_prepare,
};

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP

static int pxa2xx_ac97_do_suspend(struct snd_card *card)
{
Expand Down Expand Up @@ -243,7 +243,7 @@ static struct platform_driver pxa2xx_ac97_driver = {
.driver = {
.name = "pxa2xx-ac97",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
.pm = &pxa2xx_ac97_pm_ops,
#endif
},
Expand Down
3 changes: 2 additions & 1 deletion trunk/sound/atmel/abdac.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
dac->regs = ioremap(regs->start, resource_size(regs));
if (!dac->regs) {
dev_dbg(&pdev->dev, "could not remap register memory\n");
retval = -ENOMEM;
goto out_free_card;
}

Expand Down Expand Up @@ -534,7 +535,7 @@ static int __devinit atmel_abdac_probe(struct platform_device *pdev)
return retval;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int atmel_abdac_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
14 changes: 5 additions & 9 deletions trunk/sound/atmel/ac97c.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,9 @@ static int atmel_ac97c_capture_hw_params(struct snd_pcm_substream *substream,
if (retval < 0)
return retval;
/* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */
if (cpu_is_at32ap7000()) {
if (retval < 0)
return retval;
/* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */
if (retval == 1)
if (test_and_clear_bit(DMA_RX_READY, &chip->flags))
dw_dma_cyclic_free(chip->dma.rx_chan);
}
if (cpu_is_at32ap7000() && retval == 1)
if (test_and_clear_bit(DMA_RX_READY, &chip->flags))
dw_dma_cyclic_free(chip->dma.rx_chan);

/* Set restrictions to params. */
mutex_lock(&opened_mutex);
Expand Down Expand Up @@ -980,6 +975,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)

if (!chip->regs) {
dev_dbg(&pdev->dev, "could not remap register memory\n");
retval = -ENOMEM;
goto err_ioremap;
}

Expand Down Expand Up @@ -1134,7 +1130,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
return retval;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int atmel_ac97c_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
8 changes: 3 additions & 5 deletions trunk/sound/core/compress_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,12 @@ static int snd_compr_open(struct inode *inode, struct file *f)
int maj = imajor(inode);
int ret;

if (f->f_flags & O_WRONLY)
if ((f->f_flags & O_ACCMODE) == O_WRONLY)
dirn = SND_COMPRESS_PLAYBACK;
else if (f->f_flags & O_RDONLY)
else if ((f->f_flags & O_ACCMODE) == O_RDONLY)
dirn = SND_COMPRESS_CAPTURE;
else {
pr_err("invalid direction\n");
else
return -EINVAL;
}

if (maj == snd_major)
compr = snd_lookup_minor_data(iminor(inode),
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/drivers/aloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ static int __devexit loopback_remove(struct platform_device *devptr)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int loopback_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/drivers/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ static int __devexit snd_dummy_remove(struct platform_device *devptr)
return 0;
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int snd_dummy_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/drivers/pcsp/pcsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void pcsp_stop_beep(struct snd_pcsp *chip)
pcspkr_stop_sound();
}

#ifdef CONFIG_PM
#ifdef CONFIG_PM_SLEEP
static int pcsp_suspend(struct device *dev)
{
struct snd_pcsp *chip = dev_get_drvdata(dev);
Expand All @@ -212,7 +212,7 @@ static SIMPLE_DEV_PM_OPS(pcsp_pm, pcsp_suspend, NULL);
#define PCSP_PM_OPS &pcsp_pm
#else
#define PCSP_PM_OPS NULL
#endif /* CONFIG_PM */
#endif /* CONFIG_PM_SLEEP */

static void pcsp_shutdown(struct platform_device *dev)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/isa/als100.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static int __devinit snd_card_als100_probe(int dev,
irq[dev], dma8[dev], dma16[dev]);
}

if ((error = snd_sb16dsp_pcm(chip, 0, NULL)) < 0) {
if ((error = snd_sb16dsp_pcm(chip, 0, &chip->pcm)) < 0) {
snd_card_free(card);
return error;
}
Expand Down
4 changes: 3 additions & 1 deletion trunk/sound/oss/sb_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,15 @@ static int jazz16_audio_set_speed(int dev, int speed)
if (speed > 0)
{
int tmp;
int s = speed * devc->channels;
int s;

if (speed < 5000)
speed = 5000;
if (speed > 44100)
speed = 44100;

s = speed * devc->channels;

devc->tconst = (256 - ((1000000 + s / 2) / s)) & 0xff;

tmp = 256 - devc->tconst;
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/pci/cs46xx/cs46xx_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static unsigned short snd_cs46xx_codec_read(struct snd_cs46xx *chip,

if (snd_BUG_ON(codec_index != CS46XX_PRIMARY_CODEC_INDEX &&
codec_index != CS46XX_SECONDARY_CODEC_INDEX))
return -EINVAL;
return 0xffff;

chip->active_ctrl(chip, 1);

Expand Down
4 changes: 3 additions & 1 deletion trunk/sound/pci/ctxfi/ctatc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1725,8 +1725,10 @@ int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci,
atc_connect_resources(atc);

atc->timer = ct_timer_new(atc);
if (!atc->timer)
if (!atc->timer) {
err = -ENOMEM;
goto error1;
}

err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, atc, &ops);
if (err < 0)
Expand Down
29 changes: 23 additions & 6 deletions trunk/sound/pci/hda/hda_beep.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,22 @@ void snd_hda_detach_beep_device(struct hda_codec *codec)
}
EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device);

static bool ctl_has_mute(struct snd_kcontrol *kcontrol)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
return query_amp_caps(codec, get_amp_nid(kcontrol),
get_amp_direction(kcontrol)) & AC_AMPCAP_MUTE;
}

/* get/put callbacks for beep mute mixer switches */
int snd_hda_mixer_amp_switch_get_beep(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct hda_beep *beep = codec->beep;
if (beep) {
if (beep && (!beep->enabled || !ctl_has_mute(kcontrol))) {
ucontrol->value.integer.value[0] =
ucontrol->value.integer.value[1] =
beep->enabled;
ucontrol->value.integer.value[1] = beep->enabled;
return 0;
}
return snd_hda_mixer_amp_switch_get(kcontrol, ucontrol);
Expand All @@ -252,9 +258,20 @@ int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol,
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct hda_beep *beep = codec->beep;
if (beep)
snd_hda_enable_beep_device(codec,
*ucontrol->value.integer.value);
if (beep) {
u8 chs = get_amp_channels(kcontrol);
int enable = 0;
long *valp = ucontrol->value.integer.value;
if (chs & 1) {
enable |= *valp;
valp++;
}
if (chs & 2)
enable |= *valp;
snd_hda_enable_beep_device(codec, enable);
}
if (!ctl_has_mute(kcontrol))
return 0;
return snd_hda_mixer_amp_switch_put(kcontrol, ucontrol);
}
EXPORT_SYMBOL_HDA(snd_hda_mixer_amp_switch_put_beep);
Loading

0 comments on commit dce27d2

Please sign in to comment.