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 tag 'sound-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Hopefully the final pull request for 3.19: this ended up with a
slightly higher volume than wished, but I put them all as they are
either stable or 3.19 regression fixes.

Most of commits are from ASoC, and have been stewed for a while in
linux-next. The only change in the common code is the regression
fixes for ASoC AC97 stuff wrt device registrations. The rest are
device-specific, mostly small fixes in various ASoC drivers and ak411x
on ice1724 boards"

* tag 'sound-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ASoC: Intel: fix sst firmware path for cht-bsw-rt5672
ARM: dts: Fix I2S1, I2S2 compatible for exynos4 SoCs
ASoC: sgtl5000: add delay before first I2C access
MAINTAINERS: ASoC: add maintainer for Intel BDW/HSW ASoC driver
ASoC: atmel_ssc_dai: fix the setting for DSP mode
ASoC: sgtl5000: Use shift mask when setting codec mode
ASoC: tlv320aic3x: Fix data delay configuration
ALSA: ak411x: Fix stall in work callback
ASoC: Intel: Used lock version to update shim registers
ASoC: wm8731: init mutex in i2c init path
ASoC: atmel_ssc_dai: fix start event for I2S mode
ASoC: rt5640: Add RT5642 ACPI ID for Intel Baytrail
ASoC: wm97xx: Reset AC'97 device before registering it
ASoC: Add support for allocating AC'97 device before registering it

