Skip to content

Commit

Permalink
Merge tag 'sound-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This ended up with a larger set of fixes than wished, unfortunately.

  As diffstat shows, the majority of changes are for various ASoC
  drivers (Realtek, Wolfson codec drivers, etc), in addition to a couple
  of HD-audio regression fixes.  All these are reasonably small and
  nothing to scare much"

* tag 'sound-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits)
  ALSA: hda - Disable power_save_node for Thinkpads
  ALSA: hda/tegra - async probe for avoiding module loading deadlock
  ASoC: rt5645: Prevent the pop sound in case of playback and the jack is plugging
  ASoC: rt5645: Increase the delay time to remove the pop sound
  ASoC: rt5645: Use the type SOC_DAPM_SINGLE_AUTODISABLE to prevent the weird sound in runtime of power up
  ASoC: pxa: pxa2xx-ac97: fix dma requestor lines
  MAINTAINERS: Update website and git repo for Wolfson Microelectronics
  ASoC: fsl_ssi: Fix checking of dai format for AC97 mode
  ASoC: wm0010: fix error path
  ASoC: wm0010: fix memory leak
  ASoC: wm8960: correct the max register value of mic boost pga
  ASoC: wm8962: remove 64k sample rate support
  ASoC: davinci-mcasp: Fix devm_kasprintf format string
  ASoC: fix broken pxa SoC support
  ASoC: davinci-mcasp: Set .symmetric_rates = 1 in snd_soc_dai_driver
  ASoC: au1x: psc-i2s: Fix unused variable 'ret' warning
  ASoC: SPEAr: Make SND_SPEAR_SOC select SND_SOC_GENERIC_DMAENGINE_PCM
  ASoC: mediatek: Increase periods_min in capture
  ASoC: davinci-mcasp: Revise the FIFO threshold calculation
  ASoC: wm8960: correct gain value for input PGA and add microphone PGA
  ...
  • Loading branch information
Linus Torvalds committed Sep 25, 2015
2 parents 966966a + 7f57d80 commit ddff42e
Show file tree
Hide file tree
Showing 21 changed files with 166 additions and 92 deletions.
9 changes: 3 additions & 6 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -11249,7 +11249,6 @@ VOLTAGE AND CURRENT REGULATOR FRAMEWORK
M: Liam Girdwood <lgirdwood@gmail.com>
M: Mark Brown <broonie@kernel.org>
L: linux-kernel@vger.kernel.org
W: http://opensource.wolfsonmicro.com/node/15
W: http://www.slimlogic.co.uk/?p=48
T: git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
S: Supported
Expand Down Expand Up @@ -11378,17 +11377,15 @@ WM97XX TOUCHSCREEN DRIVERS
M: Mark Brown <broonie@kernel.org>
M: Liam Girdwood <lrg@slimlogic.co.uk>
L: linux-input@vger.kernel.org
T: git git://opensource.wolfsonmicro.com/linux-2.6-touch
W: http://opensource.wolfsonmicro.com/node/7
W: https://github.com/CirrusLogic/linux-drivers/wiki
S: Supported
F: drivers/input/touchscreen/*wm97*
F: include/linux/wm97xx.h

WOLFSON MICROELECTRONICS DRIVERS
L: patches@opensource.wolfsonmicro.com
T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc
T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
T: git https://github.com/CirrusLogic/linux-drivers.git
W: https://github.com/CirrusLogic/linux-drivers/wiki
S: Supported
F: Documentation/hwmon/wm83??
F: arch/arm/mach-s3c64xx/mach-crag6410*
Expand Down
15 changes: 8 additions & 7 deletions sound/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ menuconfig SND_ARM
Drivers that are implemented on ASoC can be found in
"ALSA for SoC audio support" section.

config SND_PXA2XX_LIB
tristate
select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97
select SND_DMAENGINE_PCM

config SND_PXA2XX_LIB_AC97
bool

if SND_ARM

config SND_ARMAACI
Expand All @@ -21,13 +29,6 @@ config SND_PXA2XX_PCM
tristate
select SND_PCM

config SND_PXA2XX_LIB
tristate
select SND_AC97_CODEC if SND_PXA2XX_LIB_AC97

config SND_PXA2XX_LIB_AC97
bool

config SND_PXA2XX_AC97
tristate "AC97 driver for the Intel PXA2xx chip"
depends on ARCH_PXA
Expand Down
30 changes: 25 additions & 5 deletions sound/pci/hda/hda_tegra.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ struct hda_tegra {
struct clk *hda2codec_2x_clk;
struct clk *hda2hdmi_clk;
void __iomem *regs;
struct work_struct probe_work;
};

#ifdef CONFIG_PM
Expand Down Expand Up @@ -294,7 +295,9 @@ static int hda_tegra_dev_disconnect(struct snd_device *device)
static int hda_tegra_dev_free(struct snd_device *device)
{
struct azx *chip = device->device_data;
struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);

cancel_work_sync(&hda->probe_work);
if (azx_bus(chip)->chip_init) {
azx_stop_all_streams(chip);
azx_stop_chip(chip);
Expand Down Expand Up @@ -426,6 +429,9 @@ static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev)
/*
* constructor
*/

