Skip to content

Commit

Permalink
Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/tiwai/sound

Pull sound fixes from Takashi Iwai:
 - A series of fixes for Conexant 20549 HD-audio codec chip
 - A workaround for HDMI hotplug debug prints that annoyed people
 - A fix for the new support of platform DAPM contexts
 - Many driver-specific minor fixes

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - hide HDMI/ELD printks unless snd.debug=2
  ALSA: sound/isa/sscape.c: add missing resource-release code
  sound: sound/oss/msnd_pinnacle.c: add vfrees
  ALSA: hda - clean up CX20549 test mixer setup
  ALSA: hda - CX20549 doesn't need pin_amp_workaround.
  ALSA: hda - Remove CD control from model=benq for CX20549
  ALSA: hda - fix record volume controls of CX20459 ("Venice")
  ALSA: hda - Rename capture sources of CX20549 to match common conventions
  ALSA: hda - Fix proc output for ADC amp values of CX20549
  ASoC: tegra: fix i2s compilation when !CONFIG_DEBUG_FS
  ASoC: set idle_bias_off=1 for all platform DAPM contexts
  ASoC: imx-audmux: Check for NULL pointer
  ASoC: imx-audmux: Fix ssi port numbers in sysfs
  ASoC: ak4642: fixup: mute needs +1 step
  MAINTAINERS: Don't list everyone working on Wolfson drivers
  MAINTAINERS: Add missing ASoC OMAP co-maintainer
  ASoC: pxa: pxa2xx-i2s: add io.h for IOMEM macro
  ASoC: tegra: ensure clocks are enabled when touching registers
  ASoC: sgtl5000: Enable VAG when DAC/ADC up
  ALSA: asihpi - fix return value of hpios_locked_mem_alloc()
  • Loading branch information
torvalds committed Apr 11, 2012
2 parents 39f86a6 + fae3d88 commit a1ada08
Show file tree
Hide file tree
Showing 18 changed files with 120 additions and 106 deletions.
4 changes: 2 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4803,6 +4803,7 @@ F: arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
F: arch/arm/mach-omap2/clockdomain44xx.c

OMAP AUDIO SUPPORT
M: Peter Ujfalusi <[email protected]>
M: Jarkko Nikula <[email protected]>
L: [email protected] (subscribers-only)
L: [email protected]
Expand Down Expand Up @@ -7461,8 +7462,7 @@ F: include/linux/wm97xx.h

WOLFSON MICROELECTRONICS DRIVERS
M: Mark Brown <[email protected]>
M: Ian Lartey <[email protected]>
M: Dimitris Papastamos <[email protected]>
L: [email protected]
T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc
T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
Expand Down
10 changes: 10 additions & 0 deletions include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ void release_and_free_resource(struct resource *res);

/* --- */

/* sound printk debug levels */
enum {
SND_PR_ALWAYS,
SND_PR_DEBUG,
SND_PR_VERBOSE,
};

