summaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin
AgeCommit message (Collapse)AuthorFilesLines
2013-07-30ASoC: bf5xx-ac97: Remove unused extern declarationLars-Peter Clausen1-1/+0
The blackfin ac97 driver never defines nor uses a global ac97 struct. So remove the extern declaration for it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-30ASoC: bf5xx-ac97: Fix compile error with SND_BF5XX_HAVE_COLD_RESETLars-Peter Clausen1-2/+3
If CONFIG_SND_BF5XX_HAVE_COLD_RESET is enabled building the blackfin ac97 driver fails with the following compile error: sound/soc/blackfin/bf5xx-ac97.c: In function ‘asoc_bfin_ac97_probe’: sound/soc/blackfin/bf5xx-ac97.c:297: error: expected ‘;’ before ‘{’ token sound/soc/blackfin/bf5xx-ac97.c:302: error: label ‘gpio_err’ used but not defined The issue was introduced in commit 6dab2fd7 ("ASoC: bf5xx-ac97: Convert to devm_gpio_request_one()"). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29ASoC: bfin-ac97: Fix prototype error following AC'97 refactoringMark Brown1-1/+0
As part of the multiplatform refactoring for AC'97 the AC'97 bus ops were staticised meaning that the prototype (which was never needed) conflicts with the declaration causing build failures. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-06-28Merge tag 'asoc-v3.11-2' of ↵Takashi Iwai1-14/+15
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: More updates for v3.11 Some more fixes and enhancements, and also a bunch of refectoring for AC'97 support which enables more than one AC'97 controller driver to be built in.
2013-06-27ASoC: ac97: Support multi-platform AC'97Mark Brown1-2/+9
Currently we can only have a single platform built in with AC'97 support due to the use of a global variable to provide the bus operations. Fix this by making that variable a pointer and having the bus drivers set the operations prior to registering. This is not a particularly good or nice approach but it avoids blocking multiplatform and a real fix involves fixing the fairly deep problems with AC'97 support - we should be converting it to a real bus. Acked-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-27ASoC: bf5xx-ac97: Convert to devm_gpio_request_one()Mark Brown1-12/+6
Also clean up the error reporting from failed requests while we're at it. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-30ASoC: blackfin: Remove bf5xx-tdm driverLars-Peter Clausen5-711/+0
Now that the bf5xx-i2s driver supports TDM mode and all users of the bf5xx-tdm driver have been switch over to using the bf5xx-i2s driver there is no need to keep the b5fxx-tdm driver around. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: Switch bf5xx-ad1836 from bf5xx-tdm to bf5xx-i2sLars-Peter Clausen2-19/+15
The bf5xx-i2s driver now has support for TDM mode and the bf5xx-tdm driver is going to be removed soon, so switch the driver over to bf5xx-i2s. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: Switch bf5xx-ad193x from bf5xx-tdm to bf5xx-i2sLars-Peter Clausen2-38/+19
The bf5xx-i2s driver now has support for TDM mode and the bf5xx-tdm driver is going to be removed soon, so switch the driver over to bf5xx-i2s. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: bf5xx-i2s: Add support for TDM modeLars-Peter Clausen3-11/+229
The bf5xx-i2s{,-pcm} and bf5xx-tdm{-pcm} drivers are nearly identical. Both are for the same hardware each supporting a slight different subset of the hardware. The bf5xx-i2s driver supports 2 channel I2S mode while the bf5xx-tdm driver supports TDM mode and channel remapping. This patch adds support for TDM mode and channel remapping to the bf5xx-i2s driver so that we'll eventually be able to retire the bf5xx-tdm driver. Unfortunately the hardware is fixed to using 8 channels in TDM mode. The bf5xx-tdm driver jumps through a few hoops to make it work well with other channel counts as well: * Don't support mmap * Translate between internal frame size (which is always 8 * sample_size) and ALSA frame size (which depends on the channel count) * Have special copy and silence callbacks which are aware of the mismatch between internal and ALSA frame size * Reduce the maximum buffer size to ensure that there is enough headroom for dummy data. The bf5xx-i2s driver is going to use the same mechanisms when being used int TDM mode. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: bf5xx-i2s-pcm: Use snd_pcm_lib_preallocate_pages_for_all()Lars-Peter Clausen1-60/+3
Use snd_pcm_lib_preallocate_pages_for_all() for pre-allocating the DMA buffers instead of re-implementing the same functionality. Note that there is no need to call snd_pcm_lib_free_pages_for_all() since the ALSA core takes care of this for us. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: bf5xx-i2s: Allocate buffer only as large as requestedLars-Peter Clausen1-4/+1
There is no need to always allocate the maximum buffer size. While we are at it also pass errors returned by snd_pcm_lib_malloc_pages() on to the upper layers. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: bf5xx-sport: Allow setting rx and tx mask independentlyLars-Peter Clausen4-12/+12
Since the hardware supports it there is no need to artificially limit this to just being able to set the same mask for both tx and rx. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: bf5xx-i2s: Use dev_{err, dbg} instead of pr_{error, debug}Lars-Peter Clausen1-11/+13
Using dev_{err,dbg} instead of pr_{error,debug} makes it easier to recognize which device created the message. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-30ASoC: blackfin: Remove unused bf5xx-{i2s, tdm, ac97}-pcm.hLars-Peter Clausen11-78/+0
The structs defined in these files are completely unused, so remove both the structs and the files. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-15ASoC: bf5xx-tdm-pcm: Staticize non exported structLars-Peter Clausen1-2/+1
The bf5xx_tdm_pcm_ops struct is only used in bf5xx-tdm-pcm.c, so make it static. Cc: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on bf5xx tdmKuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on bf5xx i2sKuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on bf5xx ac97Kuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on bf6xx i2sKuninori Morimoto1-2/+7
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10ASoC: blackfin: remove __dev* attributesBill Pemberton11-30/+30
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-05Merge branch 'asoc-omap' into for-3.7Mark Brown1-0/+7
2012-08-17ASoC: bf5xx-ad1836: convert to use snd_soc_register_cardScott Jiang1-36/+37
Cpu dai and codec name are passed in through platform data. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-09ASoC: bfin: fix memory leak in sport3 controller driverScott Jiang1-0/+7
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-21ASoC: bfin: use dev_err to print error log instead of dev_dbgScott Jiang1-2/+2
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-20ASoC: add i2s dai driver for bf6xx socScott Jiang3-3/+244
This driver enables i2s mode support on blackfin bf6xx platform. We reuse bf5xx-i2s-pcm.c as its i2s pcm driver because it's the same for both bf5xx and bf6xx soc. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-20ASoC: add sport driver for bf6xx socScott Jiang4-3/+513
The SPORT(Serial Port) module on bf6xx soc has a totally different ip comparing to bf5xx soc. An individual SPORT module consists of two independently configurable SPORT halves with identical functionality. Each SPORT half can be configured for either transmitter or receiver. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-13Merge tag 'v3.4-rc7' into for-3.5Mark Brown1-0/+2
Linux 3.4-rc7 Conflicts): drivers/base/regmap/regmap.c (overlap with bug fixes) sound/soc/blackfin/bf5xx-ssm2602.c (overlap with bug fixes)
2012-04-25ASoC: bf5xx-ssm2602: Setup sysclock in init callbackLars-Peter Clausen1-33/+4
The sysclock is fixed, so just set it up once in the init callback instead of setting it repeatably in the hw_params callback. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-25ASoC: bf5xx-ssm2602: Set DAI formatLars-Peter Clausen1-0/+2
Commit 980b0bc69 ("ASoC: blackfin: Use dai_fmt") converted the blackfin ASoC machine drivers to use the dai_links dai_fmt field to setup their DAI format. For the bf5xx-ssm2602 the commit removed the manual call to snd_soc_dai_set_fmt, but missed to set the dai_links dai_fmt field. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-01ASoC: blackfin: Use dai_fmtLars-Peter Clausen7-98/+27
Use the dai_link's dai_fmt attribute to setup the DAI format instead of doing this manually. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-07ASoC: check for substream not channels_min in pcm enginesJoachim Eastwood3-9/+6
This is a follow up on 53dea36c70c1857 which fixes the other affected pcm engines. Description from 53dea36c70c1857: Don't rely on the codec's channels_min information to decide wheter or not allocate a substream's DMA buffer. Rather check if the substream itself was allocated previously. Without this patch I was seeing null-pointer dereferenc in atmel-pcm. Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-22ASoC: blackfin: Add .owner to struct snd_soc_cardAxel Lin8-0/+8
Missed .owner of struct snd_soc_card will prevent the module from being removed from underneath its users. Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24ASoC: Convert blackfin directory to module_platform_driverAxel Lin9-101/+9
Factor out some boilerplate code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen2-2/+2
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure") introduced the possibility to have constant DAI ops structures, yet this is barley used in both existing drivers and also new drivers being submitted, although none of them modifies its DAI ops structure. The later is not surprising since existing drivers are often used as templates for new drivers. So this patch just constifies all existing snd_soc_dai_ops structs to eliminate the issue altogether. The patch was generated with the following coccinelle semantic patch: // <smpl> @@ identifier ops; @@ -struct snd_soc_dai_ops ops = +const struct snd_soc_dai_ops ops = { ... }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker1-0/+1
Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31blackfin: add module.h to files implicitly expecting to use it.Paul Gortmaker1-0/+1
Its presence was implicit everywhere, but we are aiming to fix that, so call out the users explicitly. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-09-21ASoC: Staticise bf5xx_pcm_i2s_new()Axel Lin1-1/+1
It is not used outside this driver so no need to make the symbol global. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-21ASoC: Staticise bf5xx_pcm_ac97_new()Axel Lin1-1/+1
It is not used outside this driver so no need to make the symbol global. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-16Merge branch 'for-3.1' into for-3.2Mark Brown1-1/+1
2011-09-16ASoC: bf5xx-ad73311: Fix prototype for bf5xx_probeAxel Lin1-1/+1
Fix below build warning: sound/soc/blackfin/bf5xx-ad73311.c: warning: initialization from incompatible pointer type Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-05Merge branch 'for-3.1' into for-3.2Mark Brown1-2/+2
2011-09-05ASoC: Blackfin: bf5xx-ad193x: Fix codec device nameLars-Peter Clausen1-2/+2
Fix the codec_name field of the dai_link to match the actual device name of the codec. Otherwise the card won't be instantiated. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-08-17ASoC: Blackfin: ADAU1373 eval board supportLars-Peter Clausen3-0/+217
Add a machine driver to support the EVAL-ADAU1373 board connected to a Analog Devices BF5XX evaluation board. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-15ASoC: ad193x: fix system clockScott Jiang1-1/+1
system clock is 24.576MHz instead of 12.288MHz Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-29Merge branch 'for-3.0' into for-3.1Mark Brown1-2/+11
2011-06-29ASoC: Fix Blackfin I2S _pointer() implementation return in bounds valuesMark Brown1-2/+11
The Blackfin DMA controller can report one frame beyond the end of the buffer in the wraparound case but ALSA requires that the pointer always be in the buffer. Do the wraparound to handle this. A similar bug is likely to apply to the other Blackfin PCM drivers but the code is less obvious to inspection and I don't have a user to test. Reported-by: Kieran O'Leary <Kieran.O'Leary@wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2011-06-28ASoC: Blackfin: Add machine driver for EVAL-ADAV80X boardsLars-Peter Clausen3-0/+188
Add a machine driver to support the EVAL-ADAV801 and EVAL-ADAV803 boards connected to a Analog Devices BF5XX evaluation board. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-17ASoC: Blackfin: allow SPI for SSM2602 partsMike Frysinger1-2/+1
This board has hardware switches for selecting SPI or I2C, so don't require I2C for this driver. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-16ASoC: Blackfin: Add bf5xx-adau1701 machine driverLars-Peter Clausen3-0/+152
Add a machine driver to support the ADAU1701 SigmaDSP processors on Analog Devices BF5XX evaluation boards. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>