summaryrefslogtreecommitdiff
path: root/sound/soc/kirkwood
AgeCommit message (Collapse)Author
2013-08-27ASoc: kirkwood: Use the Kirkwood audio driver in Dove boardsJean-Francois Moine
This patch permits the generation of the Kirkwood audio driver which may be used in the Dove boards. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-22ASoc: kirkwood: add DT support to the mvebu audio subsystemJean-Francois Moine
This patch adds DT support to the audio subsystem of the mvebu family (Kirkwood, Dove, Armada 370). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05ASoC: kirkwood: move calculation of max buffer size to kirkwood.hRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05ASoC: kirkwood: combine kirkwood-i2s and kirkwood-dma driversRussell King
These really should be a single driver because they're fully integrated in hardware. Make them so. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05ASoC: kirkwood: provide KIRKWOOD_PLAYCTL_ENABLE_MASKRussell King
Provide a helper macro which includes the sum of all enable bits in the playback control register. This simplifies the code a little. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05ASoC: kirkwood: Free external clock if it is a duplicate of internalRussell King
[Remaining patch from "ASoC: kirkwood: use devm_clk_get() for the external clock" -- broonie] Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-05ASoC: kirkwood: merge struct kirkwood_dma_priv with struct kirkwood_dma_dataRussell King
Merge these two structures together; nothing other than the I2S and DMA driver makes use of struct kirkwood_dma_data, and it's not like struct kirkwood_dma_data is really just used to convey DMA specific data to the backend; it's more a general shared structure between the two halves. This will later allow kirkwood-dma.c and kirkwood-i2s.c to be merged together. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-16ASoC: kirkwood-i2s: fix a compilation warningJean-Francois Moine
In the function kirkwood_set_rate, when the rate cannot be satisfied by the internal nor by an external clock, the clock source in undefined: warning: ‘clks_ctrl’ may be used uninitialized in this function The ALSA subsystem should never gives such a rate because: - the rates with the internal clock are limited to 44.1, 48 and 96 kHz as specified by the kirkwood_i2s_dai structure, - the other rates are proposed in the structure kirkwood_i2s_dai_extclk only when the external clock is present. In case of programming error (bad rate for internal clock and no external clock), the function will simply cause a backtrace. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-16ASoC: kirkwood-i2s: Inline KIRKWOOD_I2S_RATESMark Brown
The addition of extclk support makes this misleading as it's only the rates used when there is no extclk so put it in the specific DAI it applies to. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-16ASoC: kirkwood-i2s: Remove empty remove()Mark Brown
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15ASoC: kirkwood-i2s: Use devm_clk_get() for extclkMark Brown
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15ASoC: kirkwood: Enable build on non-Kirkwood platformsMark Brown
Improve build coverage by enabling build on other platforms if COMPILE_TEST is enabled. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-15ASoC: kirkwood: Remove unused headersMark Brown
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-06-17Merge remote-tracking branch 'asoc/topic/kirkwood' into asoc-nextMark Brown
2013-05-18sound/soc/kirkwood: don't check resource with devm_ioremap_resourceWolfram Sang
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2013-05-15ASoC: kirkwood-dma: Staticize non exported structLars-Peter Clausen
The kirkwood_dma_ops struct is not used outside of kirkwood-dma.c, so make it static. 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 kirkwood i2sKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-01-22ASoC: Convert to devm_ioremap_resource()Thierry Reding
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages so all explicit error messages can be removed from the failure code paths. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-12-09ASoC: kirkwood: remove __dev* attributesBill Pemberton
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-11-21ASoC: kirkwood-dma: remove channel restrictionsRussell King
This is part of a patch found in Rabeeh Khoury's git tree for the cubox. With SPDIF passthrough, we are not restricted to just two channels of audio; we can support however many channels the non-audio stream can itself support. In any case, kirkwood-dma is not involved in the format selection. So yet rid of this restriction. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-i2s: add support for external clock ratesRussell King
This is part of a patch found in Rabeeh Khoury's git tree for the cubox, and cleaned up by me. Some platforms provide an external clock which can be used to allow other sample rates to be selected. Provide support for this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-dma: remove restriction on sample ratesRussell King
This is part of a patch found in Rabeeh Khoury's git tree for the cubox. The kirkwood DMA hardware for ASoC does not impose any restrictions on the sample rates available, so it's silly to impose an artificial set in the DMA code. The restrictions come from the availble clocks to the I2S module, which are already handled in the I2S part of the driver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-i2s: better handling of play/record control registersRussell King
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-i2s: use devm_* APIsRussell King
Simplify the cleanup paths in the driver by using the devm_* APIs, ensuring that all error paths are correctly checked. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-i2s: more pause-mode fixesRussell King
Don't even momentarily set the pause status when starting the channel; if we do, we should check the busy bit to ensure that we comply with the spec. In any case, it isn't necessary; we will not active on a START event so there is no need to pause the DMA. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-i2s: fix DMA underrunsRussell King
Stress testing the driver with multiple start/stop events causes kirkwood-dma to report underrun errors (which used to cause the kernel to lock up solidly). This is because kirkwood-i2s is not respecting the restrictions imposed on clearing the 'pause' bit. Follow what the spec says; the busy bit must be read as being clear twice before the pause bit can be released. This solves the underruns. However, it has been noticed that the busy bit occasionally does not clear itself, hence the waiting is bounded to 5ms maximum to avoid a new reason for the kernel to lockup. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-i2s: fix DCO lock detectionRussell King
This is part of a patch found in Rabeeh Khoury's git tree for the cubox, which is further attributed to Sebastian Hesselbrath. Rather than masking the KIRKWOOD_DCO_SPCR_STATUS register contents against the registers virtual address, let's actually use the bit definition for the locked status, as required in the documentation. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-dma: don't ignore other irq causes on errorRussell King
Ignoring the real cause of the interrupt is not a good idea; this behaviour has been observed to bring Dove platforms to silently lockup. Instead, on error fall through to the normal interrupt processing. This is especially important on Dove platforms as errors are handled separately, and allows us to clear down the real cause of the interrupt. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21ASoC: kirkwood-dma: fix use of virt_to_phys()Russell King
This is part of a patch found in Rabeeh Khoury's git tree for the cubox. You can not use virt_to_phys() on the address returned from dma_alloc_coherent(); it may not be part of the kernel direct-mapped memory. Fix this to use the DMA address instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-19ARM: orion: move platform_data definitionsArnd Bergmann
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the orion include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Dan Williams <djbw@fb.com> Cc: Bryan Wu <bryan.wu@canonical.com> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Chris Ball <cjb@laptop.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Liam Girdwood <lrg@ti.com> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de>
2012-07-25ARM: Orion: fix driver probe error handling with respect to clkSimon Baatz
The clk patches added code to get and enable clocks in the respective driver probe functions. If the probe function failed for some reason after enabling the clock, the clock was not disabled again in many cases. Signed-off-by: Simon Baatz <gmbnomis@gmail.com> Signed-off-by: Andrew Lumm <andrew@lunn.ch>
2012-05-08ARM: Orion: Audio: Add clk/clkdev supportAndrew Lunn
Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Jamie Lentin <jm@lentin.co.uk> Signed-off-by: Mike Turquette <mturquette@linaro.org>
2012-02-07ASoC: Convert kirkwood-openrd to use snd_soc_register_card()Axel Lin
Use snd_soc_register_card() instead of creating a "soc-audio" platform device. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-07ASoC: Convert kirkwood-t5325 to use snd_soc_register_card()Axel Lin
Use snd_soc_register_card() instead of creating a "soc-audio" platform device. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-20ASoC: replace 0xffffffff with DMA_BIT_MASK macroJoachim Eastwood
Signed-off-by: Joachim Eastwood <joachim.eastwood@jotron.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-01-12Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (526 commits) ASoC: twl6040 - Add method to query optimum PDM_DL1 gain ALSA: hda - Fix the lost power-setup of seconary pins after PM resume ALSA: usb-audio: add Yamaha MOX6/MOX8 support ALSA: virtuoso: add S/PDIF input support for all Xonars ALSA: ice1724 - Support for ooAoo SQ210a ALSA: ice1724 - Allow card info based on model only ALSA: ice1724 - Create capture pcm only for ADC-enabled configurations ALSA: hdspm - Provide unique driver id based on card serial ASoC: Dynamically allocate the rtd device for a non-empty release() ASoC: Fix recursive dependency due to select ATMEL_SSC in SND_ATMEL_SOC_SSC ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA codecs ALSA: hda - Return the error from get_wcaps_type() for invalid NIDs ALSA: hda - Use auto-parser for HP laptops with cx20459 codec ALSA: asihpi - Fix potential Oops in snd_asihpi_cmode_info() ALSA: hdsp - Fix potential Oops in snd_hdsp_info_pref_sync_ref() ALSA: hda/cirrus - support for iMac12,2 model ASoC: cx20442: add bias control over a platform provided regulator ALSA: usb-audio - Avoid flood of frame-active debug messages ALSA: snd-usb-us122l: Delete calls to preempt_disable mfd: Put WM8994 into cache only mode when suspending ... Fix up trivial conflicts in: - arch/arm/mach-s3c64xx/mach-crag6410.c: renamed speyside_wm8962 to tobermory, added littlemill right next to it - drivers/base/regmap/{regcache.c,regmap.c}: duplicate diff that had already come in with other changes in the regmap tree
2012-01-07ASoC: check for substream not channels_min in pcm enginesJoachim Eastwood
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-28ASoC: Convert kirkwood-t5325 to table based DAPM initAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28ASoC: Use dai_fmt in kirkwood-t5325 machine driverAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28ASoC: Use dai_fmt in kirkwood-openrd machine driverAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-28ASoC: Fix build error in sound/soc/kirkwood/kirkwood-i2s.cAxel Lin
Since commit db33f4de "ARM: Orion: Remove address map info from all platform data structures", the dram is removed from struct kirkwood_asoc_platform_data. This patch fixes below build error: CC sound/soc/kirkwood/kirkwood-i2s.o sound/soc/kirkwood/kirkwood-i2s.c: In function 'kirkwood_i2s_dev_probe': sound/soc/kirkwood/kirkwood-i2s.c:444: error: 'struct kirkwood_asoc_platform_data' has no member named 'dram' sound/soc/kirkwood/kirkwood-i2s.c:450: error: 'struct kirkwood_asoc_platform_data' has no member named 'dram' make[3]: *** [sound/soc/kirkwood/kirkwood-i2s.o] Error 1 make[2]: *** [sound/soc/kirkwood] Error 2 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-23ASoC: kirkwood: Add .owner to struct snd_soc_cardAxel Lin
Add missing .owner of struct snd_soc_card. This prevents 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-12-13ARM: Orion: Get address map from plat-orion instead of via platform_dataAndrew Lunn
Use an getter function in plat-orion/addr-map.c to get the address map structure, rather than pass it to drivers in the platform_data structures. When the drivers are built for none orion platforms, a dummy function is provided instead which returns NULL. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Michael Walle <michael@walle.cc> Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
2011-12-03Merge branch 'for-3.2' into for-3.3Mark Brown
2011-12-03ASoC: kirkwood: Make SND_KIRKWOOD_SOC_OPENRD and SND_KIRKWOOD_SOC_T5325 ↵Axel Lin
depend on I2C SND_KIRKWOOD_SOC_T5325 selects SND_SOC_ALC5623, but SND_SOC_ALC5623 needs CONFIG_I2C. So we need to make SND_KIRKWOOD_SOC_T5325 depend on I2C, otherwise I got below build error if CONFIG_I2C is not selected. CC sound/soc/codecs/alc5623.o sound/soc/codecs/alc5623.c: In function 'alc5623_i2c_probe': sound/soc/codecs/alc5623.c:1002: error: implicit declaration of function 'i2c_smbus_read_word_data' sound/soc/codecs/alc5623.c:1009: error: implicit declaration of function 'i2c_smbus_read_byte_data' sound/soc/codecs/alc5623.c: In function 'alc5623_modinit': sound/soc/codecs/alc5623.c:1096: error: implicit declaration of function 'i2c_add_driver' sound/soc/codecs/alc5623.c: In function 'alc5623_modexit': sound/soc/codecs/alc5623.c:1108: error: implicit declaration of function 'i2c_del_driver' make[3]: *** [sound/soc/codecs/alc5623.o] Error 1 make[2]: *** [sound/soc/codecs] Error 2 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Also fix the same issue for SND_KIRKWOOD_SOC_OPENRD. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-24ASoC: Convert kirkwood directory to module_platform_driverAxel Lin
Factor out some boilerplate code. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23ASoC: Constify snd_soc_dai_ops structsLars-Peter Clausen
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-08ASoC: Remove redundant snd_soc_dapm_sync() calls from machine driversMark Brown
The core will sync DAPM as part of the card initialization, there is no need for machine drivers to do so during their setup. OMAP drivers are omitted as I know Peter already has patches for them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02ASoC: kirkwood-i2s: Add __devexit_p at necessary placeAxel Lin
According to the comments in include/linux/init.h: "Pointers to __devexit functions must use __devexit_p(function_name), the wrapper will insert either the function_name or NULL, depending on the config options." We have __devexit annotation for kirkwood_i2s_dev_remove(), thus add __devexit_p at necessary place. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-12ASoC: Fix trivial build regression in Kirkwood I2SArnd Bergmann
A fix merged in 3.1-rc2 introduced a small regression, this should get it to build again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>