#if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK)
__printf(4, 5)
void __snd_printk(unsigned int level, const char *file, int line,
Expand Down Expand Up @@ -354,6 +361,8 @@ void __snd_printk(unsigned int level, const char *file, int line,
*/
#define snd_printd(fmt, args...) \
__snd_printk(1, __FILE__, __LINE__, fmt, ##args)
#define _snd_printd(level, fmt, args...) \
__snd_printk(level, __FILE__, __LINE__, fmt, ##args)

/**
* snd_BUG - give a BUG warning message and stack trace
Expand Down Expand Up @@ -383,6 +392,7 @@ void __snd_printk(unsigned int level, const char *file, int line,
#else /* !CONFIG_SND_DEBUG */

#define snd_printd(fmt, args...) do { } while (0)
#define _snd_printd(level, fmt, args...) do { } while (0)
#define snd_BUG() do { } while (0)
static inline int __snd_bug_on(int cond)
{
Expand Down
6 changes: 4 additions & 2 deletions sound/isa/sscape.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,13 +1019,15 @@ static int __devinit create_sscape(int dev, struct snd_card *card)
irq_cfg = get_irq_config(sscape->type, irq[dev]);
if (irq_cfg == INVALID_IRQ) {
snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", irq[dev]);
return -ENXIO;
err = -ENXIO;
goto _release_dma;
}

mpu_irq_cfg = get_irq_config(sscape->type, mpu_irq[dev]);
if (mpu_irq_cfg == INVALID_IRQ) {
snd_printk(KERN_ERR "sscape: Invalid IRQ %d\n", mpu_irq[dev]);
return -ENXIO;
err = -ENXIO;
goto _release_dma;
}

/*
Expand Down
8 changes: 6 additions & 2 deletions sound/oss/msnd_pinnacle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,8 @@ static int __init calibrate_adc(WORD srate)

static int upload_dsp_code(void)
{
int ret = 0;

msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS);
#ifndef HAVE_DSPCODEH
INITCODESIZE = mod_firmware_load(INITCODEFILE, &INITCODE);
Expand All @@ -1312,20 +1314,22 @@ static int upload_dsp_code(void)
memcpy_toio(dev.base, PERMCODE, PERMCODESIZE);
if (msnd_upload_host(&dev, INITCODE, INITCODESIZE) < 0) {
printk(KERN_WARNING LOGNAME ": Error uploading to DSP\n");
return -ENODEV;
ret = -ENODEV;
goto out;
}
#ifdef HAVE_DSPCODEH
printk(KERN_INFO LOGNAME ": DSP firmware uploaded (resident)\n");
#else
printk(KERN_INFO LOGNAME ": DSP firmware uploaded\n");
#endif

out:
#ifndef HAVE_DSPCODEH
vfree(INITCODE);
vfree(PERMCODE);
#endif

return 0;
return ret;
}

#ifdef MSND_CLASSIC
Expand Down
4 changes: 2 additions & 2 deletions sound/pci/asihpi/hpi_internal.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******************************************************************************
AudioScience HPI driver
Copyright (C) 1997-2011 AudioScience Inc. <[email protected]>
Copyright (C) 1997-2012 AudioScience Inc. <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
Expand Down Expand Up @@ -42,7 +42,7 @@ On error *pLockedMemHandle marked invalid, non-zero returned.
If this function succeeds, then HpiOs_LockedMem_GetVirtAddr() and
HpiOs_LockedMem_GetPyhsAddr() will always succed on the returned handle.
*/
int hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_locked_mem_handle,
/**< memory handle */
u32 size, /**< Size in bytes to allocate */
struct pci_dev *p_os_reference
Expand Down
10 changes: 5 additions & 5 deletions sound/pci/asihpi/hpios.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******************************************************************************
AudioScience HPI driver
Copyright (C) 1997-2011 AudioScience Inc. <[email protected]>
Copyright (C) 1997-2012 AudioScience Inc. <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
Expand Down Expand Up @@ -39,11 +39,11 @@ void hpios_delay_micro_seconds(u32 num_micro_sec)

}

/** Allocated an area of locked memory for bus master DMA operations.
/** Allocate an area of locked memory for bus master DMA operations.
On error, return -ENOMEM, and *pMemArea.size = 0
If allocation fails, return 1, and *pMemArea.size = 0
*/
int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
u16 hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
struct pci_dev *pdev)
{
/*?? any benefit in using managed dmam_alloc_coherent? */
Expand All @@ -62,7 +62,7 @@ int hpios_locked_mem_alloc(struct consistent_dma_area *p_mem_area, u32 size,
HPI_DEBUG_LOG(WARNING,
"failed to allocate %d bytes locked memory\n", size);
p_mem_area->size = 0;
return -ENOMEM;
return 1;
}
}

Expand Down
3 changes: 3 additions & 0 deletions sound/pci/hda/hda_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,9 @@ struct hda_codec {
unsigned int pin_amp_workaround:1; /* pin out-amp takes index
* (e.g. Conexant codecs)
*/
unsigned int single_adc_amp:1; /* adc in-amp takes no index
* (e.g. CX20549 codec)
*/
unsigned int no_sticky_stream:1; /* no sticky-PCM stream assignment */
unsigned int pins_shutup:1; /* pins are shut up */
unsigned int no_trigger_sense:1; /* don't trigger at pin-sensing */
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/hda/hda_eld.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ static void hdmi_show_short_audio_desc(struct cea_sad *a)
else
buf2[0] = '\0';

printk(KERN_INFO "HDMI: supports coding type %s:"
_snd_printd(SND_PR_VERBOSE, "HDMI: supports coding type %s:"
" channels = %d, rates =%s%s\n",
cea_audio_coding_type_names[a->format],
a->channels,
Expand All @@ -442,14 +442,14 @@ void snd_hdmi_show_eld(struct hdmi_eld *e)
{
int i;

printk(KERN_INFO "HDMI: detected monitor %s at connection type %s\n",
_snd_printd(SND_PR_VERBOSE, "HDMI: detected monitor %s at connection type %s\n",
e->monitor_name,
eld_connection_type_names[e->conn_type]);

if (e->spk_alloc) {
char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE];
snd_print_channel_allocation(e->spk_alloc, buf, sizeof(buf));
printk(KERN_INFO "HDMI: available speakers:%s\n", buf);
_snd_printd(SND_PR_VERBOSE, "HDMI: available speakers:%s\n", buf);
}

for (i = 0; i < e->sad_count; i++)
Expand Down
13 changes: 10 additions & 3 deletions sound/pci/hda/hda_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,16 @@ static void print_codec_info(struct snd_info_entry *entry,
snd_iprintf(buffer, " Amp-In caps: ");
print_amp_caps(buffer, codec, nid, HDA_INPUT);
snd_iprintf(buffer, " Amp-In vals: ");
print_amp_vals(buffer, codec, nid, HDA_INPUT,
wid_caps & AC_WCAP_STEREO,
wid_type == AC_WID_PIN ? 1 : conn_len);
if (wid_type == AC_WID_PIN ||
(codec->single_adc_amp &&
wid_type == AC_WID_AUD_IN))
print_amp_vals(buffer, codec, nid, HDA_INPUT,
wid_caps & AC_WCAP_STEREO,
1);
else
print_amp_vals(buffer, codec, nid, HDA_INPUT,
wid_caps & AC_WCAP_STEREO,
conn_len);
}
if (wid_caps & AC_WCAP_OUT_AMP) {
snd_iprintf(buffer, " Amp-Out caps: ");
Expand Down
Loading

0 comments on commit a1ada08

Please sign in to comment.