Commit Graph

20236 Commits

Author SHA1 Message Date
Kevin Strasser de5f644e3c ASoC: Intel: fix possible acpi enumeration panic
A crash can occur on some platforms where adsp is enumerated but codec is not
matched. Define codec_id as a pointer intead of an array so that it gets
initialized to NULL for the terminating element of sst_acpi_bytcr[] and
sst_acpi_chv[].

Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-16 11:52:09 +00:00
Wei Yongjun f5d40b400f ASoC: Intel: fix return value check in sst_acpi_probe()
In case of error, the function platform_device_register_data()
returns ERR_PTR() and never returns NULL. The NULL test in the
return value check should be replaced with IS_ERR().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-15 18:21:40 +00:00
Mark Brown 1810afd3e1 Merge remote-tracking branches 'asoc/topic/wm9090', 'asoc/topic/wm9712' and 'asoc/topic/wm9713' into asoc-next 2014-12-08 13:12:36 +00:00
Mark Brown f234833cad Merge remote-tracking branches 'asoc/topic/wm8991', 'asoc/topic/wm8993', 'asoc/topic/wm8994', 'asoc/topic/wm8995' and 'asoc/topic/wm9081' into asoc-next 2014-12-08 13:12:34 +00:00
Mark Brown e45f607151 Merge remote-tracking branches 'asoc/topic/wm8978', 'asoc/topic/wm8983', 'asoc/topic/wm8985', 'asoc/topic/wm8988' and 'asoc/topic/wm8990' into asoc-next 2014-12-08 13:12:32 +00:00
Mark Brown 67a3adab9d Merge remote-tracking branches 'asoc/topic/wm8955', 'asoc/topic/wm8960', 'asoc/topic/wm8961', 'asoc/topic/wm8962' and 'asoc/topic/wm8974' into asoc-next 2014-12-08 13:12:30 +00:00
Mark Brown 7bff3b60fb Merge remote-tracking branches 'asoc/topic/wm8776', 'asoc/topic/wm8804', 'asoc/topic/wm8900', 'asoc/topic/wm8903' and 'asoc/topic/wm8940' into asoc-next 2014-12-08 13:12:28 +00:00
Mark Brown d7e05f93bf Merge remote-tracking branches 'asoc/topic/wm8711', 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8737' and 'asoc/topic/wm8750' into asoc-next 2014-12-08 13:12:25 +00:00
Mark Brown 4ddc81c740 Merge remote-tracking branches 'asoc/topic/wm8350', 'asoc/topic/wm8400', 'asoc/topic/wm8510', 'asoc/topic/wm8523' and 'asoc/topic/wm8580' into asoc-next 2014-12-08 13:12:23 +00:00
Mark Brown 45cbdda46b Merge remote-tracking branches 'asoc/topic/twl6040', 'asoc/topic/uda134x', 'asoc/topic/uda1380' and 'asoc/topic/wl1273' into asoc-next 2014-12-08 13:12:21 +00:00
Mark Brown 6353a4ab42 Merge remote-tracking branches 'asoc/topic/tlv320aic32x4', 'asoc/topic/tlv320aic3x', 'asoc/topic/tlv320dac33', 'asoc/topic/ts3a227e' and 'asoc/topic/twl4030' into asoc-next 2014-12-08 13:12:19 +00:00
Mark Brown 37850831ab Merge remote-tracking branches 'asoc/topic/tas2552', 'asoc/topic/tegra', 'asoc/topic/tfa9879', 'asoc/topic/tlv320aic23' and 'asoc/topic/tlv320aic31xx' into asoc-next 2014-12-08 13:12:16 +00:00
Mark Brown cabad44183 Merge remote-tracking branches 'asoc/topic/ssm4567', 'asoc/topic/sta32x', 'asoc/topic/sta350', 'asoc/topic/sta529' and 'asoc/topic/stac9766' into asoc-next 2014-12-08 13:12:14 +00:00
Mark Brown 631657c61d Merge remote-tracking branches 'asoc/topic/sh', 'asoc/topic/sigmadsp', 'asoc/topic/simple', 'asoc/topic/sirf' and 'asoc/topic/sn95031' into asoc-next 2014-12-08 13:12:12 +00:00
Mark Brown 4c90877646 Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/samsung' and 'asoc/topic/sgtl5000' into asoc-next 2014-12-08 13:12:09 +00:00
Mark Brown 6e6d57d07a Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/rockchip', 'asoc/topic/rt286' and 'asoc/topic/rt5631' into asoc-next 2014-12-08 13:12:07 +00:00
Mark Brown c9098c6120 Merge remote-tracking branches 'asoc/topic/multi-codec', 'asoc/topic/mxs-saif', 'asoc/topic/mxs-sgtl5000', 'asoc/topic/omap' and 'asoc/topic/pxa' into asoc-next 2014-12-08 13:12:05 +00:00
Mark Brown 41967b775e Merge remote-tracking branches 'asoc/topic/max98088', 'asoc/topic/max98090', 'asoc/topic/max98095', 'asoc/topic/max9850' and 'asoc/topic/mop500' into asoc-next 2014-12-08 13:12:02 +00:00
Mark Brown addaeea9ee Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/intel', 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/lm49453' into asoc-next 2014-12-08 13:12:00 +00:00
Mark Brown a6a21e6bca Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-card', 'asoc/topic/fsl-dt' and 'asoc/topic/fsl-ssi' into asoc-next 2014-12-08 13:11:58 +00:00
Mark Brown fed25395ff Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/doc', 'asoc/topic/dpcm', 'asoc/topic/dwc' and 'asoc/topic/fsi' into asoc-next 2014-12-08 13:11:56 +00:00
Mark Brown b39af5b38d Merge remote-tracking branches 'asoc/topic/cs4265', 'asoc/topic/cs4271', 'asoc/topic/cs42l51' and 'asoc/topic/cs42l73' into asoc-next 2014-12-08 13:11:54 +00:00
Mark Brown cfdf59b4a1 Merge remote-tracking branches 'asoc/topic/codec-mutex', 'asoc/topic/compress' and 'asoc/topic/cq93vc' into asoc-next 2014-12-08 13:11:52 +00:00
Mark Brown 1f491557d2 Merge remote-tracking branches 'asoc/topic/ak4671', 'asoc/topic/alc5623', 'asoc/topic/alc5632', 'asoc/topic/arizona' and 'asoc/topic/atmel' into asoc-next 2014-12-08 13:11:50 +00:00
Mark Brown 4aad340f1b Merge remote-tracking branches 'asoc/topic/adav80x', 'asoc/topic/adsp', 'asoc/topic/ak4535', 'asoc/topic/ak4641' and 'asoc/topic/ak4642' into asoc-next 2014-12-08 13:11:48 +00:00
Mark Brown 0a7e4ca1aa Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ad193x', 'asoc/topic/adau1373' and 'asoc/topic/adau17x1' into asoc-next 2014-12-08 13:11:45 +00:00
Mark Brown 8f38411a7e Merge remote-tracking branch 'asoc/topic/fsl-esai' into asoc-next 2014-12-08 13:11:45 +00:00
Mark Brown dbb55ce8af Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next 2014-12-08 13:11:45 +00:00
Mark Brown 941725f5fa Merge remote-tracking branch 'asoc/topic/core' into asoc-next 2014-12-08 13:11:44 +00:00
Mark Brown 3ee3f45463 Merge remote-tracking branch 'asoc/topic/cache' into asoc-next 2014-12-08 13:11:44 +00:00
Mark Brown 063e01a29b Merge remote-tracking branches 'asoc/fix/adsp', 'asoc/fix/davinci', 'asoc/fix/max98090', 'asoc/fix/sigmadsp' and 'asoc/fix/tlv320aic31xx' into asoc-linus 2014-12-08 13:11:40 +00:00
Mark Brown 6980a31735 Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linus 2014-12-08 13:11:39 +00:00
Mark Brown 47370022d2 ASoC: wm5102: Initialize dac_comp_lock mutex
Commit d74bcaaeb6 (ASoC: wm5102: Move ultrasonic response settings
lock to the driver level) created a driver local mutex for protecting
the ultrasonic response settings but neglected to initialize that mutex,
causing loud complaints from lockep and potential runtime failures. Fix
this by initializing the mutex.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-12-08 13:08:42 +00:00
Mark Brown 3f024980fb ASoC: samsung: Fix non-DT use of I2S controller
The changes in commit a5a56871f8 (ASoC: samsung: add support for exynos7
I2S controller) introduce a new variant_regs structure in the driver data
which is now mandatory for accessing registers. Unfortunately this is only
hooked up for DT platforms so non-DT platforms like my primary development
platform for audio are broken by this change and crash on boot.

