summaryrefslogtreecommitdiff
path: root/sound/soc/sunxi
AgeCommit message (Collapse)Author
2016-09-26ASoC: sun4i-codec: Rename sun4i_codec_widgets for consistencyDanny Milosavljevic
Rename "sun4i_codec_widgets" to "sun4i_codec_controls" for consistency with the struct field name. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-26Merge branch 'topic/codec-component' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi
2016-09-24ASoC: sun4i-codec: Add custom regmap configsDanny Milosavljevic
The A20 has a few extra registers that the A10 doesn't have. Therefore, use different regmaps for A10 as compared to A20. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-24ASoC: sun4i-codec: Rename some sun7i-only registersDanny Milosavljevic
Some of the registers defined in the driver are only usable on the A20. Rename these registers. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-24ASoC: sunxi: depend on ARCH_SUNXIPeter Robinson
Depend on ARCH_SUNXI or COMPILE_TEST as it doesn't make sense to enable these if the appropriate SoC they're embedded in isn't enabled. Signed-off-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-12ASoC: sunxi: compatibility for sun6i to SPDIFMarcus Cooper
The A31 SoC uses the same SPDIF block as found in earlier SoCs, but its reset is controlled via a separate reset controller. The DMA also complains when the maxburst is set to 4 so it's been adjusted to 8 which suites both the older and newer SoCs. Signed-off-by: Marcus Cooper <codekipper@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: codec duplicated callback function goes to component on sun4i-codecKuninori Morimoto
codec driver and component driver has duplicated callback functions, and codec side functions are just copied to component side when register timing. This was quick-hack, but no longer needed. This patch moves these functions from codec driver to component driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-04ASoC: sunxi: remove redundant dev_err call in sun4i_i2s_probe()Wei Yongjun
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-01ASoC: sunxi: fix semicolon.cocci warningskbuild test robot
sound/soc/sunxi/sun4i-i2s.c:624:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-29ASoC: sunxi: Add Allwinner A10 Digital Audio driverMaxime Ripard
The Allwinner A10 and later come with a hardware block that used for the PCM and I2S interfaces. Add a driver for it in ASoC. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Tested-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-20ASoC: sunxi: Add support for the SPDIF blockMarcus Cooper
The sun4i, sun5i and sun7i SoC families have an SPDIF block which is capable of playback and capture. This patch enables the playback of this block for the sun4i families. Signed-off-by: Marcus Cooper <codekipper@gmail.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-22ASoC: sun4i-codec: Use proper output for external amp routesHans de Goede
An external amp (if any) is connected to the external outputs of the SoC of course, rather then directly to the internal amp. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-12ASoC: sun4i-codec: Add support for PA gpio pinHans de Goede
Add support for PA gpio pin for controlling an external amplifier as used on some Allwinner boards. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-12ASoC: sun4i-codec: Rename codec dapm widgets and routesHans de Goede
Rename the codec dapm widgets and routes with a _codec prefix. This is a preparation patch for adding card dapm widgets and routes. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-02Merge branch 'fix/sun4i-codec' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi
2015-12-01ASoC: sun4i-codec: pass through clk_set_rate errorMaxime Ripard
Commit 1fb34b48361e ('ASoC: sun4i: Implement MIC1 capture') added back some code that disregards the clk_set_rate error code and always returns -EINVAL. Fix that and return the code in order to have more clue about what's going on. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-01ASoC: sunxi: Remove useless comments and variableMaxime Ripard
The comment is misleading on how we should support external power amps, and the variable is not used and generates a warning. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-30ASoC: sun4i: Implement MIC1 captureMaxime Ripard
One of the input path used in the Allwinner codec is the MIC1. Add support for it. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-05ASoC: sun4i-codec: use consistent names for PA controlsAdam Sampson
The power amplifier for the headphone output is called "the PA" and "the headphone amplifier" in Allwinner's documentation for the A10 and A20. sun4i-codec calls it "PA" in some places and "Pre-Amplifier" (which isn't really accurate) in others, leading to user-visible controls with different names referring to the same device. When this driver implements audio input, it'll also need to expose controls for the line and mic input preamps, so just referring to "the Pre-Amplifier" will be ambiguous. Change it to use "Power Amplifier" consistently for the power amplifier's controls. Signed-off-by: Adam Sampson <ats@offog.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-07ASoC: sun4i-codec: Remove the routing propertyMaxime Ripard
Most of the boards have their headphone jack directly connected to the matching pins of the SoCs. Since most of the time we will have the same routing path, it makes no sense to put that in the DTS, since it will only be some useless duplication there. It also fixes the following warning messages that were seen so far, on boards where we were using the bindings in the documentation example. sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Left -> direct -> Headphone Jack sun4i-codec 1c22c00.codec: ASoC: no sink widget found for Headphone Jack sun4i-codec 1c22c00.codec: ASoC: Failed to add route HP Right -> direct -> Headphone Jack Reported-by: Priit Laes <plaes@plaes.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-30ASoC: sun4i-codec: Remove redundant SND_PCM_RATE_KNOTMaxime Ripard
The SND_PCM_RATE_KNOT covers all the rate settings, even though some that we don't support, while we also list all the rate we support. Simply remove it. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-30ASoC: sun4i-codec: pass through clk_set_rate errorMaxime Ripard
The current code, disregarding the clk_set_rate error code, was always returning -EINVAL. Fix that and return the code in order to have more clue about what's going on. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-17ASoC: sunxi: fix platform_no_drv_owner.cocci warningskbuild test robot
sound/soc/sunxi/sun4i-codec.c:708:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Emilio López <emilio@elopez.com.ar> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-16ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCsEmilio López
The sun4i, sun5i and sun7i SoC families have a built-in codec, capable of both audio capture and playback. While this is called a codec by Allwinner, it really is an in-SoC combination of a codec and a DAI, with its own DAC/ADC and amplifiers in a single memory-mapped controller. The capture part has been left out for now, and will be added eventually. Signed-off-by: Emilio López <emilio@elopez.com.ar> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>