static void hda_tegra_probe_work(struct work_struct *work);

static int hda_tegra_create(struct snd_card *card,
unsigned int driver_caps,
struct hda_tegra *hda)
Expand All @@ -452,6 +458,8 @@ static int hda_tegra_create(struct snd_card *card,
chip->single_cmd = false;
chip->snoop = true;

INIT_WORK(&hda->probe_work, hda_tegra_probe_work);

err = azx_bus_init(chip, NULL, &hda_tegra_io_ops);
if (err < 0)
return err;
Expand Down Expand Up @@ -499,6 +507,21 @@ static int hda_tegra_probe(struct platform_device *pdev)
card->private_data = chip;

dev_set_drvdata(&pdev->dev, card);
schedule_work(&hda->probe_work);

return 0;

out_free:
snd_card_free(card);
return err;
}

static void hda_tegra_probe_work(struct work_struct *work)
{
struct hda_tegra *hda = container_of(work, struct hda_tegra, probe_work);
struct azx *chip = &hda->chip;
struct platform_device *pdev = to_platform_device(hda->dev);
int err;

err = hda_tegra_first_init(chip, pdev);
if (err < 0)
Expand All @@ -520,11 +543,8 @@ static int hda_tegra_probe(struct platform_device *pdev)
chip->running = 1;
snd_hda_set_power_save(&chip->bus, power_save * 1000);

return 0;

out_free:
snd_card_free(card);
return err;
out_free:
return; /* no error return from async probe */
}

static int hda_tegra_remove(struct platform_device *pdev)
Expand Down
31 changes: 19 additions & 12 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -4188,6 +4188,24 @@ static void alc_fixup_disable_aamix(struct hda_codec *codec,
}
}

/* fixup for Thinkpad docks: add dock pins, avoid HP parser fixup */
static void alc_fixup_tpt440_dock(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
static const struct hda_pintbl pincfgs[] = {
{ 0x16, 0x21211010 }, /* dock headphone */
{ 0x19, 0x21a11010 }, /* dock mic */
{ }
};
struct alc_spec *spec = codec->spec;

if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->parse_flags = HDA_PINCFG_NO_HP_FIXUP;
codec->power_save_node = 0; /* avoid click noises */
snd_hda_apply_pincfgs(codec, pincfgs);
}
}

static void alc_shutup_dell_xps13(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
Expand Down Expand Up @@ -4562,7 +4580,6 @@ enum {
ALC255_FIXUP_HEADSET_MODE_NO_HP_MIC,
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE,
ALC292_FIXUP_TPT440_DOCK,
ALC292_FIXUP_TPT440_DOCK2,
ALC283_FIXUP_BXBT2807_MIC,
ALC255_FIXUP_DELL_WMI_MIC_MUTE_LED,
ALC282_FIXUP_ASPIRE_V5_PINS,
Expand Down Expand Up @@ -5029,17 +5046,7 @@ static const struct hda_fixup alc269_fixups[] = {
},
[ALC292_FIXUP_TPT440_DOCK] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc269_fixup_pincfg_no_hp_to_lineout,
.chained = true,
.chain_id = ALC292_FIXUP_TPT440_DOCK2
},
[ALC292_FIXUP_TPT440_DOCK2] = {
.type = HDA_FIXUP_PINS,
.v.pins = (const struct hda_pintbl[]) {
{ 0x16, 0x21211010 }, /* dock headphone */
{ 0x19, 0x21a11010 }, /* dock mic */
{ }
},
.v.func = alc_fixup_tpt440_dock,
.chained = true,
.chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST
},
Expand Down
1 change: 0 additions & 1 deletion sound/soc/au1x/psc-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev)
{
struct resource *iores, *dmares;
unsigned long sel;
int ret;
struct au1xpsc_audio_data *wd;

wd = devm_kzalloc(&pdev->dev, sizeof(struct au1xpsc_audio_data),
Expand Down
22 changes: 13 additions & 9 deletions sound/soc/codecs/rt5645.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,14 +732,14 @@ static const struct snd_kcontrol_new rt5645_mono_adc_r_mix[] = {
static const struct snd_kcontrol_new rt5645_dac_l_mix[] = {
SOC_DAPM_SINGLE("Stereo ADC Switch", RT5645_AD_DA_MIXER,
RT5645_M_ADCMIX_L_SFT, 1, 1),
SOC_DAPM_SINGLE("DAC1 Switch", RT5645_AD_DA_MIXER,
SOC_DAPM_SINGLE_AUTODISABLE("DAC1 Switch", RT5645_AD_DA_MIXER,
RT5645_M_DAC1_L_SFT, 1, 1),
};

static const struct snd_kcontrol_new rt5645_dac_r_mix[] = {
SOC_DAPM_SINGLE("Stereo ADC Switch", RT5645_AD_DA_MIXER,
RT5645_M_ADCMIX_R_SFT, 1, 1),
SOC_DAPM_SINGLE("DAC1 Switch", RT5645_AD_DA_MIXER,
SOC_DAPM_SINGLE_AUTODISABLE("DAC1 Switch", RT5645_AD_DA_MIXER,
RT5645_M_DAC1_R_SFT, 1, 1),
};

Expand Down Expand Up @@ -1381,7 +1381,7 @@ static void hp_amp_power(struct snd_soc_codec *codec, int on)
regmap_write(rt5645->regmap, RT5645_PR_BASE +
RT5645_MAMP_INT_REG2, 0xfc00);
snd_soc_write(codec, RT5645_DEPOP_M2, 0x1140);
mdelay(5);
msleep(40);
rt5645->hp_on = true;
} else {
/* depop parameters */
Expand Down Expand Up @@ -2829,13 +2829,12 @@ static int rt5645_jack_detect(struct snd_soc_codec *codec, int jack_insert)
snd_soc_dapm_sync(dapm);
rt5645->jack_type = SND_JACK_HEADPHONE;
}

snd_soc_update_bits(codec, RT5645_CHARGE_PUMP, 0x0300, 0x0200);
snd_soc_write(codec, RT5645_DEPOP_M1, 0x001d);
snd_soc_write(codec, RT5645_DEPOP_M1, 0x0001);
} else { /* jack out */
rt5645->jack_type = 0;

regmap_update_bits(rt5645->regmap, RT5645_HP_VOL,
RT5645_L_MUTE | RT5645_R_MUTE,
RT5645_L_MUTE | RT5645_R_MUTE);
regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL2,
RT5645_CBJ_MN_JD, RT5645_CBJ_MN_JD);
regmap_update_bits(rt5645->regmap, RT5645_IN1_CTRL1,
Expand Down Expand Up @@ -2880,8 +2879,6 @@ int rt5645_set_jack_detect(struct snd_soc_codec *codec,
rt5645->en_button_func = true;
regmap_update_bits(rt5645->regmap, RT5645_GPIO_CTRL1,
RT5645_GP1_PIN_IRQ, RT5645_GP1_PIN_IRQ);
regmap_update_bits(rt5645->regmap, RT5645_DEPOP_M1,
RT5645_HP_CB_MASK, RT5645_HP_CB_PU);
regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL1,
RT5645_DIG_GATE_CTRL, RT5645_DIG_GATE_CTRL);
}
Expand Down Expand Up @@ -3205,6 +3202,13 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "Celes"),
},
},
{
.ident = "Google Ultima",
.callback = strago_quirk_cb,
.matches = {
DMI_MATCH(DMI_PRODUCT_NAME, "Ultima"),
},
},
{ }
};

Expand Down
23 changes: 9 additions & 14 deletions sound/soc/codecs/wm0010.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)
struct wm0010_priv *wm0010 = snd_soc_codec_get_drvdata(codec);
unsigned long flags;
int ret;
const struct firmware *fw;
struct spi_message m;
struct spi_transfer t;
struct dfw_pllrec pll_rec;
Expand Down Expand Up @@ -623,14 +622,6 @@ static int wm0010_boot(struct snd_soc_codec *codec)
wm0010->state = WM0010_OUT_OF_RESET;
spin_unlock_irqrestore(&wm0010->irq_lock, flags);

/* First the bootloader */
ret = request_firmware(&fw, "wm0010_stage2.bin", codec->dev);
if (ret != 0) {
dev_err(codec->dev, "Failed to request stage2 loader: %d\n",
ret);
goto abort;
}

if (!wait_for_completion_timeout(&wm0010->boot_completion,
msecs_to_jiffies(20)))
dev_err(codec->dev, "Failed to get interrupt from DSP\n");
Expand Down Expand Up @@ -673,7 +664,7 @@ static int wm0010_boot(struct snd_soc_codec *codec)

