sound fixes for 3.8-rc3
Subsystems (2)
Linus,
The following changes since commit a49f0d1ea3ec94fc7cf33a7c36a16343b74bd565:
Linux 3.8-rc1 (2012-12-21 17:19:00 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-3.8
for you to fetch changes up to 6d3cd5d444223c41eabb70dccff14fae4e8cb8b1:
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec) (2013-01-07 17:29:55 +0100)
----------------------------------------------------------------
Sound fixes for 3.8-rc3
Nothing too exciting here, just a few regression and trivial fixes, and new quirks for HD-audio and USB-audio.
- HD-audio mute LED mode enum fix
- Fix kernel panic of Digidesign Mbox2 usb-audio quirk (which was new in 3.8-rc1)
- Creative BT-D1 usb-audio quirk
- mute LED fixup for HP Pavillion 17 laptop
----------------------------------------------------------------
Alexander Schremmer (1):
ALSA: usb-audio: Add support for Creative BT-D1 via usb sound quirks
Asim Kadav (1):
sound: oss/pas2: Fix possible access out of array
Damien Zammit (1):
ALSA: usb-audio: Fix kernel panic of Digidesign Mbox2 quirk
David Henningsson (2):
ALSA: hda - Switch "On" and "Off" for "Mute-LED Mode" kcontrol
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
Nickolai Zeldovich (1):
ALSA: au88x0: fix incorrect left shift
sound/oss/pas2_card.c | 5 +++++ sound/pci/au88x0/au88x0_synth.c | 2 +- sound/pci/hda/hda_codec.c | 2 +- sound/pci/hda/patch_realtek.c | 30 ++++++++++++++++++++++++++++++ sound/usb/midi.c | 4 ---- sound/usb/quirks-table.h | 24 +++++++++++++++++++++++- sound/usb/quirks.c | 16 +++++++--------- sound/usb/usbaudio.h | 1 - 8 files changed, 67 insertions(+), 17 deletions(-)
sound/oss/pas2_card.c +5 -0
@@ -333,6 +333,11 @@ static void __init attach_pas_card(struct address_info *hw_config) {char temp[100 ]; +if (pas_model <0 || + pas_model >=ARRAY_SIZE (pas_model_names)) { +printk (KERN_ERR "pas2 unrecognized model.\n" ); +return ; + }sprintf (temp,"%s rev %d" , pas_model_names[(int ) pas_model],pas_read (0x2789 ));
sound/pci/au88x0/au88x0_synth.c +1 -1
@@ -58,7 +58,7 @@ static void vortex_wt_setdsout(vortex_t * vortex, u32 wt, int en)if (en) temp |= (1 << (wt &0x1f ));else - temp &= (1 << ~(wt &0x1f )); + temp &= ~(1 << (wt &0x1f ));hwwrite (vortex->mmio,WT_DSREG ((wt >=0x20 ) ?1 :0 ), temp); }
sound/pci/hda/hda_codec.c +1 -1
@@ -2531,7 +2531,7 @@ static int vmaster_mute_mode_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) {static const char *const texts[] = { -"Off" ,"On" ,"Follow Master" +"On" ,"Off" ,"Follow Master" };unsigned int index;
sound/pci/hda/patch_realtek.c +30 -0
@@ -5992,6 +5992,30 @@ static void alc269_fixup_quanta_mute(struct hda_codec *codec, spec->automute_hook = alc269_quanta_automute; } +/* update mute-LED according to the speaker mute state via mic1 VREF pin */ +static void alc269_fixup_mic1_mute_hook (void *private_data,int enabled) +{ +struct hda_codec *codec = private_data; +unsigned int pinval =AC_PINCTL_IN_EN + (enabled ? +AC_PINCTL_VREF_HIZ :AC_PINCTL_VREF_80 ); +snd_hda_set_pin_ctl_cache (codec,0x18 , pinval); +} + +static void alc269_fixup_mic1_mute (struct hda_codec *codec, +const struct alc_fixup *fix,int action) +{ +struct alc_spec *spec = codec->spec; +switch (action) { +case ALC_FIXUP_ACT_BUILD : + spec->vmaster_mute.hook = alc269_fixup_mic1_mute_hook; +snd_hda_add_vmaster_hook (codec, &spec->vmaster_mute, true); +/* fallthru */ +case ALC_FIXUP_ACT_INIT : +snd_hda_sync_vmaster_hook (&spec->vmaster_mute); +break ; + } +} +/* update mute-LED according to the speaker mute state via mic2 VREF pin */ static void alc269_fixup_mic2_mute_hook (void *private_data,int enabled) {
@@ -6043,6 +6067,7 @@ enum {ALC269_FIXUP_DMIC ,ALC269VB_FIXUP_AMIC ,ALC269VB_FIXUP_DMIC , +ALC269_FIXUP_MIC1_MUTE_LED ,ALC269_FIXUP_MIC2_MUTE_LED ,ALC269_FIXUP_INV_DMIC , ALC269_FIXUP_LENOVO_DOCK,
@@ -6171,6 +6196,10 @@ static const struct alc_fixup alc269_fixups[] = { { } }, }, + [ALC269_FIXUP_MIC1_MUTE_LED] = { + .type = ALC_FIXUP_FUNC, + .v.func = alc269_fixup_mic1_mute, + }, [ALC269_FIXUP_MIC2_MUTE_LED] = { .type = ALC_FIXUP_FUNC, .v.func = alc269_fixup_mic2_mute,
@@ -6215,6 +6244,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x029b ,"Acer 1810TZ" ,ALC269_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x1025 ,0x0349 ,"Acer AOD260" ,ALC269_FIXUP_INV_DMIC ),SND_PCI_QUIRK (0x103c ,0x1586 ,"HP" ,ALC269_FIXUP_MIC2_MUTE_LED ), +SND_PCI_QUIRK (0x103c ,0x1972 ,"HP Pavilion 17" ,ALC269_FIXUP_MIC1_MUTE_LED ),SND_PCI_QUIRK (0x1043 ,0x1427 ,"Asus Zenbook UX31E" ,ALC269VB_FIXUP_DMIC ),SND_PCI_QUIRK (0x1043 ,0x1517 ,"Asus Zenbook UX31A" ,ALC269VB_FIXUP_DMIC ), SND_PCI_QUIRK(0x1043, 0x1a13, "Asus G73Jw", ALC269_FIXUP_ASUS_G73JW),
sound/usb/midi.c +0 -4
@@ -2181,10 +2181,6 @@ int snd_usbmidi_create(struct snd_card *card, umidi->usb_protocol_ops = &snd_usbmidi_novation_ops; err =snd_usbmidi_detect_per_port_endpoints (umidi, endpoints);break ; -case QUIRK_MIDI_MBOX2 : - umidi->usb_protocol_ops = &snd_usbmidi_midiman_ops; - err =snd_usbmidi_detect_per_port_endpoints (umidi, endpoints); -break ;case QUIRK_MIDI_RAW_BYTES : umidi->usb_protocol_ops = &snd_usbmidi_raw_ops;/*
sound/usb/quirks-table.h +23 -1
@@ -50,6 +50,28 @@ } }, +{ +/* Creative BT-D1 */ + USB_DEVICE(0x041e, 0x0005), + .driver_info = (unsigned long ) &(const struct snd_usb_audio_quirk ) { + .ifnum =1 , + .type =QUIRK_AUDIO_FIXED_ENDPOINT , + .data = &(const struct audioformat ) { + .formats =SNDRV_PCM_FMTBIT_S16_LE , + .channels =2 , + .iface =1 , + .altsetting =1 , + .altset_idx =1 , + .endpoint =0x03 , + .ep_attr =USB_ENDPOINT_XFER_ISOC , + .attributes =0 , + .rates =SNDRV_PCM_RATE_CONTINUOUS , + .rate_min =48000 , + .rate_max =48000 , + } + } +}, +/* Creative/Toshiba Multimedia Center SB-0500 */ { USB_DEVICE(0x041e, 0x3048),
@@ -2993,7 +3015,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), }, { .ifnum = 6, - .type = QUIRK_MIDI_MBOX2, + .type = QUIRK_MIDI_MIDIMAN, .data = &(const struct snd_usb_midi_endpoint_info ) { .out_ep =0x02 , .out_cables = 0x0001,
sound/usb/quirks.c +7 -9
@@ -306,7 +306,6 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip, [QUIRK_MIDI_YAMAHA] = create_any_midi_quirk, [QUIRK_MIDI_MIDIMAN] = create_any_midi_quirk, [QUIRK_MIDI_NOVATION] = create_any_midi_quirk, - [QUIRK_MIDI_MBOX2] = create_any_midi_quirk, [QUIRK_MIDI_RAW_BYTES] = create_any_midi_quirk, [QUIRK_MIDI_EMAGIC] = create_any_midi_quirk, [QUIRK_MIDI_CME] = create_any_midi_quirk,
@@ -528,11 +527,11 @@ static void mbox2_setup_48_24_magic(struct usb_device *dev)#define MBOX2_BOOT_LOADING 0x01/* Hard coded into the device */ #define MBOX2_BOOT_READY 0x02/* Hard coded into the device */ -int snd_usb_mbox2_boot_quirk (struct usb_device *dev) +static int snd_usb_mbox2_boot_quirk (struct usb_device *dev) {struct usb_host_config *config = dev->actconfig;int err; -u8 bootresponse; +u8 bootresponse[12 ];int fwsize;int count;
@@ -546,20 +545,20 @@ int snd_usb_mbox2_boot_quirk(struct usb_device *dev)snd_printd ("usb-audio: Sending Digidesign Mbox 2 boot sequence...\n" ); count =0 ; - bootresponse =MBOX2_BOOT_LOADING ; -while ((bootresponse ==MBOX2_BOOT_LOADING ) && (count <10 )) { + bootresponse[0 ] =MBOX2_BOOT_LOADING ; +while ((bootresponse[0 ] ==MBOX2_BOOT_LOADING ) && (count <10 )) {msleep (500 );/* 0.5 second delay */ snd_usb_ctl_msg (dev,usb_rcvctrlpipe (dev,0 ),/* Control magic - load onboard firmware */ 0x85 ,0xc0 ,0x0001 ,0x0000 , &bootresponse,0x0012 ); -if (bootresponse ==MBOX2_BOOT_READY ) +if (bootresponse[0 ] ==MBOX2_BOOT_READY )break ;snd_printd ("usb-audio: device not ready, resending boot sequence...\n" ); count++; } -if (bootresponse !=MBOX2_BOOT_READY ) { -snd_printk (KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n" , bootresponse); +if (bootresponse[0 ] !=MBOX2_BOOT_READY ) { +snd_printk (KERN_ERR "usb-audio: Unknown bootresponse=%d, or timed out, ignoring device.\n" , bootresponse[0 ]);return -ENODEV ; }
@@ -660,7 +659,6 @@ static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip,return 0 ;/* keep this altsetting */ } -static int fasttrackpro_skip_setting_quirk (struct snd_usb_audio *chip,int iface,int altno) {
sound/usb/usbaudio.h +0 -1
@@ -76,7 +76,6 @@ enum quirk_type {QUIRK_MIDI_YAMAHA ,QUIRK_MIDI_MIDIMAN ,QUIRK_MIDI_NOVATION , -QUIRK_MIDI_MBOX2 ,QUIRK_MIDI_RAW_BYTES ,QUIRK_MIDI_EMAGIC , QUIRK_MIDI_CME,