ALSA fixes
Subsystems (3)
Hi Linus,
please pull ALSA updates for 2.6.28-rc2 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
containing the fixes below. One trivial quirk addition for old intel8x0, and others are for HD-audio fixes as usual, in addition to a sanity check for breakage checks in the control codes.
Thanks!
Takashi
===
Bastien Nocera (1):
ALSA: intel8x0 - add Dell Optiplex GX620 (AD1981B) to AC97 clock whitelist
Mark Brown (2):
ALSA: hda: Add HDA vendor ID for Wolfson Microelectronics
ALSA: Warn when control names are truncated
Takashi Iwai (3):
ALSA: hda - Add another HP model for AD1884A
ALSA: hda - Fix SPDIF mute on IDT/STAC codecs
ALSA: hda - Add reboot notifier
--- sound/core/control.c | 7 ++++++- sound/pci/hda/hda_codec.c | 1 + sound/pci/hda/hda_intel.c | 29 +++++++++++++++++++++++++++++ sound/pci/hda/patch_analog.c | 1 + sound/pci/hda/patch_sigmatel.c | 4 +--- sound/pci/intel8x0.c | 1 + 6 files changed, 39 insertions(+), 4 deletions(-)
sound/core/control.c +6 -1
@@ -225,8 +225,13 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol, kctl.id.iface = ncontrol->iface; kctl.id.device = ncontrol->device; kctl.id.subdevice = ncontrol->subdevice; -if (ncontrol->name) +if (ncontrol->name) {strlcpy (kctl.id.name, ncontrol->name,sizeof (kctl.id.name)); +if (strcmp (ncontrol->name, kctl.id.name) !=0 ) +snd_printk (KERN_WARNING +"Control name '%s' truncated to '%s'\n" , + ncontrol->name, kctl.id.name); + } kctl.id.index = ncontrol->index; kctl.count = ncontrol->count ? ncontrol->count :1 ; access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
sound/pci/hda/hda_codec.c +1 -0
@@ -64,6 +64,7 @@ static struct hda_vendor_id hda_vendor_ids[] = { { 0x14f1, "Conexant" }, { 0x17e8, "Chrontel" }, { 0x1854, "LG" }, + { 0x1aec, "Wolfson Microelectronics" }, { 0x434d, "C-Media" }, { 0x8384, "SigmaTel" }, {} /* terminator */
sound/pci/hda/hda_intel.c +29 -0
@@ -45,6 +45,7 @@#include <linux/slab.h> #include <linux/pci.h> #include <linux/mutex.h> +#include <linux/reboot.h> #include <sound/core.h> #include <sound/initval.h> #include "hda_codec.h"
@@ -397,6 +398,9 @@ struct azx {/* for pending irqs */ struct work_struct irq_pending_work; + +/* reboot notifier (for mysterious hangup problem at power-down) */ +struct notifier_block reboot_notifier; };/* driver types */
@@ -1979,12 +1983,36 @@ static int azx_resume(struct pci_dev *pci)/* +* reboot notifier for hang-up problem at power-down +*/ +static int azx_halt (struct notifier_block *nb,unsigned long event,void *buf) +{ + struct azx *chip = container_of(nb, struct azx, reboot_notifier); +azx_stop_chip (chip); +return NOTIFY_OK ; +} + +static void azx_notifier_register (struct azx *chip) +{ + chip->reboot_notifier.notifier_call = azx_halt; +register_reboot_notifier (&chip->reboot_notifier); +} + +static void azx_notifier_unregister (struct azx *chip) +{ +if (chip->reboot_notifier.notifier_call) +unregister_reboot_notifier (&chip->reboot_notifier); +} + +/* * destructor */ static int azx_free (struct azx *chip) {int i; +azx_notifier_unregister (chip); +if (chip->initialized) {azx_clear_irq_pending (chip);for (i =0 ; i < chip->num_streams; i++)
@@ -2348,6 +2376,7 @@ static int __devinit azx_probe(struct pci_dev *pci,pci_set_drvdata (pci, card); chip->running =1 ;power_down_all_codecs (chip); +azx_notifier_register (chip); dev++;return err;
sound/pci/hda/patch_analog.c +1 -0
@@ -3860,6 +3860,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = {static struct snd_pci_quirk ad1884a_cfg_tbl[] = {SND_PCI_QUIRK (0x103c ,0x3030 ,"HP" ,AD1884A_MOBILE ), +SND_PCI_QUIRK (0x103c ,0x3056 ,"HP" ,AD1884A_MOBILE ),SND_PCI_QUIRK (0x17aa ,0x20ac ,"Thinkpad X300" ,AD1884A_THINKPAD ), {} };
sound/pci/hda/patch_sigmatel.c +1 -3
@@ -566,10 +566,8 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol, nid = codec->slave_dig_outs[smux_idx -1 ];if (spec->cur_smux[smux_idx] == smux->num_items -1 ) val =AMP_OUT_MUTE ; -if (smux_idx ==0 ) - nid = spec->multiout.dig_out_nid;else - nid = codec->slave_dig_outs[smux_idx -1 ]; + val =AMP_OUT_UNMUTE ;/* un/mute SPDIF out */ snd_hda_codec_write_cache (codec, nid,0 ,AC_VERB_SET_AMP_GAIN_MUTE , val);
sound/pci/intel8x0.c +1 -0
@@ -2702,6 +2702,7 @@ static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = {SND_PCI_QUIRK (0x0e11 ,0x008a ,"AD1885" ,41000 ),SND_PCI_QUIRK (0x1028 ,0x00be ,"AD1885" ,44100 ),SND_PCI_QUIRK (0x1028 ,0x0177 ,"AD1980" ,48000 ), +SND_PCI_QUIRK (0x1028 ,0x01ad ,"AD1981B" ,48000 ), SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000), { } /* terminator */ };
[GIT PULL] ALSA fixes #2
Linus,
please pull ALSA more updates for 2.6.28-r2 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git for-linus
This contains the following fixes (mostly for ASoC) in addition to the previous pull request.
Thanks!
Takashi
===
Ilpo Järvinen (1):
ALSA: sound/ice1712: indentation & braces disagree - add braces
Jon Smirl (1):
ALSA: ASoC: Fix some minor errors in mpc5200 psc i2s driver
Kay Sievers (1):
sound: struct device - replace bus_id with dev_name(), dev_set_name()
Mark Brown (2):
ALSA: ASoC: Fix mono controls after conversion to support full int masks
ALSA: ASoC: Fix WM9713 ALC Decay Time name
Takashi Iwai (1):
ALSA: usb - Add quirk for Edirol UA-25EX advanced modes
--- include/sound/soc.h | 3 ++- sound/pci/ac97/ac97_codec.c | 6 +++--- sound/pci/ice1712/ice1712.c | 6 ++++-- sound/soc/codecs/wm9713.c | 2 +- sound/soc/fsl/mpc5200_psc_i2s.c | 14 ++++++++------ sound/soc/soc-core.c | 2 +- sound/usb/usbquirks.h | 30 ++++++++++++++++++++++++++++++ 7 files changed, 49 insertions(+), 14 deletions(-)
include/sound/soc.h +2 -1
@@ -28,7 +28,8 @@*/ #define SOC_SINGLE_VALUE (xreg, xshift, xmax, xinvert) \ ((unsigned long)&(struct soc_mixer_control) \ - {.reg = xreg, .shift = xshift, .max = xmax, .invert = xinvert}) + {.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \ + .invert = xinvert})#define SOC_SINGLE_VALUE_EXT (xreg, xmax, xinvert) \ ((unsigned long)&(struct soc_mixer_control) \ {.reg = xreg, .max = xmax, .invert = xinvert})
sound/pci/ac97/ac97_codec.c +3 -3
@@ -1927,9 +1927,9 @@ static int snd_ac97_dev_register(struct snd_device *device) ac97->dev.bus = &ac97_bus_type; ac97->dev.parent = ac97->bus->card->dev; ac97->dev.release = ac97_device_release; -snprintf (ac97->dev.bus_id,BUS_ID_SIZE ,"%d-%d:%s" , - ac97->bus->card->number, ac97->num, -snd_ac97_get_short_name (ac97)); +dev_set_name (&ac97->dev,"%d-%d:%s" , + ac97->bus->card->number, ac97->num, +snd_ac97_get_short_name (ac97));if ((err =device_register (&ac97->dev)) <0 ) {snd_printk (KERN_ERR "Can't register ac97 bus\n" ); ac97->dev.bus =NULL ;
sound/pci/ice1712/ice1712.c +4 -2
@@ -2688,12 +2688,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,return err; } -if (ice_has_con_ac97 (ice)) +if (ice_has_con_ac97 (ice)) { err =snd_ice1712_pcm (ice, pcm_dev++,NULL );if (err <0 ) {snd_card_free (card);return err; } + } err =snd_ice1712_ac97_mixer (ice);if (err <0 ) {
@@ -2715,12 +2716,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci, } } -if (ice_has_con_ac97 (ice)) +if (ice_has_con_ac97 (ice)) { err =snd_ice1712_pcm_ds (ice, pcm_dev++,NULL );if (err <0 ) {snd_card_free (card);return err; } + }if (!c->no_mpu401) { err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
sound/soc/codecs/wm9713.c +1 -1
@@ -140,7 +140,7 @@ SOC_SINGLE("Capture ADC Boost (+20dB) Switch", AC97_VIDEO, 6, 1, 0),SOC_SINGLE ("ALC Target Volume" ,AC97_CODEC_CLASS_REV ,12 ,15 ,0 ),SOC_SINGLE ("ALC Hold Time" ,AC97_CODEC_CLASS_REV ,8 ,15 ,0 ), -SOC_SINGLE ("ALC Decay Time " ,AC97_CODEC_CLASS_REV ,4 ,15 ,0 ), +SOC_SINGLE ("ALC Decay Time" ,AC97_CODEC_CLASS_REV ,4 ,15 ,0 ),SOC_SINGLE ("ALC Attack Time" ,AC97_CODEC_CLASS_REV ,0 ,15 ,0 ),SOC_ENUM ("ALC Function" , wm9713_enum[6 ]), SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0),
sound/soc/fsl/mpc5200_psc_i2s.c +8 -6
@@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;u16 imr;u8 psc_cmd; -long flags; +unsigned long flags;if (substream->pstr->stream ==SNDRV_PCM_STREAM_CAPTURE ) s = &psc_i2s->capture;
@@ -699,9 +699,11 @@ static ssize_t psc_i2s_stat_store(struct device *dev,return count; } -DEVICE_ATTR (status,0644 , psc_i2s_status_show,NULL ); -DEVICE_ATTR (playback_underrun,0644 , psc_i2s_stat_show, psc_i2s_stat_store); -DEVICE_ATTR (capture_overrun,0644 , psc_i2s_stat_show, psc_i2s_stat_store); +static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL); +static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, + psc_i2s_stat_store); +static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, + psc_i2s_stat_store);/* --------------------------------------------------------------------- * OF platform bus binding code:
@@ -819,8 +821,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,/* Register the SYSFS files */ rc =device_create_file (psc_i2s->dev, &dev_attr_status); - rc =device_create_file (psc_i2s->dev, &dev_attr_capture_overrun); - rc =device_create_file (psc_i2s->dev, &dev_attr_playback_underrun); + rc |=device_create_file (psc_i2s->dev, &dev_attr_capture_overrun); + rc |=device_create_file (psc_i2s->dev, &dev_attr_playback_underrun);if (rc)dev_info (psc_i2s->dev,"error creating sysfs files\n" );
sound/soc/soc-core.c +1 -1
@@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;int max = mc->max; -unsigned int shift = mc->min; +unsigned int shift = mc->shift;unsigned int rshift = mc->rshift;if (max ==1 )
sound/usb/usbquirks.h +30 -0
@@ -1480,6 +1480,36 @@ YAMAHA_DEVICE(0x7010, "UB99"), } } }, +{ +/* Advanced modes of the Edirol UA-25EX. +* For the standard mode, UA-25EX has ID 0582:00e7, which +* offers only 16-bit PCM at 44.1 kHz and no MIDI. +*/ + USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6), + .driver_info = (unsigned long ) & (const struct snd_usb_audio_quirk ) { + .vendor_name ="EDIROL" , + .product_name ="UA-25EX" , + .ifnum =QUIRK_ANY_INTERFACE , + .type =QUIRK_COMPOSITE , + .data = (const struct snd_usb_audio_quirk []) { + { + .ifnum =0 , + .type =QUIRK_AUDIO_EDIROL_UAXX + }, + { + .ifnum =1 , + .type =QUIRK_AUDIO_EDIROL_UAXX + }, + { + .ifnum =2 , + .type =QUIRK_AUDIO_EDIROL_UAXX + }, + { + .ifnum =-1 + } + } + } +}, /* Guillemot devices */ {