mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
sound fixes for 4.3-rc3
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. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWBTxTAAoJEGwxgFQ9KSmkzroQAIQNPQd3EFlVOQzRKTu6qFe4 MiCOwHdc8GHTS2ZmXrFiL9gOn8MzMCUjVLaxxK9oVCdM6maC/IpbQz7mFQKXyqRW KkmVop/V0LNV4elw6RhDYYlDSwjP8vgD3MjJc8y3Hr8cpydrEUDDNFrdvpDBp5rE Tj9r2CxJBc2l06GteRiwjTZl0IjfLr9lseJiwtNHohmNJeDgVGHK3GOxOxiUxHgd VpdCG3VuzIdqNi1+Dp0PjFqHdw2aAgzaMbJL57X7nIktQwDM8bwM74cZMd4ykJIZ aIY8SrMuLMdu2yD80EqVLej3vy+fEAJovhA4GRA3bFfqBrrQtteNMMdJ01kqkZSI cQhjlJ3G7xwcF/88CzNI7eoyn5f5USl78NuCQvxvU2cqhuWeog/t0jgQcVCJBZFh Z+2QGlg/dg1EZ5WujQ8eETDAI9FYz0g56Q4N/reKtjCHjs8RRcfZXchn/J8ZvQQ0 E2bRwazdZzeS3m4xzVka9Y1B3ei2F8CXJ9g1iQNPzkurHy4MStIuygp6ICIpvLlw RX/0c14p60TTz2SKXCNEwfcaW6F9pHqzmh4tEZXqq4LNgXgp17y7MNv/T+1yw/KW X8O7M40GAoUIH77Rr3UGayuCE38eNrggaox3BJvtyFtSy7RR7HS7TKSxzlNtkUCK 5tN2uTta3YoA14OJUix9 =cdb6 -----END PGP SIGNATURE----- Merge tag 'sound-4.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/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 ...
This commit is contained in:
commit
ddff42e592
21 changed files with 166 additions and 92 deletions
|
@ -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
|
||||
|
@ -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*
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
},
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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),
|
||||
};
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -663,7 +663,7 @@ static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
|
|||
u8 rx_ser = 0;
|
||||
u8 slots = mcasp->tdm_slots;
|
||||
u8 max_active_serializers = (channels + slots - 1) / slots;
|
||||
int active_serializers, numevt, n;
|
||||
int active_serializers, numevt;
|
||||
u32 reg;
|
||||
/* Default configuration */
|
||||
if (mcasp->version < MCASP_VERSION_3)
|
||||
|
@ -745,9 +745,8 @@ static int mcasp_common_hw_param(struct davinci_mcasp *mcasp, int stream,
|
|||
* The number of words for numevt need to be in steps of active
|
||||
* serializers.
|
||||
*/
|
||||
n = numevt % active_serializers;
|
||||
if (n)
|
||||
numevt += (active_serializers - n);
|
||||
numevt = (numevt / active_serializers) * active_serializers;
|
||||
|
||||
while (period_words % numevt && numevt > 0)
|
||||
numevt -= active_serializers;
|
||||
if (numevt <= 0)
|
||||
|
@ -1299,6 +1298,7 @@ static struct snd_soc_dai_driver davinci_mcasp_dai[] = {
|
|||
.ops = &davinci_mcasp_dai_ops,
|
||||
|
||||
.symmetric_samplebits = 1,
|
||||
.symmetric_rates = 1,
|
||||
},
|
||||
{
|
||||
.name = "davinci-mcasp.1",
|
||||
|
@ -1685,7 +1685,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
|||
|
||||
irq = platform_get_irq_byname(pdev, "common");
|
||||
if (irq >= 0) {
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common\n",
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_common",
|
||||
dev_name(&pdev->dev));
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||
davinci_mcasp_common_irq_handler,
|
||||
|
@ -1702,7 +1702,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
|||
|
||||
irq = platform_get_irq_byname(pdev, "rx");
|
||||
if (irq >= 0) {
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx\n",
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_rx",
|
||||
dev_name(&pdev->dev));
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||
davinci_mcasp_rx_irq_handler,
|
||||
|
@ -1717,7 +1717,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
|
|||
|
||||
irq = platform_get_irq_byname(pdev, "tx");
|
||||
if (irq >= 0) {
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx\n",
|
||||
irq_name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%s_tx",
|
||||
dev_name(&pdev->dev));
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
|
||||
davinci_mcasp_tx_irq_handler,
|
||||
|
|
|
@ -488,7 +488,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
|
|||
priv->dai_fmt |= SND_SOC_DAIFMT_CBM_CFM;
|
||||
} else {
|
||||
dev_err(&pdev->dev, "unknown Device Tree compatible\n");
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
goto asrc_fail;
|
||||
}
|
||||
|
||||
/* Common settings for corresponding Freescale CPU DAI driver */
|
||||
|
|
|
@ -249,7 +249,8 @@ MODULE_DEVICE_TABLE(of, fsl_ssi_ids);
|
|||
|
||||
static bool fsl_ssi_is_ac97(struct fsl_ssi_private *ssi_private)
|
||||
{
|
||||
return !!(ssi_private->dai_fmt & SND_SOC_DAIFMT_AC97);
|
||||
return (ssi_private->dai_fmt & SND_SOC_DAIFMT_FORMAT_MASK) ==
|
||||
SND_SOC_DAIFMT_AC97;
|
||||
}
|
||||
|
||||
static bool fsl_ssi_is_i2s_master(struct fsl_ssi_private *ssi_private)
|
||||
|
@ -947,7 +948,7 @@ static int _fsl_ssi_set_dai_fmt(struct device *dev,
|
|||
CCSR_SSI_SCR_TCH_EN);
|
||||
}
|
||||
|
||||
if (fmt & SND_SOC_DAIFMT_AC97)
|
||||
if ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_AC97)
|
||||
fsl_ssi_setup_ac97(ssi_private);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -302,6 +302,10 @@ struct sst_hsw {
|
|||
struct sst_hsw_ipc_dx_reply dx;
|
||||
void *dx_context;
|
||||
dma_addr_t dx_context_paddr;
|
||||
enum sst_hsw_device_id dx_dev;
|
||||
enum sst_hsw_device_mclk dx_mclk;
|
||||
enum sst_hsw_device_mode dx_mode;
|
||||
u32 dx_clock_divider;
|
||||
|
||||
/* boot */
|
||||
wait_queue_head_t boot_wait;
|
||||
|
@ -1400,10 +1404,10 @@ int sst_hsw_device_set_config(struct sst_hsw *hsw,
|
|||
|
||||
trace_ipc_request("set device config", dev);
|
||||
|
||||
config.ssp_interface = dev;
|
||||
config.clock_frequency = mclk;
|
||||
config.mode = mode;
|
||||
config.clock_divider = clock_divider;
|
||||
hsw->dx_dev = config.ssp_interface = dev;
|
||||
hsw->dx_mclk = config.clock_frequency = mclk;
|
||||
hsw->dx_mode = config.mode = mode;
|
||||
hsw->dx_clock_divider = config.clock_divider = clock_divider;
|
||||
if (mode == SST_HSW_DEVICE_TDM_CLOCK_MASTER)
|
||||
config.channels = 4;
|
||||
else
|
||||
|
@ -1704,10 +1708,10 @@ int sst_hsw_dsp_runtime_resume(struct sst_hsw *hsw)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
/* Set ADSP SSP port settings */
|
||||
ret = sst_hsw_device_set_config(hsw, SST_HSW_DEVICE_SSP_0,
|
||||
SST_HSW_DEVICE_MCLK_FREQ_24_MHZ,
|
||||
SST_HSW_DEVICE_CLOCK_MASTER, 9);
|
||||
/* Set ADSP SSP port settings - sadly the FW does not store SSP port
|
||||
settings as part of the PM context. */
|
||||
ret = sst_hsw_device_set_config(hsw, hsw->dx_dev, hsw->dx_mclk,
|
||||
hsw->dx_mode, hsw->dx_clock_divider);
|
||||
if (ret < 0)
|
||||
dev_err(dev, "error: SSP re-initialization failed\n");
|
||||
|
||||
|
|
|
@ -549,6 +549,23 @@ static int mtk_afe_dais_startup(struct snd_pcm_substream *substream,
|
|||
memif->substream = substream;
|
||||
|
||||
snd_soc_set_runtime_hwparams(substream, &mtk_afe_hardware);
|
||||
|
||||
/*
|
||||
* Capture cannot use ping-pong buffer since hw_ptr at IRQ may be
|
||||
* smaller than period_size due to AFE's internal buffer.
|
||||
* This easily leads to overrun when avail_min is period_size.
|
||||
* One more period can hold the possible unread buffer.
|
||||
*/
|
||||
if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
|
||||
ret = snd_pcm_hw_constraint_minmax(runtime,
|
||||
SNDRV_PCM_HW_PARAM_PERIODS,
|
||||
3,
|
||||
mtk_afe_hardware.periods_max);
|
||||
if (ret < 0) {
|
||||
dev_err(afe->dev, "hw_constraint_minmax failed\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
ret = snd_pcm_hw_constraint_integer(runtime,
|
||||
SNDRV_PCM_HW_PARAM_PERIODS);
|
||||
if (ret < 0)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
config SND_PXA2XX_SOC
|
||||
tristate "SoC Audio for the Intel PXA2xx chip"
|
||||
depends on ARCH_PXA
|
||||
select SND_ARM
|
||||
select SND_PXA2XX_LIB
|
||||
help
|
||||
Say Y or M if you want to add support for codecs attached to
|
||||
|
@ -25,7 +24,6 @@ config SND_PXA2XX_AC97
|
|||
config SND_PXA2XX_SOC_AC97
|
||||
tristate
|
||||
select AC97_BUS
|
||||
select SND_ARM
|
||||
select SND_PXA2XX_LIB_AC97
|
||||
select SND_SOC_AC97_BUS
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ static struct snd_ac97_bus_ops pxa2xx_ac97_ops = {
|
|||
.reset = pxa2xx_ac97_cold_reset,
|
||||
};
|
||||
|
||||
static unsigned long pxa2xx_ac97_pcm_stereo_in_req = 12;
|
||||
static unsigned long pxa2xx_ac97_pcm_stereo_in_req = 11;
|
||||
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = {
|
||||
.addr = __PREG(PCDR),
|
||||
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
|
||||
|
@ -57,7 +57,7 @@ static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_in = {
|
|||
.filter_data = &pxa2xx_ac97_pcm_stereo_in_req,
|
||||
};
|
||||
|
||||
static unsigned long pxa2xx_ac97_pcm_stereo_out_req = 11;
|
||||
static unsigned long pxa2xx_ac97_pcm_stereo_out_req = 12;
|
||||
static struct snd_dmaengine_dai_dma_data pxa2xx_ac97_pcm_stereo_out = {
|
||||
.addr = __PREG(PCDR),
|
||||
.addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES,
|
||||
|
|
|
@ -3501,7 +3501,7 @@ static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
|
|||
|
||||
default:
|
||||
WARN(1, "Unknown event %d\n", event);
|
||||
return -EINVAL;
|
||||
ret = -EINVAL;
|
||||
}
|
||||
|
||||
out:
|
||||
|
|
|
@ -101,6 +101,15 @@ static struct snd_soc_codec_driver dummy_codec;
|
|||
SNDRV_PCM_FMTBIT_S32_LE | \
|
||||
SNDRV_PCM_FMTBIT_U32_LE | \
|
||||
SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)
|
||||
/*
|
||||
* The dummy CODEC is only meant to be used in situations where there is no
|
||||
* actual hardware.
|
||||
*
|
||||
* If there is actual hardware even if it does not have a control bus
|
||||
* the hardware will still have constraints like supported samplerates, etc.
|
||||
* which should be modelled. And the data flow graph also should be modelled
|
||||
* using DAPM.
|
||||
*/
|
||||
static struct snd_soc_dai_driver dummy_dai = {
|
||||
.name = "snd-soc-dummy-dai",
|
||||
.playback = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
config SND_SPEAR_SOC
|
||||
tristate
|
||||
select SND_DMAENGINE_PCM
|
||||
select SND_SOC_GENERIC_DMAENGINE_PCM
|
||||
|
||||
config SND_SPEAR_SPDIF_OUT
|
||||
tristate
|
||||
|
|
|
@ -989,8 +989,8 @@ static int uni_player_parse_dt(struct platform_device *pdev,
|
|||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
of_property_read_u32(pnode, "version", &player->ver);
|
||||
if (player->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) {
|
||||
if (of_property_read_u32(pnode, "version", &player->ver) ||
|
||||
player->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) {
|
||||
dev_err(dev, "Unknown uniperipheral version ");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -998,10 +998,16 @@ static int uni_player_parse_dt(struct platform_device *pdev,
|
|||
if (player->ver >= SND_ST_UNIPERIF_VERSION_UNI_PLR_TOP_1_0)
|
||||
info->underflow_enabled = 1;
|
||||
|
||||
of_property_read_u32(pnode, "uniperiph-id", &info->id);
|
||||
if (of_property_read_u32(pnode, "uniperiph-id", &info->id)) {
|
||||
dev_err(dev, "uniperipheral id not defined");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Read the device mode property */
|
||||
of_property_read_string(pnode, "mode", &mode);
|
||||
if (of_property_read_string(pnode, "mode", &mode)) {
|
||||
dev_err(dev, "uniperipheral mode not defined");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (strcasecmp(mode, "hdmi") == 0)
|
||||
info->player_type = SND_ST_UNIPERIF_PLAYER_TYPE_HDMI;
|
||||
|
|
|
@ -316,7 +316,11 @@ static int uni_reader_parse_dt(struct platform_device *pdev,
|
|||
if (!info)
|
||||
return -ENOMEM;
|
||||
|
||||
of_property_read_u32(node, "version", &reader->ver);
|
||||
if (of_property_read_u32(node, "version", &reader->ver) ||
|
||||
reader->ver == SND_ST_UNIPERIF_VERSION_UNKNOWN) {
|
||||
dev_err(&pdev->dev, "Unknown uniperipheral version ");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Save the info structure */
|
||||
reader->info = info;
|
||||
|
|
Loading…
Reference in a new issue