Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop
ALSA: Use %pV for snd_printk()
ALSA: hda - Fix initialization of hp pins with master_mute in Realtek
ALSA: hda - Fix invalid unsol tag for some alc262 model quirks
ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
ASoC: fsl: fix initialization of DMA buffers
ASoC: WM8804 does not support sample rates below 32kHz
ASoC: Fix WM8962 headphone volume update for use of advanced caches
ASoC: Blackfin: bf5xx-ad1836: Fix codec device name
ALSA: hda: Fix quirk for Dell Inspiron 910
ASoC: AD1836: Fix setting the PCM format
ASoC: Check for NULL register bank in snd_soc_get_cache_val()
ASoC: Add missing break in WM8915 FLL source selection
ASoC: Only update SYSCLK_ENA when pausing WM8915 SYSCLK
ASoC: atmel_ssc: Don't try to free ssc if request failed

+74 -60
+17 -23
sound/core/misc.c
··· 58 58 else 59 59 return path; 60 60 } 61 - 62 - /* print file and line with a certain printk prefix */ 63 - static int print_snd_pfx(unsigned int level, const char *path, int line, 64 - const char *format) 65 - { 66 - const char *file = sanity_file_name(path); 67 - char tmp[] = "<0>"; 68 - const char *pfx = level ? KERN_DEBUG : KERN_DEFAULT; 69 - int ret = 0; 70 - 71 - if (format[0] == '<' && format[2] == '>') { 72 - tmp[1] = format[1]; 73 - pfx = tmp; 74 - ret = 1; 75 - } 76 - printk("%sALSA %s:%d: ", pfx, file, line); 77 - return ret; 78 - } 79 - #else 80 - #define print_snd_pfx(level, path, line, format) 0 81 61 #endif 82 62 83 63 #if defined(CONFIG_SND_DEBUG) || defined(CONFIG_SND_VERBOSE_PRINTK) ··· 65 85 const char *format, ...) 66 86 { 67 87 va_list args; 68 - 88 + #ifdef CONFIG_SND_VERBOSE_PRINTK 89 + struct va_format vaf; 90 + char verbose_fmt[] = KERN_DEFAULT "ALSA %s:%d %pV"; 91 + #endif 92 + 69 93 #ifdef CONFIG_SND_DEBUG 70 94 if (debug < level) 71 95 return; 72 96 #endif 97 + 73 98 va_start(args, format); 74 - if (print_snd_pfx(level, path, line, format)) 75 - format += 3; /* skip the printk level-prefix */ 99 + #ifdef CONFIG_SND_VERBOSE_PRINTK 100 + vaf.fmt = format; 101 + vaf.va = &args; 102 + if (format[0] == '<' && format[2] == '>') { 103 + memcpy(verbose_fmt, format, 3); 104 + vaf.fmt = format + 3; 105 + } else if (level) 106 + memcpy(verbose_fmt, KERN_DEBUG, 3); 107 + printk(verbose_fmt, sanity_file_name(path), line, &vaf); 108 + #else 76 109 vprintk(format, args); 110 + #endif 77 111 va_end(args); 78 112 } 79 113 EXPORT_SYMBOL_GPL(__snd_printk);
+1
sound/pci/hda/patch_conexant.c
··· 3102 3102 SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo G560", CXT5066_ASUS), 3103 3103 SND_PCI_QUIRK(0x17aa, 0x3938, "Lenovo G565", CXT5066_AUTO), 3104 3104 SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT5066_IDEAPAD), /* Fallback for Lenovos without dock mic */ 3105 + SND_PCI_QUIRK(0x1b0a, 0x2092, "CyberpowerPC Gamer Xplorer N57001", CXT5066_AUTO), 3105 3106 {} 3106 3107 }; 3107 3108
+9 -6
sound/pci/hda/patch_realtek.c
··· 1141 1141 struct alc_spec *spec = codec->spec; 1142 1142 int on; 1143 1143 1144 + /* Control HP pins/amps depending on master_mute state; 1145 + * in general, HP pins/amps control should be enabled in all cases, 1146 + * but currently set only for master_mute, just to be safe 1147 + */ 1148 + do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), 1149 + spec->autocfg.hp_pins, spec->master_mute, true); 1150 + 1144 1151 if (!spec->automute) 1145 1152 on = 0; 1146 1153 else ··· 6208 6201 /* update HP, line and mono out pins according to the master switch */ 6209 6202 static void alc260_hp_master_update(struct hda_codec *codec) 6210 6203 { 6211 - struct alc_spec *spec = codec->spec; 6212 - 6213 - /* change HP pins */ 6214 - do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), 6215 - spec->autocfg.hp_pins, spec->master_mute, true); 6216 6204 update_speakers(codec); 6217 6205 } 6218 6206 ··· 11926 11924 * 0x1b = port replicator headphone out 11927 11925 */ 11928 11926 11929 - #define ALC_HP_EVENT 0x37 11927 + #define ALC_HP_EVENT ALC880_HP_EVENT 11930 11928 11931 11929 static const struct hda_verb alc262_fujitsu_unsol_verbs[] = { 11932 11930 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT}, ··· 13862 13860 SND_PCI_QUIRK(0x1025, 0x015b, "Acer Aspire One", 13863 13861 ALC268_ACER_ASPIRE_ONE), 13864 13862 SND_PCI_QUIRK(0x1028, 0x0253, "Dell OEM", ALC268_DELL), 13863 + SND_PCI_QUIRK(0x1028, 0x02b0, "Dell Inspiron 910", ALC268_AUTO), 13865 13864 SND_PCI_QUIRK_MASK(0x1028, 0xfff0, 0x02b0, 13866 13865 "Dell Inspiron Mini9/Vostro A90", ALC268_DELL), 13867 13866 /* almost compatible with toshiba but with optional digital outs;
+3 -2
sound/soc/atmel/atmel_ssc_dai.c
··· 848 848 if (IS_ERR(ssc)) 849 849 pr_warn("Unable to parent ASoC SSC DAI on SSC: %ld\n", 850 850 PTR_ERR(ssc)); 851 - else 851 + else { 852 852 ssc_pdev->dev.parent = &(ssc->pdev->dev); 853 - ssc_free(ssc); 853 + ssc_free(ssc); 854 + } 854 855 855 856 ret = platform_device_add(ssc_pdev); 856 857 if (ret < 0)
+2 -2
sound/soc/blackfin/bf5xx-ad1836.c
··· 75 75 .cpu_dai_name = "bfin-tdm.0", 76 76 .codec_dai_name = "ad1836-hifi", 77 77 .platform_name = "bfin-tdm-pcm-audio", 78 - .codec_name = "ad1836.0", 78 + .codec_name = "spi0.4", 79 79 .ops = &bf5xx_ad1836_ops, 80 80 }, 81 81 { ··· 84 84 .cpu_dai_name = "bfin-tdm.1", 85 85 .codec_dai_name = "ad1836-hifi", 86 86 .platform_name = "bfin-tdm-pcm-audio", 87 - .codec_name = "ad1836.0", 87 + .codec_name = "spi0.4", 88 88 .ops = &bf5xx_ad1836_ops, 89 89 }, 90 90 };
+7 -7
sound/soc/codecs/ad1836.c
··· 145 145 /* bit size */ 146 146 switch (params_format(params)) { 147 147 case SNDRV_PCM_FORMAT_S16_LE: 148 - word_len = 3; 148 + word_len = AD1836_WORD_LEN_16; 149 149 break; 150 150 case SNDRV_PCM_FORMAT_S20_3LE: 151 - word_len = 1; 151 + word_len = AD1836_WORD_LEN_20; 152 152 break; 153 153 case SNDRV_PCM_FORMAT_S24_LE: 154 154 case SNDRV_PCM_FORMAT_S32_LE: 155 - word_len = 0; 155 + word_len = AD1836_WORD_LEN_24; 156 156 break; 157 157 } 158 158 159 - snd_soc_update_bits(codec, AD1836_DAC_CTRL1, 160 - AD1836_DAC_WORD_LEN_MASK, word_len); 159 + snd_soc_update_bits(codec, AD1836_DAC_CTRL1, AD1836_DAC_WORD_LEN_MASK, 160 + word_len << AD1836_DAC_WORD_LEN_OFFSET); 161 161 162 - snd_soc_update_bits(codec, AD1836_ADC_CTRL2, 163 - AD1836_ADC_WORD_LEN_MASK, word_len); 162 + snd_soc_update_bits(codec, AD1836_ADC_CTRL2, AD1836_ADC_WORD_LEN_MASK, 163 + word_len << AD1836_ADC_WORD_OFFSET); 164 164 165 165 return 0; 166 166 }
+6
sound/soc/codecs/ad1836.h
··· 25 25 #define AD1836_DAC_SERFMT_PCK256 (0x4 << 5) 26 26 #define AD1836_DAC_SERFMT_PCK128 (0x5 << 5) 27 27 #define AD1836_DAC_WORD_LEN_MASK 0x18 28 + #define AD1836_DAC_WORD_LEN_OFFSET 3 28 29 29 30 #define AD1836_DAC_CTRL2 1 30 31 #define AD1836_DACL1_MUTE 0 ··· 52 51 #define AD1836_ADCL2_MUTE 2 53 52 #define AD1836_ADCR2_MUTE 3 54 53 #define AD1836_ADC_WORD_LEN_MASK 0x30 54 + #define AD1836_ADC_WORD_OFFSET 5 55 55 #define AD1836_ADC_SERFMT_MASK (7 << 6) 56 56 #define AD1836_ADC_SERFMT_PCK256 (0x4 << 6) 57 57 #define AD1836_ADC_SERFMT_PCK128 (0x5 << 6) ··· 61 59 #define AD1836_ADC_CTRL3 14 62 60 63 61 #define AD1836_NUM_REGS 16 62 + 63 + #define AD1836_WORD_LEN_24 0x0 64 + #define AD1836_WORD_LEN_20 0x1 65 + #define AD1836_WORD_LEN_16 0x2 64 66 65 67 #endif
+7 -2
sound/soc/codecs/wm8804.c
··· 680 680 #define WM8804_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 681 681 SNDRV_PCM_FMTBIT_S24_LE) 682 682 683 + #define WM8804_RATES (SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \ 684 + SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_64000 | \ 685 + SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 | \ 686 + SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000) 687 + 683 688 static struct snd_soc_dai_driver wm8804_dai = { 684 689 .name = "wm8804-spdif", 685 690 .playback = { 686 691 .stream_name = "Playback", 687 692 .channels_min = 2, 688 693 .channels_max = 2, 689 - .rates = SNDRV_PCM_RATE_8000_192000, 694 + .rates = WM8804_RATES, 690 695 .formats = WM8804_FORMATS, 691 696 }, 692 697 .capture = { 693 698 .stream_name = "Capture", 694 699 .channels_min = 2, 695 700 .channels_max = 2, 696 - .rates = SNDRV_PCM_RATE_8000_192000, 701 + .rates = WM8804_RATES, 697 702 .formats = WM8804_FORMATS, 698 703 }, 699 704 .ops = &wm8804_dai_ops,
+2 -1
sound/soc/codecs/wm8915.c
··· 1839 1839 int old; 1840 1840 1841 1841 /* Disable SYSCLK while we reconfigure */ 1842 - old = snd_soc_read(codec, WM8915_AIF_CLOCKING_1); 1842 + old = snd_soc_read(codec, WM8915_AIF_CLOCKING_1) & WM8915_SYSCLK_ENA; 1843 1843 snd_soc_update_bits(codec, WM8915_AIF_CLOCKING_1, 1844 1844 WM8915_SYSCLK_ENA, 0); 1845 1845 ··· 2038 2038 break; 2039 2039 case WM8915_FLL_MCLK2: 2040 2040 reg = 1; 2041 + break; 2041 2042 case WM8915_FLL_DACLRCLK1: 2042 2043 reg = 2; 2043 2044 break;
+2 -2
sound/soc/codecs/wm8962.c
··· 1999 1999 return 0; 2000 2000 2001 2001 /* If the left PGA is enabled hit that VU bit... */ 2002 - if (reg_cache[WM8962_PWR_MGMT_2] & WM8962_HPOUTL_PGA_ENA) 2002 + if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTL_PGA_ENA) 2003 2003 return snd_soc_write(codec, WM8962_HPOUTL_VOLUME, 2004 2004 reg_cache[WM8962_HPOUTL_VOLUME]); 2005 2005 2006 2006 /* ...otherwise the right. The VU is stereo. */ 2007 - if (reg_cache[WM8962_PWR_MGMT_2] & WM8962_HPOUTR_PGA_ENA) 2007 + if (snd_soc_read(codec, WM8962_PWR_MGMT_2) & WM8962_HPOUTR_PGA_ENA) 2008 2008 return snd_soc_write(codec, WM8962_HPOUTR_VOLUME, 2009 2009 reg_cache[WM8962_HPOUTR_VOLUME]); 2010 2010
+5 -4
sound/soc/fsl/fsl_dma.c
··· 310 310 * should allocate a DMA buffer only for the streams that are valid. 311 311 */ 312 312 313 - if (dai->driver->playback.channels_min) { 313 + if (pcm->streams[0].substream) { 314 314 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, 315 315 fsl_dma_hardware.buffer_bytes_max, 316 316 &pcm->streams[0].substream->dma_buffer); ··· 320 320 } 321 321 } 322 322 323 - if (dai->driver->capture.channels_min) { 323 + if (pcm->streams[1].substream) { 324 324 ret = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, card->dev, 325 325 fsl_dma_hardware.buffer_bytes_max, 326 326 &pcm->streams[1].substream->dma_buffer); 327 327 if (ret) { 328 - snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); 329 328 dev_err(card->dev, "can't alloc capture dma buffer\n"); 329 + snd_dma_free_pages(&pcm->streams[0].substream->dma_buffer); 330 330 return ret; 331 331 } 332 332 } ··· 449 449 dma_private->ld_buf_phys = ld_buf_phys; 450 450 dma_private->dma_buf_phys = substream->dma_buffer.addr; 451 451 452 - ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "DMA", dma_private); 452 + ret = request_irq(dma_private->irq, fsl_dma_isr, 0, "fsldma-audio", 453 + dma_private); 453 454 if (ret) { 454 455 dev_err(dev, "can't register ISR for IRQ %u (ret=%i)\n", 455 456 dma_private->irq, ret);
+2 -2
sound/soc/samsung/i2s.c
··· 191 191 if (!i2s) 192 192 return false; 193 193 194 - active = readl(i2s->addr + I2SMOD); 194 + active = readl(i2s->addr + I2SCON); 195 195 196 196 if (is_secondary(i2s)) 197 197 active &= CON_TXSDMA_ACTIVE; ··· 223 223 if (!i2s) 224 224 return false; 225 225 226 - active = readl(i2s->addr + I2SMOD) & CON_RXDMA_ACTIVE; 226 + active = readl(i2s->addr + I2SCON) & CON_RXDMA_ACTIVE; 227 227 228 228 return active ? true : false; 229 229 }
+3
sound/soc/soc-cache.c
··· 466 466 static unsigned int snd_soc_get_cache_val(const void *base, unsigned int idx, 467 467 unsigned int word_size) 468 468 { 469 + if (!base) 470 + return -1; 471 + 469 472 switch (word_size) { 470 473 case 1: { 471 474 const u8 *cache = base;
+8 -9
sound/soc/soc-dapm.c
··· 350 350 } 351 351 352 352 /* create new dapm mixer control */ 353 - static int dapm_new_mixer(struct snd_soc_dapm_context *dapm, 354 - struct snd_soc_dapm_widget *w) 353 + static int dapm_new_mixer(struct snd_soc_dapm_widget *w) 355 354 { 355 + struct snd_soc_dapm_context *dapm = w->dapm; 356 356 int i, ret = 0; 357 357 size_t name_len, prefix_len; 358 358 struct snd_soc_dapm_path *path; ··· 450 450 } 451 451 452 452 /* create new dapm mux control */ 453 - static int dapm_new_mux(struct snd_soc_dapm_context *dapm, 454 - struct snd_soc_dapm_widget *w) 453 + static int dapm_new_mux(struct snd_soc_dapm_widget *w) 455 454 { 455 + struct snd_soc_dapm_context *dapm = w->dapm; 456 456 struct snd_soc_dapm_path *path = NULL; 457 457 struct snd_kcontrol *kcontrol; 458 458 struct snd_card *card = dapm->card->snd_card; ··· 535 535 } 536 536 537 537 /* create new dapm volume control */ 538 - static int dapm_new_pga(struct snd_soc_dapm_context *dapm, 539 - struct snd_soc_dapm_widget *w) 538 + static int dapm_new_pga(struct snd_soc_dapm_widget *w) 540 539 { 541 540 if (w->num_kcontrols) 542 541 dev_err(w->dapm->dev, ··· 1825 1826 case snd_soc_dapm_mixer: 1826 1827 case snd_soc_dapm_mixer_named_ctl: 1827 1828 w->power_check = dapm_generic_check_power; 1828 - dapm_new_mixer(dapm, w); 1829 + dapm_new_mixer(w); 1829 1830 break; 1830 1831 case snd_soc_dapm_mux: 1831 1832 case snd_soc_dapm_virt_mux: 1832 1833 case snd_soc_dapm_value_mux: 1833 1834 w->power_check = dapm_generic_check_power; 1834 - dapm_new_mux(dapm, w); 1835 + dapm_new_mux(w); 1835 1836 break; 1836 1837 case snd_soc_dapm_adc: 1837 1838 case snd_soc_dapm_aif_out: ··· 1844 1845 case snd_soc_dapm_pga: 1845 1846 case snd_soc_dapm_out_drv: 1846 1847 w->power_check = dapm_generic_check_power; 1847 - dapm_new_pga(dapm, w); 1848 + dapm_new_pga(w); 1848 1849 break; 1849 1850 case snd_soc_dapm_input: 1850 1851 case snd_soc_dapm_output: