sound fixes #2 for 3.6-rc2
Linus,
The following changes since commit ac190c76680cde6ce379b6be5baf89a970ea13d4:
Merge tag 'asoc-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus (2012-08-02 18:11:25 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-3.6
for you to fetch changes up to 012e7eb1e501d0120e0383b81477f63091f5e365:
ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad (2012-08-08 09:03:13 +0200)
----------------------------------------------------------------
Sound fixes for 3.6-rc2
Containing only a few really small/trivial fixes.
The only urgent fix is a regression fix of HDMI codec probing, introduced in 3.6-rc1. The rest are HD-audio specific fixes and a copule of minor bug fixes in PCM core and the old emu10k1.
----------------------------------------------------------------
David Henningsson (3):
ALSA: hda - remove quirk for Dell Vostro 1015
ALSA: hda - remove redundant auto quirks for conexant 506x
ALSA: hda - Fix double quirk for Quanta FL1 / Lenovo Ideapad
Felix Kaechele (1):
ALSA: hda - add dock support for Thinkpad X230
Philipp A. Mohrenweiser (1):
ALSA: hda - add dock support for Thinkpad T430s
Takashi Iwai (4):
ALSA: PCM: Fix possible memory leaks in the error path
ALSA: emu10k1: Avoid access to invalid pages when period=1
ALSA: hda - Fix regression of HDMI codec probing
ALSA: hda - Fix ugly debug prints with CONFIG_SND_VERBOSE_PRINTK=y
sound/core/sgbuf.c | 2 +- sound/pci/emu10k1/memory.c | 5 ++++- sound/pci/hda/hda_auto_parser.c | 5 ++--- sound/pci/hda/patch_conexant.c | 6 ------ sound/pci/hda/patch_hdmi.c | 12 +++++++++--- sound/pci/hda/patch_realtek.c | 7 +++++-- 6 files changed, 21 insertions(+), 16 deletions(-)
sound/core/sgbuf.c +1 -1
@@ -101,7 +101,7 @@ void *snd_malloc_sgbuf_pages(struct device *device,if (snd_dma_alloc_pages_fallback (SNDRV_DMA_TYPE_DEV , device, chunk, &tmpb) <0 ) {if (!sgbuf->pages) -return NULL ; + goto _failed;if (!res_size) goto _failed; size = sgbuf->pages *PAGE_SIZE ;
sound/pci/emu10k1/memory.c +4 -1
@@ -326,7 +326,10 @@ snd_emu10k1_alloc_pages(struct snd_emu10k1 *emu, struct snd_pcm_substream *substfor (page = blk->first_page; page <= blk->last_page; page++, idx++) {unsigned long ofs = idx <<PAGE_SHIFT ;dma_addr_t addr; - addr =snd_pcm_sgbuf_get_addr (substream, ofs); +if (ofs >= runtime->dma_bytes) + addr = emu->silent_page.addr; +else + addr =snd_pcm_sgbuf_get_addr (substream, ofs);if (!is_valid_page (emu, addr)) {printk (KERN_ERR "emu: failure page = %d\n" , idx);mutex_unlock (&hdr->block_mutex);
sound/pci/hda/hda_auto_parser.c +2 -3
@@ -332,13 +332,12 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec,if (cfg->dig_outs)snd_printd (" dig-out=0x%x/0x%x\n" , cfg->dig_out_pins[0 ], cfg->dig_out_pins[1 ]); -snd_printd (" inputs:" ); +snd_printd (" inputs:\n" );for (i =0 ; i < cfg->num_inputs; i++) { -snd_printd (" %s=0x%x" , +snd_printd (" %s=0x%x\n" ,hda_get_autocfg_input_label (codec, cfg, i), cfg->inputs[i].pin); } -snd_printd ("\n" );if (cfg->dig_in_pin)snd_printd (" dig-in=0x%x\n" , cfg->dig_in_pin);
sound/pci/hda/patch_conexant.c +0 -6
@@ -2967,12 +2967,10 @@ static const char * const cxt5066_models[CXT5066_MODELS] = { };static const struct snd_pci_quirk cxt5066_cfg_tbl[] = { -SND_PCI_QUIRK (0x1025 ,0x054c ,"Acer Aspire 3830TG" ,CXT5066_AUTO ),SND_PCI_QUIRK_MASK (0x1025 ,0xff00 ,0x0400 ,"Acer" ,CXT5066_IDEAPAD ),SND_PCI_QUIRK (0x1028 ,0x02d8 ,"Dell Vostro" ,CXT5066_DELL_VOSTRO ),SND_PCI_QUIRK (0x1028 ,0x02f5 ,"Dell Vostro 320" ,CXT5066_IDEAPAD ),SND_PCI_QUIRK (0x1028 ,0x0401 ,"Dell Vostro 1014" ,CXT5066_DELL_VOSTRO ), -SND_PCI_QUIRK (0x1028 ,0x0402 ,"Dell Vostro" ,CXT5066_DELL_VOSTRO ),SND_PCI_QUIRK (0x1028 ,0x0408 ,"Dell Inspiron One 19T" ,CXT5066_IDEAPAD ),SND_PCI_QUIRK (0x1028 ,0x050f ,"Dell Inspiron" ,CXT5066_IDEAPAD ),SND_PCI_QUIRK (0x1028 ,0x0510 ,"Dell Vostro" ,CXT5066_IDEAPAD ),
@@ -2988,14 +2986,10 @@ static const struct snd_pci_quirk cxt5066_cfg_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x20f2 ,"Lenovo T400s" ,CXT5066_THINKPAD ),SND_PCI_QUIRK (0x17aa ,0x21c5 ,"Thinkpad Edge 13" ,CXT5066_THINKPAD ),SND_PCI_QUIRK (0x17aa ,0x21c6 ,"Thinkpad Edge 13" ,CXT5066_ASUS ), -SND_PCI_QUIRK (0x17aa ,0x215e ,"Lenovo T510" ,CXT5066_AUTO ), -SND_PCI_QUIRK (0x17aa ,0x21cf ,"Lenovo T520 & W520" ,CXT5066_AUTO ),SND_PCI_QUIRK (0x17aa ,0x21da ,"Lenovo X220" ,CXT5066_THINKPAD ),SND_PCI_QUIRK (0x17aa ,0x21db ,"Lenovo X220-tablet" ,CXT5066_THINKPAD ),SND_PCI_QUIRK (0x17aa ,0x3a0d ,"Lenovo U350" ,CXT5066_ASUS ), SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), -SND_PCI_QUIRK (0x17aa ,0x3938 ,"Lenovo G565" ,CXT5066_AUTO ), - SND_PCI_QUIRK(0x1b0a, 0x2092, "CyberpowerPC Gamer Xplorer N57001", CXT5066_AUTO), {} };
sound/pci/hda/patch_hdmi.c +9 -3
@@ -877,8 +877,6 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo,struct hdmi_eld *eld;struct hdmi_spec_per_cvt *per_cvt =NULL ; - hinfo->nid =0 ;/* clear the leftover value */ -/* Validate hinfo */ pin_idx =hinfo_to_pin_index (spec, hinfo);if (snd_BUG_ON (pin_idx <0 ))
@@ -1163,6 +1161,14 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,return hdmi_setup_stream (codec, cvt_nid, pin_nid, stream_tag, format); } +static int generic_hdmi_playback_pcm_cleanup (struct hda_pcm_stream *hinfo, +struct hda_codec *codec, +struct snd_pcm_substream *substream) +{ +snd_hda_codec_cleanup_stream (codec, hinfo->nid); +return 0 ; +} +static int hdmi_pcm_close (struct hda_pcm_stream *hinfo,struct hda_codec *codec,struct snd_pcm_substream *substream)
@@ -1202,6 +1208,7 @@ static const struct hda_pcm_ops generic_ops = { .open = hdmi_pcm_open, .close = hdmi_pcm_close, .prepare = generic_hdmi_playback_pcm_prepare, + .cleanup = generic_hdmi_playback_pcm_cleanup, };static int generic_hdmi_build_pcms (struct hda_codec *codec)
@@ -1220,7 +1227,6 @@ static int generic_hdmi_build_pcms(struct hda_codec *codec) pstr = &info->stream[SNDRV_PCM_STREAM_PLAYBACK ]; pstr->substreams =1 ; pstr->ops = generic_ops; - pstr->nid =1 ;/* FIXME: just for avoiding a debug WARNING */ /* other pstr fields are set in open */ }
sound/pci/hda/patch_realtek.c +5 -2
@@ -6099,6 +6099,8 @@ static const struct alc_fixup alc269_fixups[] = { [ALC269_FIXUP_PCM_44K] = { .type = ALC_FIXUP_FUNC, .v.func = alc269_fixup_pcm_44k, + .chained = true, + .chain_id =ALC269_FIXUP_QUANTA_MUTE }, [ALC269_FIXUP_STEREO_DMIC] = { .type = ALC_FIXUP_FUNC,
@@ -6207,9 +6209,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x21ca ,"Thinkpad L412" ,ALC269_FIXUP_SKU_IGNORE ),SND_PCI_QUIRK (0x17aa ,0x21e9 ,"Thinkpad Edge 15" ,ALC269_FIXUP_SKU_IGNORE ),SND_PCI_QUIRK (0x17aa ,0x21f6 ,"Thinkpad T530" ,ALC269_FIXUP_LENOVO_DOCK ), +SND_PCI_QUIRK (0x17aa ,0x21fa ,"Thinkpad X230" ,ALC269_FIXUP_LENOVO_DOCK ), +SND_PCI_QUIRK (0x17aa ,0x21fb ,"Thinkpad T430s" ,ALC269_FIXUP_LENOVO_DOCK ),SND_PCI_QUIRK (0x17aa ,0x2203 ,"Thinkpad X230 Tablet" ,ALC269_FIXUP_LENOVO_DOCK ), -SND_PCI_QUIRK (0x17aa ,0x3bf8 ,"Quanta FL1" ,ALC269_FIXUP_QUANTA_MUTE ), -SND_PCI_QUIRK (0x17aa ,0x3bf8 ,"Lenovo Ideapd" ,ALC269_FIXUP_PCM_44K ), +SND_PCI_QUIRK (0x17aa ,0x3bf8 ,"Quanta FL1" ,ALC269_FIXUP_PCM_44K ),SND_PCI_QUIRK (0x17aa ,0x9e54 ,"LENOVO NB" ,ALC269_FIXUP_LENOVO_EAPD ), #if 0