Since the only non-DT user of these device is s3c64xx fix this by making
the standard samsung-i2s device be of type I2Sv3 and add a new I2Sv4 name
to the platform data section, currently using the I2Sv5 information which
should be about right.

Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-08 12:08:13 +00:00
Kuninori Morimoto 6cfad78961 ASoC: rsnd: rename SSI function name of PIO
Current R-Car sound SSI PIO/DMA mode are using interrupt.
it is no longer "xxx_pio_xxx", rename it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-07 13:46:38 +00:00
Kuninori Morimoto 4e7d606cd5 ASoC: rsnd: add salvage support for under/over flow error on SSI
L/R channel will be switched if under/over flow error happen on
Renesas R-Car sound device by the HW bugs. Then, HW restart is required
for salvage. This patch add salvage support for SSI.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-07 13:45:27 +00:00
Mark Brown ba56447c35 ASoC: samsung: Fix error handling for clock lookup
Return the error code we got from clk_get() and check to make sure that
clk_prepare_enable() worked.

Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-06 12:24:27 +00:00
Linus Torvalds 32f0880b5a sound fixes for 3.18-final
Just one commit for adding a copule of HD-audio quirk entries.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUga3rAAoJEGwxgFQ9KSmkEhkP/RR3FXJDiCnyrcm0IS1RFKG5
 7ludGBfjs3TEvDBRGNQui98/inXQbAPfmoyBeJiILfXle6DpgiMtw74HTw1AekxQ
 lhOGqnpgFb5ByNnU8qm/KesbhThQsyxZTwCheyHHA2QGfxlSBjNN3BruFvbGfFGE
 iobkRY0tkjdlyAd0Ufl2dZcL/ll7/giW4L+p4oSUJbW8D2L54JgsP6ey/1RtyZ2T
 7M0un4Un1sfkqpYuJFDL666m/KUXzOoZYVu0bpPuTdAt5rZ9KzOJAvzXN0N3klog
 jBO9OoTT8Vwy5r/gX08CYk+HQzkY3SZGB2Cli/XPk5dLSt8a1GyXbmnCWdFbHqLE
 ItADTPk+tnSKHq9GWqoHT980l06jABWk+231km44duqVduN9vNGvFP5Orq9FOIU7
 LAOv77fs9MaiTs0sNVhugXFIJBBJWtAcR1fRfgUmAIGB28Y+7aPN+BJ4bZCdtn4e
 AirFffn92n1hbCO7+ENRmqL/o2n4Bh049CfzX3kHtU9lAeYVzWUzfj1XtRc4FdqP
 qY045PTrqfocRbzXa3om2fd9aGjsizewrccSKNzSiPyA2ADXlrQwy8CC1VDmVOoY
 piW7soNVLBC7YMUaoig/NJr81FBJdIl4cZ1vKzfleodb1gmzShmlrzSF8zckb4sJ
 ZpXbojTD6L6oU47XyN1H
 =U558
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixlet from Takashi Iwai:
 "Just one commit for adding a copule of HD-audio quirk entries"