img_swap = kzalloc(len, GFP_KERNEL | GFP_DMA);
if (!img_swap)
goto abort;
goto abort_out;

/* We need to re-order for 0010 */
byte_swap_64((u64 *)&pll_rec, img_swap, len);
Expand All @@ -688,16 +679,16 @@ static int wm0010_boot(struct snd_soc_codec *codec)
spi_message_add_tail(&t, &m);

ret = spi_sync(spi, &m);
if (ret != 0) {
if (ret) {
dev_err(codec->dev, "First PLL write failed: %d\n", ret);
goto abort;
goto abort_swap;
}

/* Use a second send of the message to get the return status */
ret = spi_sync(spi, &m);
if (ret != 0) {
if (ret) {
dev_err(codec->dev, "Second PLL write failed: %d\n", ret);
goto abort;
goto abort_swap;
}

p = (u32 *)out;
Expand Down Expand Up @@ -730,6 +721,10 @@ static int wm0010_boot(struct snd_soc_codec *codec)

return 0;

abort_swap:
kfree(img_swap);
abort_out:
kfree(out);
abort:
/* Put the chip back into reset */
wm0010_halt(codec);
Expand Down
26 changes: 18 additions & 8 deletions sound/soc/codecs/wm8960.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,28 +211,38 @@ static int wm8960_put_deemph(struct snd_kcontrol *kcontrol,
return wm8960_set_deemph(codec);
}

static const DECLARE_TLV_DB_SCALE(adc_tlv, -9700, 50, 0);
static const DECLARE_TLV_DB_SCALE(dac_tlv, -12700, 50, 1);
static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1);
static const DECLARE_TLV_DB_SCALE(inpga_tlv, -1725, 75, 0);
static const DECLARE_TLV_DB_SCALE(dac_tlv, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(bypass_tlv, -2100, 300, 0);
static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
static const DECLARE_TLV_DB_SCALE(boost_tlv, -1200, 300, 1);
static const DECLARE_TLV_DB_SCALE(lineinboost_tlv, -1500, 300, 1);
static const unsigned int micboost_tlv[] = {
TLV_DB_RANGE_HEAD(2),
0, 1, TLV_DB_SCALE_ITEM(0, 1300, 0),
2, 3, TLV_DB_SCALE_ITEM(2000, 900, 0),
};

static const struct snd_kcontrol_new wm8960_snd_controls[] = {
SOC_DOUBLE_R_TLV("Capture Volume", WM8960_LINVOL, WM8960_RINVOL,
0, 63, 0, adc_tlv),
0, 63, 0, inpga_tlv),
SOC_DOUBLE_R("Capture Volume ZC Switch", WM8960_LINVOL, WM8960_RINVOL,
6, 1, 0),
SOC_DOUBLE_R("Capture Switch", WM8960_LINVOL, WM8960_RINVOL,
7, 1, 0),

SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT3 Volume",
WM8960_INBMIX1, 4, 7, 0, boost_tlv),
WM8960_INBMIX1, 4, 7, 0, lineinboost_tlv),
SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT2 Volume",
WM8960_INBMIX1, 1, 7, 0, boost_tlv),
WM8960_INBMIX1, 1, 7, 0, lineinboost_tlv),
SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT3 Volume",
WM8960_INBMIX2, 4, 7, 0, boost_tlv),
WM8960_INBMIX2, 4, 7, 0, lineinboost_tlv),
SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT2 Volume",
WM8960_INBMIX2, 1, 7, 0, boost_tlv),
WM8960_INBMIX2, 1, 7, 0, lineinboost_tlv),
SOC_SINGLE_TLV("Right Input Boost Mixer RINPUT1 Volume",
WM8960_RINPATH, 4, 3, 0, micboost_tlv),
SOC_SINGLE_TLV("Left Input Boost Mixer LINPUT1 Volume",
WM8960_LINPATH, 4, 3, 0, micboost_tlv),

SOC_DOUBLE_R_TLV("Playback Volume", WM8960_LDAC, WM8960_RDAC,
0, 255, 0, dac_tlv),
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,8 @@ static int wm8962_mute(struct snd_soc_dai *dai, int mute)
WM8962_DAC_MUTE, val);
}

#define WM8962_RATES SNDRV_PCM_RATE_8000_96000
#define WM8962_RATES (SNDRV_PCM_RATE_8000_48000 |\
SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000)

#define WM8962_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
Expand Down
Loading

0 comments on commit ddff42e

Please sign in to comment.