summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-11ASoC: compress: Only assign compr->ops->copy onceCharles Keepax
There are only one set of ops on the compressed stream so no need to reassign the copy callback repeatedly, stop after copy is seen to be necessary. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: qdsp6: q6common: Add qdsp6 helper functionsSrinivas Kandagatla
This patch adds some common helper functions like translating dsp error to linux error codes and channel mappings etc. These functions are used in all the following qdsp6 drivers. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org> Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: qdsp6: dt-bindings: Add q6asm dt bindingsSrinivas Kandagatla
This patch add DT bindings for ASM (Audio Stream Manager) DSP module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: qdsp6: dt-bindings: Add q6adm dt bindingsSrinivas Kandagatla
This patch add DT bindings for ADM (Audio Device Manager) DSP module. This module implements mixer controls to setup the connections between AFE ports and ASM streams. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: qdsp6: dt-bindings: Add q6afe dt bindingsSrinivas Kandagatla
This patch add DT bindings for AFE (Audio Frontend) DSP module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: qdsp6: dt-bindings: Add q6core dt bindingsSrinivas Kandagatla
This patch add DT bindings for Q6CORE DSP module. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11soc: qcom: Add APR bus driverSrinivas Kandagatla
This patch adds support to APR bus (Asynchronous Packet Router) driver. APR driver is made as a bus driver so that the apr devices can added removed more dynamically depending on the state of the services on the dsp. APR is used for communication between application processor and QDSP to use services on QDSP like Audio and others. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org> Acked-by: Andy Gross <andy.gross@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11soc: qcom dt-bindings: Add APR bus bindingsSrinivas Kandagatla
This patch add dt bindings for Qualcomm APR (Asynchronous Packet Router) bus driver. This bus is used for communicating with DSP which provides audio and various other services to cpu. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: amd: removed separate byte count variables for playback and captureVijendar Mukunda
Removed separate byte count variables for playback and capture. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: amd: added byte count register offset variables to rtdVijendar Mukunda
Added byte count register offset variables to audio_substream_data structure. Modified dma pointer callback. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: amd: dma config parameters changesVijendar Mukunda
Added dma configuration parameters to rtd structure. Moved dma configuration parameters initialization to hw_params callback. Removed hard coding in prepare and trigger callbacks. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: cirrus: i2s: IRQ-based stream watchdogAlexander Sverdlin
I2S controller on EP93xx seems to have undocumented HW issue. According to "EP93xx User’s Guide", controller can handle underflow and either transmit last sample or zeroes in such case until FIFO is filled again. In reality undeflow conditions seem to confuse internal state machine from time to time and the whole stream gets shifted by one byte (as captured by logic analyser on the I2S outputs). One could only hear noise instead of original stream and this continues until the FIFO is disabled and enabled again. Work this around by watching underflow interrupt and resetting I2S TX channel + fill FIFO with zero samples until DMA catches up again. This is a nasty workaround, but it works. Hence, Kconfig option to disable it in case of problems. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ARM: ep93xx: i2s: Add IRQ to platform device resourcesAlexander Sverdlin
According to "EP93xx User’s Guide" it's called I2SINTR and has number 60. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: cirrus: i2s: Stop enabling I2S2 and I2S3 FIFOsAlexander Sverdlin
The driver never supported more than 2 channels because of ep93xx_i2s_dma_data[] supporting only 1 DMA channel in each direction. Stop enabling two unused I2S controller FIFOs, this will simplify future interrupt support. Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5645: Add platform-data for Lenovo Ideapad Mixx 320Hans de Goede
The Lenovo Ideapad Mixx 320 has a digital mic connected to DMIC2 add a DMI based quirk pointing to the intel_braswell_platform_data for devices with a mic on DMIC2. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5645: Add platform-data for Lenovo Ideapad Mixx 310Hans de Goede
The Lenovo Ideapad Mixx 310 has a differential internal analog mic, add platform-data for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: omap: Delete the obsolete omap-pcmPeter Ujfalusi
All DAI drivers are now using the new sdma-pcm platform driver. The omap-pcm can be removed from the tree, but we need to keep the SND_OMAP_SOC Kconfig option until the relevant defconfigs are updated to avoid regression due to missing audio. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: davinci-mcasp: Convert to use the sdma-pcm instead of omap-pcmPeter Ujfalusi
Use the new platform driver in case of sDMA. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: Intel: bytcr_rt5640: Use device-property for differential micsHans de Goede
Set the "realtek,in1-differential" or "realtek,in3-differential" device-property when the BYT_RT5640_DIFF_MIC quirk is set instead of directly poking the codec registers. This also fixes the BYT_RT5640_DIFF_MIC quirk not working when combined with BYT_RT5640_IN3_MAP. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: Intel: bytcr_rt5640: Configure PLL1 before using itHans de Goede
When platform_clock_control() first selects PLL1 as sysclk the PLL_CTRL registers have not been setup yet and we effectively have an invalid clock configuration until byt_rt5640_aif1_hw_params() gets called. Add a new byt_rt5640_prepare_and_enable_pll1() helper and use that from both platform_clock_control() and byt_rt5640_aif1_hw_params() to fix this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5640: Add button press supportHans de Goede
Enable button press detection for headsets by using the ovcd IRQ to get notified of button presses. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5640: Add jack-detect supportHans de Goede
Add jack-detect support, loosely based on earlier work on this by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Francisco mendez <francisco.mendez@intel.com> Note getting the OVCD to work reliable was sort of finicky, so there are quite a few comments on this to hopefully avoid people breaking it in the future. This (and the follow-up button press support) has been tested on the following devices: Acer Iconia Tab 8 W1-810 Asus T100CHI Asus T100TA Asus T200TA Axxo WT1011 Chuwi Vi8 Dell Venue 8 Pro 5830 HP Pavilion X2 10-n000nd HP Stream 7 I.T. Works TW891 Lamina I8270 MSI S100 Peaq C1010 Pipo W4 PoV MobiiTAB-P800W (v2.0) Toshiba Click Mini L9W-B BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196377 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5640: Allow specifying dmic data pins through device-propertiesHans de Goede
Allow specifying dmic data pins through device-properties / dt. This will allow us to stop exporting rt5640_dmic_enable() once all callers of it have been converted to setting device-properties for this instead. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5640: Move checking of device-properties to component probe callbackHans de Goede
On some platforms the platform code may need to add device-properties, rather then relying only on properties set by the firmware. This commit moves the parsing of the device-properties from the i2c-driver probe() function, which may be called at any time, to the component-driver probe() function, which gets called after the platform code calls snd_soc_register_card(). This allows the platform code to attach extra device-properties before the device-properties are parsed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5640: Remove unused rt5640_platform_dataHans de Goede
There are no in tree users of platform-data for the rt5640 codec driver, so lets remove support for it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5640: Add devicetree-bindings for dmic, jack-detectHans de Goede
Add devicetree-bindings for the dmic, jack-detect source and overcurrent- detect threshold settings. The dmic bindings mirror the existing bindings for the rt5645. The jd-src and ovcd bindings mirror the existing bindings for the rt5651. Cc devicetree@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: rt5640: Remove is_sys_clk_from_pll, it has ordering issuesHans de Goede
is_sys_clk_from_pll() is used as a snd_soc_dapm_route.connected callback, checking RT5640_GBL_CLK to determine if the sys-clk is PLL1 and thus the PWR_PLL bit in reg PWR_ANLG2 must be set. RT5640_GBL_CLK is changed by rt5640_set_dai_sysclk(), which gets called by the pre_pmu / post_pmd functions of the "Platform Clock" dapm-supply. This creates an ordering issue, during a dapm transition first all connected() callbacks are called to build a list of supplies to enable and then the complete list is walked to enable the supplies. Since the connected() check happens before enabling any supplies, is_sys_clk_from_pll() ends up deciding if the PWR_PLL bit should be set based on the state the "Platform Clock" supply had *before* the transition. This sometimes results in PWR_PLL being off, even though *after* the transition PLL1 is configured as sys-clk. This commit removes is_sys_clk_from_pll() instead simply setting / clearing PWR_PLL in rt5640_set_dai_sysclk() based on the selected sys-clk, which fixes this and as a bonus results in a nice cleanup. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-11ASoC: zx-i2s: fix spelling mistake: "timeing" -> "timing"Colin Ian King
Trivial fix to spelling mistake in dev_err message text Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: uniphier: add digital output volume for UniPhier sound systemKatsuhiro Suzuki
This patch adds controllers for digital volume of PCM output. Volume effects simply linear, not dB scale as follows: Gained PCM = Original * 0x4000 / Volume The value range of volume is from 0x0001 to 0xffff. 0x0000 works as mute. Initial value is 0x4000 (+0dB). Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: soc-core: remove legacy_dai_naming from snd_soc_register_dais()Kuninori Morimoto
We can get legacy dai name flag from component driver. Thus, there is no need to have its parameter on snd_soc_register_dais(). Let's remove unneeded parameter Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: soc-core: remove snd_soc_component_add_unlocked()Kuninori Morimoto
There is no user to call snd_soc_component_add_unlocked() anymore. Let's merge snd_soc_component_add_unlocked() and snd_soc_component_add(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: soc.h: merge CONFIG_DEBUG_FSKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: convert platform explanation to componentKuninori Morimoto
commit ef050bece1b55 ("ASoC: Remove platform code now everything is componentised") removed platform code, but it didn't care about platform documentation. This patch convert platform explanation to component Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: add component_list_show()Kuninori Morimoto
commit ef050bece1b55 ("ASoC: Remove platform code now everything is componentised") removed platform code, then platform_list_show() was removed, too. But we want to keep it as component_list_show. This patch add it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: remove Codec related codeKuninori Morimoto
Now no one is using Codec related code. Let's remove all Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: remove unneeded .pcm_new/freeKuninori Morimoto
commit ef050bece1b55 ("ASoC: Remove platform code now everything is componentised") removed platform code, but it didn't remove .pcm_new/free which existed only for platform. This patch remove these Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: remove .get_regmapKuninori Morimoto
To setup regmap, ALSA SoC has snd_soc_component_init_regmap() and .get_regmap. But these are duplicated feature. Now, no one is using .get_regmap, let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: remove codec reg_cacheKuninori Morimoto
Codec reg_cache is legacy feature, almost all driver are now using common regmap, and very few driver had been used this legacy feature. Because of this background, it is now implemented on each driver internally now. So now, no one is using codec reg_cache. Let's remove it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: remove codec hw_write/control_dataKuninori Morimoto
No one is using codec hw_write/control_data any more. Let's remove these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: omap-mcbsp: Convert to use the sdma-pcm instead of omap-pcmPeter Ujfalusi
Use the new platform driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: omap-mcpdm: Convert to use the sdma-pcm instead of omap-pcmPeter Ujfalusi
Use the new platform driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: omap-dmic: Convert to use the sdma-pcm instead of omap-pcmPeter Ujfalusi
Use the new platform driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: omap-hdmi-audio: Convert to use the sdma-pcm instead of omap-pcmPeter Ujfalusi
Use the new platform driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: omap: Introduce the generic_dmaengine_pcm based sdma-pcmPeter Ujfalusi
With the generic dmaengine_pcm support the omap-cpm can be replaced with a much smaller wrapper. CPU DAI drivers can use the: int sdma_pcm_platform_register(struct device *dev, char *txdmachan, char *rxdmachan); To register the platform driver, txdmachan/rxdmachan is only needed to be provided if the DMA channel names are not standard tx/rx, like in case of McPDM, or the DAI is only capable of one audio direction (DMIC, HDMI). This patch only introduces the source file and changes to the Kconfig/Makefile, but does not change any of the DAI drivers to use it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: uniphier: evea: use DAPM to change source of line-inKatsuhiro Suzuki
This patch replaces mixer switch to DAPM one for changing audio source of line-in. Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: nau8824: fix spelling mistake: "semaphone" -> "semaphore"Colin Ian King
Trivial fix to spelling mistake in dev_warn messages Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09ASoC: fix return value check in mt6351_codec_driver_probe()Wei Yongjun
In case of error, the function dev_get_regmap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-05media: i2c: tda1997: replace codec to componentKuninori Morimoto
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-05ASoC: rt5663: Optimize the power consumptionoder_chiou@realtek.com
The patch optimizes the power consumption. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-05ASoC: cs42xx8: Make the node name genericFabio Estevam
According to Devicetree Specification v0.2 document: "The name of a node should be somewhat generic, reflecting the function of the device and not its precise programming model." Do as suggested in the binding example. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>