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://github.com/tiwai/sound

* 'for-linus' of git://github.com/tiwai/sound:
ALSA: usb-audio - clear chip->probing on error exit
ALSA: fm801: Gracefully handle failure of tuner auto-detect
ALSA: fm801: Fix double free in case of error in tuner detection
ASoC: Ensure we generate a driver name
ASoC: Remove bitrotted wm8962_resume()
ASoC: bf5xx-ad73311: Fix prototype for bf5xx_probe

+27 -35
+10 -5
sound/pci/fm801.c
··· 68 68 module_param_array(tea575x_tuner, int, NULL, 0444); 69 69 MODULE_PARM_DESC(tea575x_tuner, "TEA575x tuner access method (0 = auto, 1 = SF256-PCS, 2=SF256-PCP, 3=SF64-PCR, 8=disable, +16=tuner-only)."); 70 70 71 + #define TUNER_DISABLED (1<<3) 71 72 #define TUNER_ONLY (1<<4) 72 73 #define TUNER_TYPE_MASK (~TUNER_ONLY & 0xFFFF) 73 74 ··· 1151 1150 1152 1151 __end_hw: 1153 1152 #ifdef CONFIG_SND_FM801_TEA575X_BOOL 1154 - snd_tea575x_exit(&chip->tea); 1153 + if (!(chip->tea575x_tuner & TUNER_DISABLED)) 1154 + snd_tea575x_exit(&chip->tea); 1155 1155 #endif 1156 1156 if (chip->irq >= 0) 1157 1157 free_irq(chip->irq, chip); ··· 1238 1236 (tea575x_tuner & TUNER_TYPE_MASK) < 4) { 1239 1237 if (snd_tea575x_init(&chip->tea)) { 1240 1238 snd_printk(KERN_ERR "TEA575x radio not found\n"); 1241 - snd_fm801_free(chip); 1242 1239 return -ENODEV; 1243 1240 } 1244 1241 } else if ((tea575x_tuner & TUNER_TYPE_MASK) == 0) { ··· 1252 1251 } 1253 1252 if (tea575x_tuner == 4) { 1254 1253 snd_printk(KERN_ERR "TEA575x radio not found\n"); 1255 - snd_fm801_free(chip); 1256 - return -ENODEV; 1254 + chip->tea575x_tuner = TUNER_DISABLED; 1257 1255 } 1258 1256 } 1259 - strlcpy(chip->tea.card, snd_fm801_tea575x_gpios[(tea575x_tuner & TUNER_TYPE_MASK) - 1].name, sizeof(chip->tea.card)); 1257 + if (!(chip->tea575x_tuner & TUNER_DISABLED)) { 1258 + strlcpy(chip->tea.card, 1259 + snd_fm801_tea575x_gpios[(tea575x_tuner & 1260 + TUNER_TYPE_MASK) - 1].name, 1261 + sizeof(chip->tea.card)); 1262 + } 1260 1263 #endif 1261 1264 1262 1265 *rchip = chip;
+1 -1
sound/soc/blackfin/bf5xx-ad73311.c
··· 128 128 return 0; 129 129 } 130 130 131 - static int bf5xx_probe(struct platform_device *pdev) 131 + static int bf5xx_probe(struct snd_soc_card *card) 132 132 { 133 133 int err; 134 134 if (gpio_request(GPIO_SE, "AD73311_SE")) {
-26
sound/soc/codecs/wm8962.c
··· 3479 3479 } 3480 3480 EXPORT_SYMBOL_GPL(wm8962_mic_detect); 3481 3481 3482 - #ifdef CONFIG_PM 3483 - static int wm8962_resume(struct snd_soc_codec *codec) 3484 - { 3485 - u16 *reg_cache = codec->reg_cache; 3486 - int i; 3487 - 3488 - /* Restore the registers */ 3489 - for (i = 1; i < codec->driver->reg_cache_size; i++) { 3490 - switch (i) { 3491 - case WM8962_SOFTWARE_RESET: 3492 - continue; 3493 - default: 3494 - break; 3495 - } 3496 - 3497 - if (reg_cache[i] != wm8962_reg[i]) 3498 - snd_soc_write(codec, i, reg_cache[i]); 3499 - } 3500 - 3501 - return 0; 3502 - } 3503 - #else 3504 - #define wm8962_resume NULL 3505 - #endif 3506 - 3507 3482 #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) 3508 3483 static int beep_rates[] = { 3509 3484 500, 1000, 2000, 4000, ··· 3990 4015 static struct snd_soc_codec_driver soc_codec_dev_wm8962 = { 3991 4016 .probe = wm8962_probe, 3992 4017 .remove = wm8962_remove, 3993 - .resume = wm8962_resume, 3994 4018 .set_bias_level = wm8962_set_bias_level, 3995 4019 .reg_cache_size = WM8962_MAX_REGISTER + 1, 3996 4020 .reg_word_size = sizeof(u16),
+15 -3
sound/soc/soc-core.c
··· 30 30 #include <linux/bitops.h> 31 31 #include <linux/debugfs.h> 32 32 #include <linux/platform_device.h> 33 + #include <linux/ctype.h> 33 34 #include <linux/slab.h> 34 35 #include <sound/ac97_codec.h> 35 36 #include <sound/core.h> ··· 1435 1434 "%s", card->name); 1436 1435 snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), 1437 1436 "%s", card->long_name ? card->long_name : card->name); 1438 - if (card->driver_name) 1439 - strlcpy(card->snd_card->driver, card->driver_name, 1440 - sizeof(card->snd_card->driver)); 1437 + snprintf(card->snd_card->driver, sizeof(card->snd_card->driver), 1438 + "%s", card->driver_name ? card->driver_name : card->name); 1439 + for (i = 0; i < ARRAY_SIZE(card->snd_card->driver); i++) { 1440 + switch (card->snd_card->driver[i]) { 1441 + case '_': 1442 + case '-': 1443 + case '\0': 1444 + break; 1445 + default: 1446 + if (!isalnum(card->snd_card->driver[i])) 1447 + card->snd_card->driver[i] = '_'; 1448 + break; 1449 + } 1450 + } 1441 1451 1442 1452 if (card->late_probe) { 1443 1453 ret = card->late_probe(card);
+1
sound/usb/card.c
··· 532 532 __error: 533 533 if (chip && !chip->num_interfaces) 534 534 snd_card_free(chip->card); 535 + chip->probing = 0; 535 536 mutex_unlock(&register_mutex); 536 537 __err_val: 537 538 return NULL;