From d3d3835ce919438c00c5d1270d6f9d6ffea59d03 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 19 Aug 2013 20:05:50 +0200 Subject: ALSA: hda - Add inverted digital mic fixup for Acer Aspire One Yet another entry, just use the existing fixup for this machine, too. Reported-by: "Nathanael D. Noblet" Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index f303cd89851..389db4c2801 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4336,6 +4336,7 @@ static const struct hda_fixup alc662_fixups[] = { static const struct snd_pci_quirk alc662_fixup_tbl[] = { SND_PCI_QUIRK(0x1019, 0x9087, "ECS", ALC662_FIXUP_ASUS_MODE2), + SND_PCI_QUIRK(0x1025, 0x022f, "Acer Aspire One", ALC662_FIXUP_INV_DMIC), SND_PCI_QUIRK(0x1025, 0x0308, "Acer Aspire 8942G", ALC662_FIXUP_ASPIRE), SND_PCI_QUIRK(0x1025, 0x031c, "Gateway NV79", ALC662_FIXUP_SKU_IGNORE), SND_PCI_QUIRK(0x1025, 0x0349, "eMachines eM250", ALC662_FIXUP_INV_DMIC), -- cgit v1.2.3 From 2ca320e294a738c9134a71b5029de05edbfc7aad Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 22 Aug 2013 09:55:36 +0200 Subject: ALSA: hda - Fix NULL dereference with CONFIG_SND_DYNAMIC_MINORS=n Without the dynamic minor assignment, HDMI codec may have less PCM instances than the number of pins, which eventually leads to Oops. Reported-by: Stratos Karafotis Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/patch_hdmi.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound') diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 030ca8652a1..9f358627687 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -1781,6 +1781,9 @@ static int generic_hdmi_build_controls(struct hda_codec *codec) struct snd_pcm_chmap *chmap; struct snd_kcontrol *kctl; int i; + + if (!codec->pcm_info[pin_idx].pcm) + break; err = snd_pcm_add_chmap_ctls(codec->pcm_info[pin_idx].pcm, SNDRV_PCM_STREAM_PLAYBACK, NULL, 0, pin_idx, &chmap); -- cgit v1.2.3 From fb615499f0ad28ed74201c1cdfddf9e64e205424 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 27 Aug 2013 12:03:01 +0200 Subject: ALSA: opti9xx: Fix conflicting driver object name The recent commit to delay the release of kobject triggered NULL dereferences of opti9xx drivers. The cause is that all snd-opti92x-ad1848, snd-opti92x-cs4231 and snd-opti93x drivers register the PnP card driver with the very same name, and also snd-opti92x-ad1848 and -cs4231 drivers register the ISA driver with the same name, too. When these drivers are built in, quick "register-release-and-re-register" actions occur, and this results in Oops because of the same name is assigned to the kobject. The fix is simply to assign individual names. As a bonus, by using KBUILD_MODNAME, the patch reduces more lines than it adds. The fix is based on the suggestion by Russell King. Reported-and-tested-by: Fengguang Wu Cc: Signed-off-by: Takashi Iwai --- sound/isa/opti9xx/opti92x-ad1848.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sound') diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 103b33373fd..6effe99bbb9 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -173,11 +173,7 @@ MODULE_DEVICE_TABLE(pnp_card, snd_opti9xx_pnpids); #endif /* CONFIG_PNP */ -#ifdef OPTi93X -#define DEV_NAME "opti93x" -#else -#define DEV_NAME "opti92x" -#endif +#define DEV_NAME KBUILD_MODNAME static char * snd_opti9xx_names[] = { "unknown", @@ -1167,7 +1163,7 @@ static int snd_opti9xx_pnp_resume(struct pnp_card_link *pcard) static struct pnp_card_driver opti9xx_pnpc_driver = { .flags = PNP_DRIVER_RES_DISABLE, - .name = "opti9xx", + .name = DEV_NAME, .id_table = snd_opti9xx_pnpids, .probe = snd_opti9xx_pnp_probe, .remove = snd_opti9xx_pnp_remove, -- cgit v1.2.3 From bae35992afc7ca2f446108b16670d76de0624e7a Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 3 Sep 2013 15:14:12 -0300 Subject: ASoC: fsl: imx-audmux: Do not call imx_audmux_parse_dt_defaults() on non-dt kernel Booting a mx51babbage board with a non-dt kernel leads to the following crash: Unable to handle kernel NULL pointer dereference at virtual address 0000001c pgd = 80004000 [0000001c] *pgd=00000000 Internal error: Oops: 5 [#1] SMP ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.11.0-next-20130903 #287 task: 9f860000 ti: 9f862000 task.ti: 9f862000 PC is at of_get_next_available_child+0x5c/0x68 LR is at of_get_next_available_child+0x1c/0x68 pc : [<8043ea58>] lr : [<8043ea18>] psr: 60000193 sp : 9f863d58 ip : 00000000 fp : 9f863d74 r10: 9f89a010 r9 : 9f862000 r8 : 807bb26c r7 : 80615d5c r6 : 00000000 r5 : 60000113 r4 : 00000000 r3 : 00000000 r2 : 808770a4 r1 : 00000011 r0 : 60000113 Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c5387d Table: 90004019 DAC: 00000017 Process swapper/0 (pid: 1, stack limit = 0x9f862240) Stack: (0x9f863d58 to 0x9f864000) This is caused by commit 8548a464b9 (ASoC: imx-audmux: Read default configuration from devicetree). In order to fix this, add a check for 'of_id' so that imx_audmux_parse_dt_defaults() only gets called when a dt kernel is running. Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- sound/soc/fsl/imx-audmux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c index ab17381cc98..d3bf71a0ec5 100644 --- a/sound/soc/fsl/imx-audmux.c +++ b/sound/soc/fsl/imx-audmux.c @@ -335,7 +335,8 @@ static int imx_audmux_probe(struct platform_device *pdev) if (audmux_type == IMX31_AUDMUX) audmux_debugfs_init(); - imx_audmux_parse_dt_defaults(pdev, pdev->dev.of_node); + if (of_id) + imx_audmux_parse_dt_defaults(pdev, pdev->dev.of_node); return 0; } -- cgit v1.2.3 From e011143454606de70eba1db5d99454eec0017fdb Mon Sep 17 00:00:00 2001 From: Bo Shen Date: Wed, 4 Sep 2013 15:27:46 +0800 Subject: ASoC: atmel: disable error interrupt As once the error interrupt is triggered, it can not be cleared. So, disable it. No side effect found while testing on sama5d3xek and at91sam9x5ek boards. Signed-off-by: Bo Shen Acked-by: Nicolas Ferre Signed-off-by: Mark Brown --- sound/soc/atmel/atmel_ssc_dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/atmel/atmel_ssc_dai.c b/sound/soc/atmel/atmel_ssc_dai.c index 0ecf356027f..bb53dea85b1 100644 --- a/sound/soc/atmel/atmel_ssc_dai.c +++ b/sound/soc/atmel/atmel_ssc_dai.c @@ -649,7 +649,7 @@ static int atmel_ssc_prepare(struct snd_pcm_substream *substream, dma_params = ssc_p->dma_params[dir]; ssc_writel(ssc_p->ssc->regs, CR, dma_params->mask->ssc_enable); - ssc_writel(ssc_p->ssc->regs, IER, dma_params->mask->ssc_error); + ssc_writel(ssc_p->ssc->regs, IDR, dma_params->mask->ssc_error); pr_debug("%s enabled SSC_SR=0x%08x\n", dir ? "receive" : "transmit", -- cgit v1.2.3 From d098b2f0cf6280f2b7b0415b48921385fdc1861f Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Thu, 5 Sep 2013 14:56:31 +0200 Subject: ASoC: kirkwood: change the compatible string of the kirkwood-i2s driver The compatible string of the kirkwood-i2s driver was chosen as "marvell,mvebu-audio". Using such a compatible string is not a good idea, since "mvebu" is the name of a large family of SOCs, in which new, unknown SOCs will be coming in the future. It is therefore impossible to know what will be evolutions of this hardware block in the next generations of the SOCs. For this reason, the recommandation for compatible strings of on-SOCs devices has always been to use the name of the oldest SOC that has the hardware block. New SOCs that have an exactly compatible hardware block can reference it using the same compatible string. See [1], [2] and [3] for various cases were this suggestion was made, including from Rob Herring, a Device Tree binding maintainer. As an example, there are already small differences between current generations: * On Kirkwood, only one interrupt is used for audio. * On Dove, two interrupts are used, one for audio data and one for error reporting. In the near future, I'll be adding audio support to Armada 370, which allows has the same hardware block (but maybe with minor variants). Therefore, this patch changes the driver to accept "marvell,kirkwood-audio" and "marvell,dove-audio" as compatible strings instead of the too-generic "marvell,mvebu-audio". The reason for the two different compatible strings is the difference in the number of interrupts used by the two SOCs for audio. This Device Tree binding has never been part of a Linux kernel stable release so far, so it can be changed now without breaking backward compatibility. [1] http://lists.infradead.org/pipermail/linux-mtd/2012-March/040417.html [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2013-April/161065.html [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-March/087702.html Signed-off-by: Thomas Petazzoni Signed-off-by: Mark Brown --- sound/soc/kirkwood/kirkwood-i2s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c index 7fce340ab3e..0f3d73d4ef4 100644 --- a/sound/soc/kirkwood/kirkwood-i2s.c +++ b/sound/soc/kirkwood/kirkwood-i2s.c @@ -559,7 +559,8 @@ static int kirkwood_i2s_dev_remove(struct platform_device *pdev) #ifdef CONFIG_OF static struct of_device_id mvebu_audio_of_match[] = { - { .compatible = "marvell,mvebu-audio" }, + { .compatible = "marvell,kirkwood-audio" }, + { .compatible = "marvell,dove-audio" }, { } }; MODULE_DEVICE_TABLE(of, mvebu_audio_of_match); -- cgit v1.2.3 From 4345adf92db760ca1a54061ce284aaa2e7d0791e Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sun, 8 Sep 2013 17:20:37 +0100 Subject: ASoC: fsl_spdif: Select regmap-mmio The S/PDIF driver needs regmap so select it to make sure it gets included in the build. Reported-by: Fengguang Wu Acked-by: Nicolin Chen Signed-off-by: Mark Brown --- sound/soc/fsl/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'sound') diff --git a/sound/soc/fsl/Kconfig b/sound/soc/fsl/Kconfig index 704e246f5b1..b7ab71f2ccc 100644 --- a/sound/soc/fsl/Kconfig +++ b/sound/soc/fsl/Kconfig @@ -198,6 +198,7 @@ config SND_SOC_IMX_SPDIF select SND_SOC_IMX_PCM_DMA select SND_SOC_FSL_SPDIF select SND_SOC_SPDIF + select REGMAP_MMIO help SoC Audio support for i.MX boards with S/PDIF Say Y if you want to add support for SoC audio on an i.MX board with -- cgit v1.2.3 From 34e4447515a18e0602f6df1a08b6a6ea63dea14b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Sun, 8 Sep 2013 21:21:41 -0700 Subject: ASoC: rsnd: fixup flag name of rsnd_scu_platform_info it should be *USE*, not *USB* Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sh/rcar/scu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound') diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c index 184d9008cec..2df2e9150b8 100644 --- a/sound/soc/sh/rcar/scu.c +++ b/sound/soc/sh/rcar/scu.c @@ -157,9 +157,9 @@ static int rsnd_scu_start(struct rsnd_mod *mod, int ret; /* - * SCU will be used if it has RSND_SCU_USB_HPBIF flags + * SCU will be used if it has RSND_SCU_USE_HPBIF flags */ - if (!(flags & RSND_SCU_USB_HPBIF)) { + if (!(flags & RSND_SCU_USE_HPBIF)) { /* it use PIO transter */ dev_dbg(dev, "%s%d is not used\n", rsnd_mod_name(mod), rsnd_mod_id(mod)); -- cgit v1.2.3 From 9f6f0afbb9fdabf6dcac642dfec457f28981e3f8 Mon Sep 17 00:00:00 2001 From: Steffen Trumtrar Date: Mon, 9 Sep 2013 18:09:12 +0200 Subject: ASoC: mc13783: add spi errata fix The MC13783 Chip Errata, Rev. 4 says, that depending on SPI clock and main audio clock speed, the Audio Codec or Stereo DAC do sometimes not start when programmed to do so. This is due to an internal clock timing issue related to the loading of the SPI bits into the audio block. On an i.MX27 based system, this issue lead to switched audio channels under certain circumstances: RTC + Touch + Audio are used and loaded at startup. The mentioned workaround of writing registers 40 and 41 two times is implemented here. Signed-off-by: Steffen Trumtrar Cc: stable@vger.kernel.org Signed-off-by: Mark Brown --- sound/soc/codecs/mc13783.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sound') diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c index 4d3c8fd8c5d..ea141e1d6f2 100644 --- a/sound/soc/codecs/mc13783.c +++ b/sound/soc/codecs/mc13783.c @@ -125,6 +125,10 @@ static int mc13783_write(struct snd_soc_codec *codec, ret = mc13xxx_reg_write(priv->mc13xxx, reg, value); + /* include errata fix for spi audio problems */ + if (reg == MC13783_AUDIO_CODEC || reg == MC13783_AUDIO_DAC) + ret = mc13xxx_reg_write(priv->mc13xxx, reg, value); + mc13xxx_unlock(priv->mc13xxx); return ret; -- cgit v1.2.3