+109 -69
+10
MAINTAINERS
··· 4953 4953 F: drivers/input/input-mt.c 4954 4954 K: \b(ABS|SYN)_MT_ 4955 4955 4956 + INTEL ASoC BDW/HSW DRIVERS 4957 + M: Jie Yang <yang.jie@linux.intel.com> 4958 + L: alsa-devel@alsa-project.org 4959 + S: Supported 4960 + F: sound/soc/intel/sst-haswell* 4961 + F: sound/soc/intel/sst-dsp* 4962 + F: sound/soc/intel/sst-firmware.c 4963 + F: sound/soc/intel/broadwell.c 4964 + F: sound/soc/intel/haswell.c 4965 + 4956 4966 INTEL C600 SERIES SAS CONTROLLER DRIVER 4957 4967 M: Intel SCU Linux support <intel-linux-scu@intel.com> 4958 4968 M: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
+2 -2
arch/arm/boot/dts/exynos4.dtsi
··· 368 368 }; 369 369 370 370 i2s1: i2s@13960000 { 371 - compatible = "samsung,s5pv210-i2s"; 371 + compatible = "samsung,s3c6410-i2s"; 372 372 reg = <0x13960000 0x100>; 373 373 clocks = <&clock CLK_I2S1>; 374 374 clock-names = "iis"; ··· 378 378 }; 379 379 380 380 i2s2: i2s@13970000 { 381 - compatible = "samsung,s5pv210-i2s"; 381 + compatible = "samsung,s3c6410-i2s"; 382 382 reg = <0x13970000 0x100>; 383 383 clocks = <&clock CLK_I2S2>; 384 384 clock-names = "iis";
+1 -1
include/sound/ak4113.h
··· 286 286 ak4113_write_t *write; 287 287 ak4113_read_t *read; 288 288 void *private_data; 289 - unsigned int init:1; 289 + atomic_t wq_processing; 290 290 spinlock_t lock; 291 291 unsigned char regmap[AK4113_WRITABLE_REGS]; 292 292 struct snd_kcontrol *kctls[AK4113_CONTROLS];
+1 -1
include/sound/ak4114.h
··· 168 168 ak4114_write_t * write; 169 169 ak4114_read_t * read; 170 170 void * private_data; 171 - unsigned int init: 1; 171 + atomic_t wq_processing; 172 172 spinlock_t lock; 173 173 unsigned char regmap[6]; 174 174 unsigned char txcsb[5];
+1
include/sound/soc.h
··· 498 498 unsigned int mask, unsigned int value); 499 499 500 500 #ifdef CONFIG_SND_SOC_AC97_BUS 501 + struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec); 501 502 struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec); 502 503 void snd_soc_free_ac97_codec(struct snd_ac97 *ac97); 503 504
+8 -9
sound/i2c/other/ak4113.c
··· 56 56 57 57 static void snd_ak4113_free(struct ak4113 *chip) 58 58 { 59 - chip->init = 1; /* don't schedule new work */ 60 - mb(); 59 + atomic_inc(&chip->wq_processing); /* don't schedule new work */ 61 60 cancel_delayed_work_sync(&chip->work); 62 61 kfree(chip); 63 62 } ··· 88 89 chip->write = write; 89 90 chip->private_data = private_data; 90 91 INIT_DELAYED_WORK(&chip->work, ak4113_stats); 92 + atomic_set(&chip->wq_processing, 0); 91 93 92 94 for (reg = 0; reg < AK4113_WRITABLE_REGS ; reg++) 93 95 chip->regmap[reg] = pgm[reg]; ··· 139 139 140 140 void snd_ak4113_reinit(struct ak4113 *chip) 141 141 { 142 - chip->init = 1; 143 - mb(); 144 - flush_delayed_work(&chip->work); 142 + if (atomic_inc_return(&chip->wq_processing) == 1) 143 + cancel_delayed_work_sync(&chip->work); 145 144 ak4113_init_regs(chip); 146 145 /* bring up statistics / event queing */ 147 - chip->init = 0; 148 - if (chip->kctls[0]) 146 + if (atomic_dec_and_test(&chip->wq_processing)) 149 147 schedule_delayed_work(&chip->work, HZ / 10); 150 148 } 151 149 EXPORT_SYMBOL_GPL(snd_ak4113_reinit); ··· 630 632 { 631 633 struct ak4113 *chip = container_of(work, struct ak4113, work.work); 632 634 633 - if (!chip->init) 635 + if (atomic_inc_return(&chip->wq_processing) == 1) 634 636 snd_ak4113_check_rate_and_errors(chip, chip->check_flags); 635 637 636 - schedule_delayed_work(&chip->work, HZ / 10); 638 + if (atomic_dec_and_test(&chip->wq_processing)) 639 + schedule_delayed_work(&chip->work, HZ / 10); 637 640 }
+8 -10
sound/i2c/other/ak4114.c
··· 66 66 67 67 static void snd_ak4114_free(struct ak4114 *chip) 68 68 { 69 - chip->init = 1; /* don't schedule new work */ 70 - mb(); 69 + atomic_inc(&chip->wq_processing); /* don't schedule new work */ 71 70 cancel_delayed_work_sync(&chip->work); 72 71 kfree(chip); 73 72 } ··· 99 100 chip->write = write; 100 101 chip->private_data = private_data; 101 102 INIT_DELAYED_WORK(&chip->work, ak4114_stats); 103 + atomic_set(&chip->wq_processing, 0); 102 104 103 105 for (reg = 0; reg < 6; reg++) 104 106 chip->regmap[reg] = pgm[reg]; ··· 152 152 153 153 void snd_ak4114_reinit(struct ak4114 *chip) 154 154 { 155 - chip->init = 1; 156 - mb(); 157 - flush_delayed_work(&chip->work); 155 + if (atomic_inc_return(&chip->wq_processing) == 1) 156 + cancel_delayed_work_sync(&chip->work); 158 157 ak4114_init_regs(chip); 159 158 /* bring up statistics / event queing */ 160 - chip->init = 0; 161 - if (chip->kctls[0]) 159 + if (atomic_dec_and_test(&chip->wq_processing)) 162 160 schedule_delayed_work(&chip->work, HZ / 10); 163 161 } 164 162 ··· 610 612 { 611 613 struct ak4114 *chip = container_of(work, struct ak4114, work.work); 612 614 613 - if (!chip->init) 615 + if (atomic_inc_return(&chip->wq_processing) == 1) 614 616 snd_ak4114_check_rate_and_errors(chip, chip->check_flags); 615 - 616 - schedule_delayed_work(&chip->work, HZ / 10); 617 + if (atomic_dec_and_test(&chip->wq_processing)) 618 + schedule_delayed_work(&chip->work, HZ / 10); 617 619 } 618 620 619 621 EXPORT_SYMBOL(snd_ak4114_create);
+7 -17
sound/soc/atmel/atmel_ssc_dai.c
··· 348 348 struct atmel_pcm_dma_params *dma_params; 349 349 int dir, channels, bits; 350 350 u32 tfmr, rfmr, tcmr, rcmr; 351 - int start_event; 352 351 int ret; 353 352 int fslen, fslen_ext; 354 353 ··· 456 457 * The SSC transmit clock is obtained from the BCLK signal on 457 458 * on the TK line, and the SSC receive clock is 458 459 * generated from the transmit clock. 459 - * 460 - * For single channel data, one sample is transferred 461 - * on the falling edge of the LRC clock. 462 - * For two channel data, one sample is 463 - * transferred on both edges of the LRC clock. 464 460 */ 465 - start_event = ((channels == 1) 466 - ? SSC_START_FALLING_RF 467 - : SSC_START_EDGE_RF); 468 - 469 461 rcmr = SSC_BF(RCMR_PERIOD, 0) 470 462 | SSC_BF(RCMR_STTDLY, START_DELAY) 471 - | SSC_BF(RCMR_START, start_event) 463 + | SSC_BF(RCMR_START, SSC_START_FALLING_RF) 472 464 | SSC_BF(RCMR_CKI, SSC_CKI_RISING) 473 465 | SSC_BF(RCMR_CKO, SSC_CKO_NONE) 474 466 | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? ··· 468 478 rfmr = SSC_BF(RFMR_FSEDGE, SSC_FSEDGE_POSITIVE) 469 479 | SSC_BF(RFMR_FSOS, SSC_FSOS_NONE) 470 480 | SSC_BF(RFMR_FSLEN, 0) 471 - | SSC_BF(RFMR_DATNB, 0) 481 + | SSC_BF(RFMR_DATNB, (channels - 1)) 472 482 | SSC_BIT(RFMR_MSBF) 473 483 | SSC_BF(RFMR_LOOP, 0) 474 484 | SSC_BF(RFMR_DATLEN, (bits - 1)); 475 485 476 486 tcmr = SSC_BF(TCMR_PERIOD, 0) 477 487 | SSC_BF(TCMR_STTDLY, START_DELAY) 478 - | SSC_BF(TCMR_START, start_event) 488 + | SSC_BF(TCMR_START, SSC_START_FALLING_RF) 479 489 | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) 480 490 | SSC_BF(TCMR_CKO, SSC_CKO_NONE) 481 491 | SSC_BF(TCMR_CKS, ssc->clk_from_rk_pin ? ··· 485 495 | SSC_BF(TFMR_FSDEN, 0) 486 496 | SSC_BF(TFMR_FSOS, SSC_FSOS_NONE) 487 497 | SSC_BF(TFMR_FSLEN, 0) 488 - | SSC_BF(TFMR_DATNB, 0) 498 + | SSC_BF(TFMR_DATNB, (channels - 1)) 489 499 | SSC_BIT(TFMR_MSBF) 490 500 | SSC_BF(TFMR_DATDEF, 0) 491 501 | SSC_BF(TFMR_DATLEN, (bits - 1)); ··· 502 512 rcmr = SSC_BF(RCMR_PERIOD, ssc_p->rcmr_period) 503 513 | SSC_BF(RCMR_STTDLY, 1) 504 514 | SSC_BF(RCMR_START, SSC_START_RISING_RF) 505 - | SSC_BF(RCMR_CKI, SSC_CKI_RISING) 515 + | SSC_BF(RCMR_CKI, SSC_CKI_FALLING) 506 516 | SSC_BF(RCMR_CKO, SSC_CKO_NONE) 507 517 | SSC_BF(RCMR_CKS, SSC_CKS_DIV); 508 518 ··· 517 527 tcmr = SSC_BF(TCMR_PERIOD, ssc_p->tcmr_period) 518 528 | SSC_BF(TCMR_STTDLY, 1) 519 529 | SSC_BF(TCMR_START, SSC_START_RISING_RF) 520 - | SSC_BF(TCMR_CKI, SSC_CKI_RISING) 530 + | SSC_BF(TCMR_CKI, SSC_CKI_FALLING) 521 531 | SSC_BF(TCMR_CKO, SSC_CKO_CONTINUOUS) 522 532 | SSC_BF(TCMR_CKS, SSC_CKS_DIV); 523 533 ··· 546 556 rcmr = SSC_BF(RCMR_PERIOD, 0) 547 557 | SSC_BF(RCMR_STTDLY, START_DELAY) 548 558 | SSC_BF(RCMR_START, SSC_START_RISING_RF) 549 - | SSC_BF(RCMR_CKI, SSC_CKI_RISING) 559 + | SSC_BF(RCMR_CKI, SSC_CKI_FALLING) 550 560 | SSC_BF(RCMR_CKO, SSC_CKO_NONE) 551 561 | SSC_BF(RCMR_CKS, ssc->clk_from_rk_pin ? 552 562 SSC_CKS_PIN : SSC_CKS_CLOCK);
+1
sound/soc/codecs/rt5640.c
··· 2124 2124 static struct acpi_device_id rt5640_acpi_match[] = { 2125 2125 { "INT33CA", 0 }, 2126 2126 { "10EC5640", 0 }, 2127 + { "10EC5642", 0 }, 2127 2128 { }, 2128 2129 }; 2129 2130 MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
+8 -5
sound/soc/codecs/sgtl5000.c
··· 483 483 /* setting i2s data format */ 484 484 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { 485 485 case SND_SOC_DAIFMT_DSP_A: 486 - i2sctl |= SGTL5000_I2S_MODE_PCM; 486 + i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; 487 487 break; 488 488 case SND_SOC_DAIFMT_DSP_B: 489 - i2sctl |= SGTL5000_I2S_MODE_PCM; 489 + i2sctl |= SGTL5000_I2S_MODE_PCM << SGTL5000_I2S_MODE_SHIFT; 490 490 i2sctl |= SGTL5000_I2S_LRALIGN; 491 491 break; 492 492 case SND_SOC_DAIFMT_I2S: 493 - i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; 493 + i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; 494 494 break; 495 495 case SND_SOC_DAIFMT_RIGHT_J: 496 - i2sctl |= SGTL5000_I2S_MODE_RJ; 496 + i2sctl |= SGTL5000_I2S_MODE_RJ << SGTL5000_I2S_MODE_SHIFT; 497 497 i2sctl |= SGTL5000_I2S_LRPOL; 498 498 break; 499 499 case SND_SOC_DAIFMT_LEFT_J: 500 - i2sctl |= SGTL5000_I2S_MODE_I2S_LJ; 500 + i2sctl |= SGTL5000_I2S_MODE_I2S_LJ << SGTL5000_I2S_MODE_SHIFT; 501 501 i2sctl |= SGTL5000_I2S_LRALIGN; 502 502 break; 503 503 default: ··· 1461 1461 ret = clk_prepare_enable(sgtl5000->mclk); 1462 1462 if (ret) 1463 1463 return ret; 1464 + 1465 + /* Need 8 clocks before I2C accesses */ 1466 + udelay(1); 1464 1467 1465 1468 /* read chip information */ 1466 1469 ret = regmap_read(sgtl5000->regmap, SGTL5000_CHIP_ID, &reg);
+1 -1
sound/soc/codecs/tlv320aic3x.c
··· 1046 1046 delay += aic3x->tdm_delay; 1047 1047 1048 1048 /* Configure data delay */ 1049 - snd_soc_write(codec, AIC3X_ASD_INTF_CTRLC, aic3x->tdm_delay); 1049 + snd_soc_write(codec, AIC3X_ASD_INTF_CTRLC, delay); 1050 1050 1051 1051 return 0; 1052 1052 }
+2
sound/soc/codecs/wm8731.c
··· 717 717 if (wm8731 == NULL) 718 718 return -ENOMEM; 719 719 720 + mutex_init(&wm8731->lock); 721 + 720 722 wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); 721 723 if (IS_ERR(wm8731->regmap)) { 722 724 ret = PTR_ERR(wm8731->regmap);
+10 -6
sound/soc/codecs/wm9705.c
··· 344 344 struct snd_ac97 *ac97; 345 345 int ret = 0; 346 346 347 - ac97 = snd_soc_new_ac97_codec(codec); 347 + ac97 = snd_soc_alloc_ac97_codec(codec); 348 348 if (IS_ERR(ac97)) { 349 349 ret = PTR_ERR(ac97); 350 350 dev_err(codec->dev, "Failed to register AC97 codec\n"); 351 351 return ret; 352 352 } 353 353 354 - snd_soc_codec_set_drvdata(codec, ac97); 355 - 356 354 ret = wm9705_reset(codec); 357 355 if (ret) 358 - goto reset_err; 356 + goto err_put_device; 357 + 358 + ret = device_add(&ac97->dev); 359 + if (ret) 360 + goto err_put_device; 361 + 362 + snd_soc_codec_set_drvdata(codec, ac97); 359 363 360 364 return 0; 361 365 362 - reset_err: 363 - snd_soc_free_ac97_codec(ac97); 366 + err_put_device: 367 + put_device(&ac97->dev); 364 368 return ret; 365 369 } 366 370
+8 -4
sound/soc/codecs/wm9712.c
··· 666 666 struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); 667 667 int ret = 0; 668 668 669 - wm9712->ac97 = snd_soc_new_ac97_codec(codec); 669 + wm9712->ac97 = snd_soc_alloc_ac97_codec(codec); 670 670 if (IS_ERR(wm9712->ac97)) { 671 671 ret = PTR_ERR(wm9712->ac97); 672 672 dev_err(codec->dev, "Failed to register AC97 codec: %d\n", ret); ··· 675 675 676 676 ret = wm9712_reset(codec, 0); 677 677 if (ret < 0) 678 - goto reset_err; 678 + goto err_put_device; 679 + 680 + ret = device_add(&wm9712->ac97->dev); 681 + if (ret) 682 + goto err_put_device; 679 683 680 684 /* set alc mux to none */ 681 685 ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000); 682 686 683 687 return 0; 684 688 685 - reset_err: 686 - snd_soc_free_ac97_codec(wm9712->ac97); 689 + err_put_device: 690 + put_device(&wm9712->ac97->dev); 687 691 return ret; 688 692 } 689 693
+8 -4
sound/soc/codecs/wm9713.c
··· 1225 1225 struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); 1226 1226 int ret = 0, reg; 1227 1227 1228 - wm9713->ac97 = snd_soc_new_ac97_codec(codec); 1228 + wm9713->ac97 = snd_soc_alloc_ac97_codec(codec); 1229 1229 if (IS_ERR(wm9713->ac97)) 1230 1230 return PTR_ERR(wm9713->ac97); 1231 1231 ··· 1234 1234 wm9713_reset(codec, 0); 1235 1235 ret = wm9713_reset(codec, 1); 1236 1236 if (ret < 0) 1237 - goto reset_err; 1237 + goto err_put_device; 1238 + 1239 + ret = device_add(&wm9713->ac97->dev); 1240 + if (ret) 1241 + goto err_put_device; 1238 1242 1239 1243 /* unmute the adc - move to kcontrol */ 1240 1244 reg = ac97_read(codec, AC97_CD) & 0x7fff; ··· 1246 1242 1247 1243 return 0; 1248 1244 1249 - reset_err: 1250 - snd_soc_free_ac97_codec(wm9713->ac97); 1245 + err_put_device: 1246 + put_device(&wm9713->ac97->dev); 1251 1247 return ret; 1252 1248 } 1253 1249
+2 -2
sound/soc/intel/sst-haswell-ipc.c
··· 651 651 } 652 652 653 653 /* tell DSP that notification has been handled */ 654 - sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IPCD, 654 + sst_dsp_shim_update_bits(hsw->dsp, SST_IPCD, 655 655 SST_IPCD_BUSY | SST_IPCD_DONE, SST_IPCD_DONE); 656 656 657 657 /* unmask busy interrupt */ 658 - sst_dsp_shim_update_bits_unlocked(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); 658 + sst_dsp_shim_update_bits(hsw->dsp, SST_IMRX, SST_IMRX_BUSY, 0); 659 659 } 660 660 661 661 static struct ipc_message *reply_find_msg(struct sst_hsw *hsw, u32 header)
+1 -1
sound/soc/intel/sst/sst_acpi.c
··· 350 350 351 351 /* Cherryview-based platforms: CherryTrail and Braswell */ 352 352 static struct sst_machines sst_acpi_chv[] = { 353 - {"10EC5670", "cht-bsw", "cht-bsw-rt5672", NULL, "fw_sst_22a8.bin", 353 + {"10EC5670", "cht-bsw", "cht-bsw-rt5672", NULL, "intel/fw_sst_22a8.bin", 354 354 &chv_platform_data }, 355 355 {}, 356 356 };
+30 -6
sound/soc/soc-ac97.c
··· 48 48 } 49 49 50 50 /** 51 - * snd_soc_new_ac97_codec - initailise AC97 device 52 - * @codec: audio codec 51 + * snd_soc_alloc_ac97_codec() - Allocate new a AC'97 device 52 + * @codec: The CODEC for which to create the AC'97 device 53 53 * 54 - * Initialises AC97 codec resources for use by ad-hoc devices only. 54 + * Allocated a new snd_ac97 device and intializes it, but does not yet register 55 + * it. The caller is responsible to either call device_add(&ac97->dev) to 56 + * register the device, or to call put_device(&ac97->dev) to free the device. 57 + * 58 + * Returns: A snd_ac97 device or a PTR_ERR in case of an error. 55 59 */ 56 - struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) 60 + struct snd_ac97 *snd_soc_alloc_ac97_codec(struct snd_soc_codec *codec) 57 61 { 58 62 struct snd_ac97 *ac97; 59 - int ret; 60 63 61 64 ac97 = kzalloc(sizeof(struct snd_ac97), GFP_KERNEL); 62 65 if (ac97 == NULL) ··· 76 73 codec->component.card->snd_card->number, 0, 77 74 codec->component.name); 78 75 79 - ret = device_register(&ac97->dev); 76 + device_initialize(&ac97->dev); 77 + 78 + return ac97; 79 + } 80 + EXPORT_SYMBOL(snd_soc_alloc_ac97_codec); 81 + 82 + /** 83 + * snd_soc_new_ac97_codec - initailise AC97 device 84 + * @codec: audio codec 85 + * 86 + * Initialises AC97 codec resources for use by ad-hoc devices only. 87 + */ 88 + struct snd_ac97 *snd_soc_new_ac97_codec(struct snd_soc_codec *codec) 89 + { 90 + struct snd_ac97 *ac97; 91 + int ret; 92 + 93 + ac97 = snd_soc_alloc_ac97_codec(codec); 94 + if (IS_ERR(ac97)) 95 + return ac97; 96 + 97 + ret = device_add(&ac97->dev); 80 98 if (ret) { 81 99 put_device(&ac97->dev); 82 100 return ERR_PTR(ret);