summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'sound-asoc/for-next'Stephen Rothwell2016-11-17164-3726/+18041
|\
| * Merge remote-tracking branch 'asoc/topic/wm9713' into asoc-nextMark Brown2016-11-151-4/+0
| |\
| | * ASoC: wm9713: Remove unused DAI ID definesLars-Peter Clausen2016-10-241-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used for matching instead and the defines are unused. The last user of these defines was removed in commit f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support"). So remove the defines as well. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| | \
| | \
| | \
| | \
| | \
| | \
| | \
| *-------. \ Merge remote-tracking branches 'asoc/topic/wm8580', 'asoc/topic/wm8753', ↵Mark Brown2016-11-1514-207/+241
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/wm8978', 'asoc/topic/wm9705' and 'asoc/topic/wm9712' into asoc-next
| | | | | | * | ASoC: wm9712: Remove unused DAI ID definesLars-Peter Clausen2016-10-246-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used for matching instead and the defines are unused. The last user of these defines was removed in commit f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support"). So remove the defines as well. This also means the wm9712.h file no longer has any content and can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | ASoC: wm9712: Remove ac97_read/ac97_write wrappersLars-Peter Clausen2016-10-211-26/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the regmap conversion ac97_read/ac97_write are just simple wrappers around snd_soc_read/snd_soc_write. Use those instead directly and remove the wrappers. Also use snd_soc_update_bits() were appropriate. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | ASoC: wm9712: Convert to regmapLars-Peter Clausen2016-10-212-65/+79
| | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the wm9712 driver still uses custom snd_soc_codec_driver IO callbacks. This has been deprecated for a while, so convert the wm9712 driver to use regmap for its IO. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Marek Vasut <marex@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: wm9705: Remove unused DAI ID definesLars-Peter Clausen2016-10-244-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used for matching instead and the defines are unused. The last user of these defines was removed in commit f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component Support"). So remove the defines as well. This also means the wm9705.h file no longer has any content and can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: wm9705: Remove ac97_read/ac97_write wrappersLars-Peter Clausen2016-10-241-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the regmap conversion ac97_read/ac97_write are just simple wrappers around snd_soc_read/snd_soc_write. Use those instead directly and remove the wrappers. Also use snd_soc_update_bits() where appropriate. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: wm9705: Convert to regmapLars-Peter Clausen2016-10-242-60/+64
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the wm9712 driver still uses custom snd_soc_codec_driver IO callbacks. This has been deprecated for a while, so convert the wm9705 driver to use regmap for its IO. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * / ASoC: wm8978: Adjust clock indices so that simple card worksMaxime Ripard2016-11-091-1/+1
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using simple-card with the wm8978 doesn't work because simple card calls set_sysclk on the clock index 0, which is not the MCLK in the WM8978. Adjust the clock definition so that the clock 0 is the MCLK. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * / ASoC: wm8753: Remove unused DAI ID definesLars-Peter Clausen2016-10-241-3/+0
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DAI ID defines are back from the time when DAIs were referenced by a numerical ID. These days a string is used for matching instead and the defines are unused. These particular IDs were never used and presumably never will be, so remove them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: wm8580: Fix non static symbol warningsWei Yongjun2016-10-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the following sparse warnings: sound/soc/codecs/wm8580.c:988:33: warning: symbol 'wm8580_data' was not declared. Should it be static? sound/soc/codecs/wm8580.c:992:33: warning: symbol 'wm8581_data' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: wm8580: Add the wm8581 codec to the driverMatt Flax2016-10-242-10/+90
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the wm8581 codec to the wm8580 driver. The wm8581 codec hardware adds a fourth DAC and otherwise is compatible with the wm8580 codec. of_device_id data is used to allow the driver to select the suitable DAC count specified in the device tree codec selection. The wm8580_driver_data struct is used to store the number of DACs. The snd_soc_dai_driver no longer lists the channels_max for the playback substream. This variable is set during the i2c probe from the of_device_id supplied wm8580_driver_data struct. With knowledge of the number of DACs in use, the DAC4 controls, widgets and routes are added as required for DAC4. The device tree documentation for the wm8580 is altered to list the wm8581 codec support, as is the Kconfig file. Signed-off-by: Matt Flax <flatmax@flatmax.org> Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| | \
| | \
| | \
| | \
| | \
| | \
| | \
| *-------. \ Merge remote-tracking branches 'asoc/topic/sunxi', 'asoc/topic/tegra', ↵Mark Brown2016-11-1515-160/+1261
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/tlv320aic31xx', 'asoc/topic/topology' and 'asoc/topic/wm2200' into asoc-next
| | | | | | * | ASoC: wm2200: Correct types of mixer texts and valuesCharles Keepax2016-11-101-2/+2
| | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core expects "const char * const" and "unsigned int" for enum controls, the mixer control definitions in wm2200 use "const char *" and "int". This patch corrects the type of these arrays. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Check name strings of physical DAI linksMengdong Lin2016-11-091-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if the name strings are properly terminated, and only use valid name strings to find existing physical DAI links to configure. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: ABI - Add voice wake up flag for DAI linksMengdong Lin2016-11-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new flag bit SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP to link flags. If a link is used for voice wake up, users can set this flag bit and topology will set the link's 'ignore_suspend' to true. This ABI update is backward compatible. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Rename functions & variables for physical DAIsMengdong Lin2016-11-041-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code refactoring. These functions and variables are for configuring physical DAIs, not only backend DAIs since users may not need DPCM. So remove 'be' from the function names, and rename variables 'be' to 'd' or 'dai'. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: ABI - Rename struct and type for physical DAIsMengdong Lin2016-11-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the ABI struct and type because they are for configuring physical DAIs, not only backend DAIs since users may not need DPCM: - Rename struct snd_soc_tplg_be_dai to snd_soc_tplg_dai. - Rename type SND_SOC_TPLG_TYPE_BE_DAI to SND_SOC_TPLG_TYPE_DAI. This code refactoring is backward compatible because: - Both layout of the struct and type value has no change. Kernel can find the same type value and map to same data layout. - This struct is not in ABI v4 at all. Now the user space uses ABI v4. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Rename the function to create a FE linkMengdong Lin2016-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just code refactoring. The function soc_tplg_link_create() will create a front end link, not a physical link. So rename it to soc_tplg_fe_link_create(). Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Add support to configure existing physical DAI linksMengdong Lin2016-11-041-2/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Topology will find an existing physical link (including BE link for DPCM) by checking its ID, name and stream name, and configure its physical audio format and flags. This support is backward compatible for old ABI v4. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: Define API to find a dai linkMengdong Lin2016-11-041-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the API to find an existing DAI link of the soc card by matching the ID, name and stream name. Some cards may use unique ID for each DAI link, so matching ID is enough, and name or stream name are not necessary. But user need to specify name or stream name as well if not sure whether link ID is unique since most cards use 0 as the default link ID. Topology can use this API to find an existing BE link and configure it. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: ABI - Add flags and private data to PCMMengdong Lin2016-11-031-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the remaining update to PCM ABI object of version 5. The flags will be applied to FE (Front End) links and can also be used by physical links. The private data is reserved for future extension, so offset update will add the private data size. Now user space is using ABI v4, and the previous patch "ASoC: topology: make PCM backward compatible from ABI v4" can assure the backward compatibility. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Support topology file of ABI v4Mengdong Lin2016-11-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users start to use topology ABI from v4. ABI v5 updated existing manifest and PCM elements. Two previous patches can support these ABI updates in a backward compatible way. So if the topology file from user space is generated by ABI v4, kernel will no longer quit but continue parsing. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Only use valid names of PCM for the kernel DAI & DAI linkMengdong Lin2016-11-031-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User space may not always set a valid FE DAI driver's name, FE DAI link's name, stream name or cpu DAI name. In such cases, there are all ZERO in these name string buffers of a topology PCM object. This patch will only duplicate valid name strings for kernel FE DAI driver and DAI link when creating them from topology, and free the name strings when destroying them. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Make PCM backward compatible from ABI v4Mengdong Lin2016-11-031-12/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for old version 4 of PCMs (FE DAI & DAI links). Topology ABI v5 added new fields to stream caps and thus changed PCMs. Since user space may still uses v4, kernel will check the ABI version by comparing the object size. If user space uses v4 of PCMs, kernel will create the latest version of PCMs from the old version, and use the new version internally to create FE DAI & DAI links. Because these new created PCM elements will be freed later, kernel need duplicate the name strings of DAI driver and DAI links when creating them. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | ASoC: topology: Make manifest backward compatible from ABI v4Mengdong Lin2016-10-281-8/+79
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for old version 4 of manifest. Topology ABI v5 added new fields to manifest while user space may still uses v4. So kernel will check the ABI version by comparing the object size. If user space uses v4 of manifest, kernel will create a latest version of manifest from the old one, and use the new one internally and free it later. Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | ASoC: tlv320aic31xx: Add support for tlv320dac3101Peter Ujfalusi2016-11-122-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DAC3101 is mostly identical to DAC3100 with the exception that it has stereo speaker AMP instead of mono used in DAC3100. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | ASoC: tlv320aic31xx: Add missing of_device_id for dac3100Peter Ujfalusi2016-11-101-0/+1
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compatible table was not updated when the support for DAC3100 was added. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * / ASoC: tegra: constify snd_soc_ops structuresJulia Lawall2016-10-248-8/+8
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for snd_soc_ops structures that are only stored in the ops field of a snd_soc_dai_link structure. This field is declared const, so snd_soc_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_soc_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_dai_link e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i, e; position p; @@ struct snd_soc_dai_link e[] = { ..., { .ops = &i@p, }, ..., }; @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_soc_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_soc_ops i = { ... }; // </smpl> The effect on the layout of the .o files is shown by the following output of the size command, first before then after the transformation: text data bss dec hex filename 3143 1888 384 5415 1527 sound/soc/tegra/tegra_alc5632.o 3191 1840 384 5415 1527 sound/soc/tegra/tegra_alc5632.o text data bss dec hex filename 3672 2176 768 6616 19d8 sound/soc/tegra/tegra_max98090.o 3720 2128 768 6616 19d8 sound/soc/tegra/tegra_max98090.o text data bss dec hex filename 2770 1856 384 5010 1392 sound/soc/tegra/tegra_rt5640.o 2818 1808 384 5010 1392 sound/soc/tegra/tegra_rt5640.o text data bss dec hex filename 4412 2176 768 7356 1cbc sound/soc/tegra/tegra_rt5677.o 4460 2128 768 7356 1cbc sound/soc/tegra/tegra_rt5677.o text data bss dec hex filename 2442 1536 0 3978 f8a sound/soc/tegra/tegra_sgtl5000.o 2490 1480 0 3970 f82 sound/soc/tegra/tegra_sgtl5000.o text data bss dec hex filename 2105 1536 0 3641 e39 sound/soc/tegra/tegra_wm8753.o 2153 1480 0 3633 e31 sound/soc/tegra/tegra_wm8753.o text data bss dec hex filename 3755 1888 768 6411 190b sound/soc/tegra/tegra_wm8903.o 3803 1840 768 6411 190b sound/soc/tegra/tegra_wm8903.o text data bss dec hex filename 2121 1536 0 3657 e49 sound/soc/tegra/trimslice.o 2169 1480 0 3649 e41 sound/soc/tegra/trimslice.o Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: sun4i-codec: fix semicolon.cocci warningskbuild test robot2016-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sound/soc/sunxi/sun4i-codec.c:1339: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: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: sun4i-codec: Add support for optional reset control to quirksChen-Yu Tsai2016-11-091-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The later Allwinner SoCs have a dedicated reset controller, and peripherals have dedicated reset controls which need to be deasserted before the associated peripheral can be used. Add support for this to the quirks structure and probe/remove functions. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: sun4i-codec: Add support for A31 ADC capture pathChen-Yu Tsai2016-11-091-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The A31's internal codec capture path has a mixer in front of the ADC for each channel, capable of selecting various inputs, including microphones, line in, phone in, and the main output mixer. This patch adds the various controls, widgets and routes needed for audio capture from the already supported inputs on the A31. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: sunxi: i2s: Implement set_sysclkMaxime Ripard2016-11-091-15/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our i2s driver, we were previously trying to guess which oversample the user wanted to use by looking at the rate and trying to max it. However, the cards, and especially simple-card with its mclk-fs property will already provide the expected oversample ratio by using the set_sysclk callback. We can thus implement it and remove the logic to deal with the runtime guess. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: sun4i-codec: Add support for A31 board level audio routingChen-Yu Tsai2016-11-041-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The A31 SoC's codec has various inputs, outputs and microphone bias supplies. These can be routed on the board in different ways, such as: - HPCOM may be connected to have the headphone DC coupled. - Microphones all use the MBIAS main microphone supply or one mic may use the HBIAS supply, which supports headset detection and buttons. - Line Out may be routed to an audio jack, or an onboard speaker amp with power controls. Add support for specifying the audio routes in the device tree. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: sun4i-codec: Add support for A31 analog microphone inputsChen-Yu Tsai2016-11-041-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The A31 internal codec has 3 microphone outputs, of which MIC2 and MIC3 are muxed internally. The resulting two microphone inputs have separate gain controls and mixer inputs. The codec also has 2 microphone bias pins. HBIAS is specifically for the headphone jack, which also supports headphone detection and control buttons. These extra functions are not supported yet. The other, MBIAS, is for all other analog microphones. There is also mention of digital microphone support, but documentation is scarce, and no hardware with it is available. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: sun4i-codec: Add support for A31 Line Out playbackChen-Yu Tsai2016-11-041-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The A31 integrated codec has a second "Line Out" output which does not include an integrated amplifier in its path. This path does have a separate volume control. This patch adds support for the playback path from the DAC to the Line Out pins. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | Merge branch 'topic/dapm' of ↵Mark Brown2016-11-045-35/+127
| | |\ \ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi
| | * | | ASoC: sun4i-codec: Add support for A31 Line In playbackChen-Yu Tsai2016-11-031-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The A31 integrated codec has a stereo "Line In" input. Add support for it to the playback paths. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: sun4i-codec: Add support for A31 playback through headphone outputChen-Yu Tsai2016-11-031-4/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The A31 has a similar codec to the A10/A20. The PCM parts are very similar, with different register offsets. The analog paths are very different. There are more inputs and outputs. The ADC mux has been replaced with a proper mixer. This patch adds support for the basic playback path of the A31 codec, from the DAC to the headphones. Headphone detection, microphone, signaling, other inputs/outputs and capture will be added later. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: sun4i-codec: Increase DMA max burst to 8Chen-Yu Tsai2016-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the DMA engine API documentation, maxburst denotes the largest possible size of a single transfer, so as not to overflow destination FIFOs as explained in this excerpt from dmaengine.h * @src_maxburst: the maximum number of words (note: words, as in * units of the src_addr_width member, not bytes) that can be sent * in one burst to the device. Typically something like half the * FIFO depth on I/O peripherals so you don't overflow it. This * may or may not be applicable on memory sources. * @dst_maxburst: same as src_maxburst but for destination target * mutatis mutandis. The TX FIFO is 64 samples deep for stereo, and the RX FIFO is 16 samples deep. So maxburst could be 32 and 8 for TX and RX respectively. Unfortunately the sunxi DMA controller driver takes maxburst as the requested burst size, rather than a limit, and returns an error for unsupported values. The original value was 4, but some later SoCs do not officially support this burst size. This patch increases maxburst on the TX side to 8, which is supported by all variants of the sunxi DMA controller. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: sun4i-codec: Expand quirks to handle register offsets and card creationChen-Yu Tsai2016-11-031-27/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The A31 has a similar codec to the A10/A20. The PCM parts are very similar, with just different register offsets. The analog paths are very different. There are more inputs and outputs. The A31s, A23, and H3 have a similar PCM interface, again with register offsets slightly rearranged. The analog path controls, while very similar between them and the A31, have been moved a separate bus which is accessed through a message box like interface in the PRCM address range. This would be handled by a separate auxiliary device tied in through the device tree in its supporting create_card function. The quirks structure is expanded to include different register offsets and separate callbacks for creating the ASoC card. The regmap_config, quirks, and of_device_match tables have been moved to facilitate this. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | Merge branch 'fix/sunxi' of ↵Mark Brown2016-11-031-6/+6
| | |\ \ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi
| | * | | | ASoC: sun4i-codec: Revise comments for register definition macrosChen-Yu Tsai2016-11-031-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This revises existing comments in the register definition macros section, and adds a few more, so that readers can clearly identify the types of control registers. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: sun4i-codec: Move data structures to add create_card call to quirksChen-Yu Tsai2016-11-031-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The audio codec on later Allwinner SoCs have a different layout and audio path compared to the A10/A20. However the PCM parts are still the same. The different layout and audio paths mean we need a different create_card function for different families, so they can create DAPM endpoint widgets and routes. This patch moves the regmap configs, quirks and of_device_id structures to just before the probe function, so we can, among other things, include a pointer for the create_card function. None of the lines of code were changed. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: sun4i-i2s: Implement capture supportMaxime Ripard2016-11-031-3/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i2s driver was only implementing playback for now. Implement capture to make sure that's not a limitation anymore. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | |
| | \ \ \ \
| | \ \ \ \
| | \ \ \ \
| | \ \ \ \
| | \ \ \ \
| | \ \ \ \
| | \ \ \ \
| *-------. \ \ \ \ Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/simple', ↵Mark Brown2016-11-1522-1524/+295
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/stac9766', 'asoc/topic/sti' and 'asoc/topic/sti-codec' into asoc-next
| | | | | | * | | | | ASoC: sti-sas: add missing return in messages stringsArnaud Pouliquen2016-10-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | ASoC: sti-sas: clean legacy in sti-sasArnaud Pouliquen2016-10-261-154/+15
| | | | | | | |_|_|/ | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stih416 is no more supported, clean associated code. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>