* tag 'sound-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Add headset Mic support for new Dell machine
2014-12-05 10:39:49 -08:00
Dylan Reid 40e3262e42 ASoC: rt5677: make volume TLV closer to reality
The volume blocks have an step of 0.375dB, but TLV uses 0.01dB for
units.  Only use the resolution supported, ignoring the LSB of the
volume register.  This results in half the steps and 0.75dB per step,
but reports accurate levels through TLV.  Update the masks to reflect
that these are registers have the LSB ignored.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-05 11:06:56 +00:00
Jiada Wang 4c9a8845f9 ASoC: fsl_ssi: fix error path in probe
SSI component isn't unregistered if fsl_ssi_debugfs_create() fails
in probe phase.

To fix it, this commit replaces label error_asoc_register with
error_irq.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-04 22:47:57 +00:00
Fabio Estevam 2ffa531078 ASoC: fsl_ssi: Fix module unbound
Trying to remove the snd-soc-fsl-ssi module leads to the following warning:

[   31.515336] ------------[ cut here ]------------
[   31.520091] WARNING: CPU: 2 PID: 434 at fs/proc/generic.c:521 remove_proc_entry+0x14c/0x16c()
[   31.528708] remove_proc_entry: removing non-empty directory 'irq/79', leaking at least '202c000.ss'
[   31.537911] Modules linked in: snd_soc_wm8962 snd_soc_imx_wm8962 snd_soc_fsl_ssi(-) evbug
[   31.546249] CPU: 2 PID: 434 Comm: rmmod Not tainted 3.18.0-rc6-00028-g3314bf6-dirty #1
[   31.554235] Backtrace:
[   31.556816] [<80011ea8>] (dump_backtrace) from [<80012044>] (show_stack+0x18/0x1c)
[   31.564416]  r6:80142c88 r5:00000000 r4:00000000 r3:00000000
[   31.570267] [<8001202c>] (show_stack) from [<806980ec>] (dump_stack+0x88/0xa4)
[   31.577588] [<80698064>] (dump_stack) from [<80029d78>] (warn_slowpath_common+0x70/0x94)
[   31.585711]  r5:00000009 r4:bb61fd90
[   31.589423] [<80029d08>] (warn_slowpath_common) from [<80029e40>] (warn_slowpath_fmt+0x38/0x40)
[   31.598187]  r8:bb61fdfe r7:be05d76d r6:be05d9a8 r5:00000002 r4:be05d700
[   31.605054] [<80029e0c>] (warn_slowpath_fmt) from [<80142c88>] (remove_proc_entry+0x14c/0x16c)
[   31.613709]  r3:806a79c0 r2:808229a0
[   31.617371] [<80142b3c>] (remove_proc_entry) from [<80070380>] (unregister_irq_proc+0x94/0xb8)
[   31.625989]  r10:00000000 r8:8000ede4 r7:80955f2c r6:0000004f r5:8118e738 r4:be00af00
[   31.633952] [<800702ec>] (unregister_irq_proc) from [<80069dac>] (free_desc+0x2c/0x64)
[   31.641898]  r6:0000004f r5:80955f38 r4:be00af00
[   31.646604] [<80069d80>] (free_desc) from [<80069e68>] (irq_free_descs+0x4c/0x8c)
[   31.654092]  r7:00000081 r6:00000001 r5:0000004f r4:00000001
[   31.659863] [<80069e1c>] (irq_free_descs) from [<8006fc3c>] (irq_dispose_mapping+0x40/0x5c)
[   31.668247]  r6:be17b844 r5:be17b800 r4:0000004f r3:802c5ec0
[   31.673998] [<8006fbfc>] (irq_dispose_mapping) from [<7f004ea4>] (fsl_ssi_remove+0x58/0x70 [snd_so)
[   31.683948]  r4:bb5bba10 r3:00000001
[   31.687618] [<7f004e4c>] (fsl_ssi_remove [snd_soc_fsl_ssi]) from [<803720a0>] (platform_drv_remove)
[   31.697564]  r5:7f0064f8 r4:be17b810
[   31.701195] [<80372080>] (platform_drv_remove) from [<80370494>] (__device_release_driver+0x78/0xc)
[   31.710361]  r5:7f0064f8 r4:be17b810
[   31.713987] [<8037041c>] (__device_release_driver) from [<80370d20>] (driver_detach+0xbc/0xc0)
[   31.722631]  r5:7f0064f8 r4:be17b810
[   31.726259] [<80370c64>] (driver_detach) from [<80370304>] (bus_remove_driver+0x54/0x98)
[   31.734382]  r6:00000800 r5:00000000 r4:7f0064f8 r3:bb67f500
[   31.740149] [<803702b0>] (bus_remove_driver) from [<80371398>] (driver_unregister+0x30/0x50)
[   31.748617]  r4:7f0064f8 r3:bd9f7080
[   31.752245] [<80371368>] (driver_unregister) from [<80371f3c>] (platform_driver_unregister+0x14/0x)
[   31.761498]  r4:7f00655c r3:7f005a70
[   31.765130] [<80371f28>] (platform_driver_unregister) from [<7f005a84>] (fsl_ssi_driver_exit+0x14/)
[   31.776147] [<7f005a70>] (fsl_ssi_driver_exit [snd_soc_fsl_ssi]) from [<8008ed80>] (SyS_delete_mod)
[   31.786553] [<8008ec64>] (SyS_delete_module) from [<8000ec20>] (ret_fast_syscall+0x0/0x48)
[   31.794824]  r6:00c46d18 r5:00000800 r4:00c46d18
[   31.799530] ---[ end trace 954e8a3a15379e52 ]---

The cause of problem and solution are well explained by Lars-Peter:

"The driver creates the mapping by calling irq_of_parse_and_map(), so it also
has to dispose the mapping. But the easy way out is to simply use
platform_get_irq() instead of irq_of_parse_map(). In this case the mapping is
not managed by the device but by the of core, so the device has not to dispose
the mapping."

Tested on a imx6q-sabresd board.

Reported-by: Jiada Wang <jiada_wang@mentor.com>
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-04 22:46:51 +00:00
Qiao Zhou 36fba62cce ASoC: soc-pcm: do not hw_free BE if it's still used
Do not free BE hw if it's still used by other FE during dpcm runtime
shutdown. Otherwise the BE runtime state will be STATE_HW_FREE and
won't be updated to STATE_CLOSE when shutdown ends, because BE dai
shutdown function won't close pcm when detecting BE is still under
use. With STATE_HW_FREE, BE can't be triggered start again.

This corner case can easily appear when one BE is used by two FE,
without this patch "ASoC: dpcm: Fix race between FE/BE updates and
trigger"(ea9d0d771f). One FE tries to
shutdown but it's raced against xrun on another FE. It improves the
be dai hw_free logic.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-04 22:41:58 +00:00
Peter Rosin f8781db8ae ASoC: Augment existing card DAPM routes in snd_soc_of_parse_audio_routing
If a snd_soc_card has any DAPM routes when it calls
snd_soc_of_parse_audio_routing, those are clobbered without this change.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-04 22:40:13 +00:00
Kuninori Morimoto f0ef0cb84b ASoC: rsnd: remove un-necessary parameter from rsnd_src_start/stop()
rsnd_src_start/stop() requests struct rsnd_dai as parameter.
but, it is not used, and become more complex in L/R error handling.
Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:51:40 +00:00
Kuninori Morimoto 49229850be ASoC: rsnd: share SSI starting method between PIO/DMA mode
Basically, SSI starting method is same between PIO/DMA mode.
Let's share it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:51:40 +00:00
Kuninori Morimoto 933cc8cb08 ASoC: rsnd: set SRC_ROUTE_MODE0 on each rsnd_src_set_convert_rate()
Current src.c sets SRC_ROUTE_MODE0 on rsnd_src_start(), but, set it in
rsnd_src_set_convert_rate() is natural.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:51:40 +00:00
Kuninori Morimoto 603cefa59b ASoC: rsnd: initialize SRC on rsnd_src_init()
Current src initialize SRC on rsnd_src_set_convert_rate()
but, it should be done on rsnd_src_init().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:51:40 +00:00
Kuninori Morimoto b167a5780c ASoC: rsnd: use rsnd_src_convert_rate() once on rsnd_src_set_convert_rate_gen2()
using many rsnd_src_convert_rate() is not readable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:51:40 +00:00
Kuninori Morimoto 0cf7718520 ASoC: rsnd: tidyup rsnd_io_to_runtime() macro
Avoid NULL pointer access

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:51:40 +00:00
Kuninori Morimoto 170a2497a2 ASoC: rsnd: move snd_kcontrol_new fucntions to core.c
Current DVC is using snd_kcontrol_new functions, but, SRC will need
same method. Move common functions to core.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-03 18:51:39 +00:00