aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-02-02ASoC: dapm: Only power up active channels from a DAICharles Keepax3-8/+94
Currently all widgets attached to a DAI link will be powered up when the DAI is active, however this may include routes that are not actually in use if there are unused channels available on the DAI. The macros for creating AIF widgets already include an entry for slot, it is proposed to change that to channel. The effective difference here being respresenting the logical channel index rather than the physical slot index. The CODECs currently using the slot entry on the DAPM_AIF macros are using it in a manner consistent with this, the CODECs not using it just have the field set to zero. A variable is added to snd_soc_dapm_widget to represent this channel index and then for each AIF widget attached to a DAI this is compared against the number of channels on the stream. Enabling the links for those which will be in use. This has the nice property that the CODECs which haven't used the slot/channel entry in the macro will function exactly as before due to all the AIF widgets having a channel of zero and a stream by definition having at least one channel. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-02-02ASoC: dapm: fix use-after-free issue with dailink snamePierre-Louis Bossart1-1/+18
Commit 7620fe9161ce ("ASoC: topology: fix memory leak in soc_tplg_dapm_widget_create") fixed a memory leak issue, but additional tests and KASAN reports show a use-after-free in soc-dapm. The widgets are created with a kmemdup operating on a template. The "name" string is also duplicated, but the "sname" string is not. As a result, when the template is freed after widget creation, its sname string is still used. Fix by explicitly duplicating the "sname" string, and freeing it when required. Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-02-02ASoC: mediatek: add btcvsd driverKaiChieh Chuang3-0/+1375
The driver function for transferring/receiving BT encoded data to/from BT firmware. Signed-off-by: KaiChieh Chuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-02-02ASoC: mediatek: add documents for btcvsd driverKaiChieh Chuang1-0/+24
document for btcvsd driver Signed-off-by: KaiChieh Chuang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-02-02ASoC: arizona: Add channel numbers to AIFsCharles Keepax5-158/+158
Set the channel number on each AIF widget to allow unused channels not to be powered up across AIFs. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-02-02ASoC: rsnd: fixup TDM Split mode check for CTUKuninori Morimoto1-13/+12
Renesas sound card need to judge that whether it is using "TDM Split mode". To judge it and for other purpose, it has rsnd_parse_connect_simple() and rsnd_parse_connect_graph(), but these are using different judgement policy for TDM Split mode. It is pointless and confusable. This patch add new rsnd_parse_tdm_split_mode() and use common judgement policy for simple-card/audio-graph. Without this patch, CTU will be judged as TDM Split mode on audio-graph card. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-02-02ASoC: rsnd: synchronize connection check for simple-card/audio-graphKuninori Morimoto1-8/+7
Current rsnd driver has below function to check connection rsnd_parse_connect_simple() rsnd_parse_connect_graph() But these have different parameters. This patch synchronize these for cleanup. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: sprd: Add Spreadtrum audio DMA platfrom driverBaolin Wang6-0/+589
The Spreadtrum DMA engine uses the link-list mode to support audio playback or capture, thus this patch adds audio DMA platform support for CPU DAI to trigger DMA link-list transfer. Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29dt-bindings: ASoC: Add Spreadtrum DMA platform documentationBaolin Wang1-0/+23
Add documentation for Spreadtrum DMA platform driver. Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: topology: modify dapm route loading routine and add dapm route unloadingRanjani Sridharan1-16/+86
struct snd_soc_dapm_route has been modified to be a dynamic object so that it can be used to save driver specific data while parsing topology and clean up driver-specific data during driver unloading. This patch makes the following changes to accomplish the above: 1. Set the dobj member of snd_soc_dapm_route during the SOC_TPLG_PASS_GRAPH pass of topology parsing. 2. Add the remove_route() routine that will be called while removing all dynamic objects from the component driver. Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: topology: add SND_SOC_DOBJ_GRAPH type for dapm routesRanjani Sridharan2-3/+6
Add a new dobj type SND_SOC_DOBJ_GRAPH for dapm routes and add snd_soc_dobj member to struct snd_soc_dapm_route. This enables device drivers to save driver specific data pertaining to dapm routes and also be able to clean up the data when the driver module is unloaded. Also, reorder the snd_soc_dobj_type types to align with matching topology header types. Signed-off-by: Ranjani Sridharan <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: topology: fix memory leak in soc_tplg_dapm_widget_createBard liao1-0/+3
template.sname and template.name are only freed when an error occur. They should be freed in the success return case, too. Signed-off-by: Bard liao <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: topology: Fix memory leak from soc_tplg_denum_create_textsAmadeusz Sławiński1-0/+3
dtexts is two dimensional array, so we also need to free it after freeing its fields. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: topology: Remove widgets from dobj listAmadeusz Sławiński1-0/+2
Currently when we unload and reload machine driver few times we end with corrupted list and try to cleanup no longer existing objects. Fix this by removing dobj from the list. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: topology: Reduce number of dereferences when accessing dobjAmadeusz Sławiński1-12/+12
We already have passed dobj, there is no reason to access it through containing structs. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: Intel: cht_bsw_rt5672: remove useless testPierre-Louis Bossart1-12/+9
For some reason we test if the machine is passed as a parameter before fixing up the codec name. This is unnecessary, generates false positives in static analysis tools and done only in this machine driver, remove and adjust indentation. Reported-by: Colin Ian King <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: cros_ec_codec: Add codec driver for Cros ECCheng-Yi Chiang4-0/+452
Add a codec driver to control ChromeOS EC codec. Use EC Host command to enable/disable I2S recording and control other configurations. Signed-off-by: Cheng-Yi Chiang <[email protected]> Reviewed-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29ASoC: Documentation: Add google, cros-ec-codecCheng-Yi Chiang2-0/+33
Add documentation for Chrome EC codec driver. Signed-off-by: Cheng-Yi Chiang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-29Merge tag 'v5.0-rc4' into asoc-5.1Mark Brown1146-6274/+11615
Linux 5.0-rc4
2019-01-29ASoC: wcd9335: Fix missing slimbus dependencyMark Brown1-0/+1
Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: apq8096: add slim supportSrinivas Kandagatla1-1/+70
Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: wcd9335: add audio routingsSrinivas Kandagatla1-0/+189
This patch adds audio routing for both playback and capture. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: wcd9335: add capture dapm widgetsSrinivas Kandagatla1-1/+1447
This patch adds required dapm widgets for capture path. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: wcd9335: add playback dapm widgetsSrinivas Kandagatla1-0/+1795
This patch adds required dapm widgets for playback. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: wcd9335: add basic controlsSrinivas Kandagatla1-0/+325
This patch adds basic controls found in wcd9335 codec. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: wcd9335: add CLASS-H Controller supportSrinivas Kandagatla4-1/+636
CLASS-H controller/Amplifier is common accorss Qualcomm WCD codec series. This patchset adds basic CLASS-H controller apis for WCD codecs after wcd9335 to use. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: wcd9335: add support to wcd9335 codecSrinivas Kandagatla4-0/+2134
Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC, It supports both I2S/I2C and SLIMbus audio interfaces. On slimbus interface it supports two data lanes; 16 Tx ports and 8 Rx ports. It has Seven DACs and nine dedicated interpolators, Seven (six audio ADCs, and one VBAT ADC), Multibutton headset control (MBHC), Active noise cancellation and Sidetone paths and processing. This patchset adds very basic support for playback and capture via the 9 interpolators and ADC respectively. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: dt-bindings: update wcd9335 bindings.Srinivas Kandagatla1-5/+5
This patch updates wcd9335 bindings with recommended properties. Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: glk_rt5682_max98357a: platform name fixup supportPierre-Louis Bossart1-4/+17
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: bxt_rt298: platform name fixup supportPierre-Louis Bossart1-0/+13
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: bxt_da7219_max98357a: platform name fixup supportPierre-Louis Bossart1-0/+13
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: cht_bsw_rt5672: platform name fixup supportPierre-Louis Bossart1-0/+9
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: cht_bsw_rt5645: platform name fixup supportPierre-Louis Bossart1-0/+9
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: cht_bsw_nau8824: platform name fixup supportPierre-Louis Bossart1-0/+12
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: cht_bsw_max98090_ti: platform name fixup supportPierre-Louis Bossart1-0/+12
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: bytcht_es8316: platform name fixup supportPierre-Louis Bossart1-0/+9
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: bytcht_da7213: platform name fixup supportPierre-Louis Bossart1-0/+8
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: bytcr_rt5651: platform name fixup supportPierre-Louis Bossart1-0/+9
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: bytcr_rt5640: platform name fixup supportPierre-Louis Bossart1-0/+9
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: bdw-rt5677: platform name fixup supportPierre-Louis Bossart1-0/+14
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: broadwell: platform name fixup supportPierre-Louis Bossart1-0/+16
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Intel: haswell: platform name fixup supportPierre-Louis Bossart1-0/+15
Add helper to override dailink platform name, if passed as parameter Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: add helper to change platform name for all dailinksPierre-Louis Bossart1-0/+31
To reuse the same machine drivers with Atom/SST, Skylake and SOF, we need to change the default platform_name (or platforms->name in the "modern" representation). So far, this override was done with an automatic override, which was broken by a set of changes for DT platforms related to deferred probe handling. This automatic override is actually not really needed, the machine driver can already receive the platform name as a platform_data parameter. This is used e.g. for HDaudio support where we have different PCI aliases used for different platforms. We can reuse the same mechanism and modify the machine drivers to override the dailinks prior to registrating the card. This will require additional work for SOF, but with this helper it'll be just two lines of additional code per machine driver which is reused, not the end of the world. This helper can be simplified when all drivers have transitioned to the "modern" representation of dailinks. Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: rt5651: Variable "ret" in function rt5651_i2c_probe() could be ↵Yizhuo1-1/+5
uninitialized In function rt5651_i2c_probe(), local variable "ret" could be uninitialized if function regmap_read() returns -EINVAL. However, this value is used in if statement. This is potentially unsafe. Signed-off-by: Yizhuo <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: soc-acpi: add static inline fallbacks when CONFIG_ACPI=nPierre-Louis Bossart1-7/+21
Fix compilation issues reported by 0day-Kbuild with sparc64 w/ SOF. Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: pcm512x: Fix clocking calculations when not using the PLLDimitris Papavasiliou1-2/+2
The rationale behind the current calculation is somewhat obscure [1] and can yield slightly wrong dividers in certain cases, which the machine drivers for some boards (like the HiFiBerry DAC+ Pro) seemingly try to circumvent, by updating the rate fraction so as to suit this calculation. The updated calculation should correctly yield the smallest bit clock rate that would fit the frame. [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2019-January/144219.html Signed-off-by: Dimitris Papavasiliou <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: pcm512x: Implement the set_bclk_ratio interfaceDimitris Papavasiliou1-4/+24
Some boards, such as the HiFiBerry DAC+ Pro, use a pair of external oscillators, to generate 44.1 or 48kHz multiples and are forced to resort to hacks [1] in order to support 24-bit data without ending up with fractional dividers. This patch allows the machine driver to use 32-bit frames for 24-bit data to avoid such issues. Although the datasheet (p. 15) seems to suggest that only a handful of ratios are supported, it's not very explicit about it, so we allow the full range of values supported by the underlying register in the callback, to avoid needlessly rejecting potentially usable configurations. [1] http://mailman.alsa-project.org/pipermail/alsa-devel/2018-December/143442.html Signed-off-by: Dimitris Papavasiliou <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: soc-core: use for_each_link_codecs() for dai_link codecs V2Kuninori Morimoto1-5/+4
We can use for_each_link_codecs() without waiting for_each_rtd_codec_dai() on soc_bind_dai_link(). Let's use for_each macro. Fixes: 50acc7e49 ("ASoC: core: Fix multi-CODEC setups") Fixes: 10dff9b0d ("ASoC: soc-core: use for_each_link_codecs() for dai_link codecs") Signed-off-by: Kuninori Morimoto <[email protected]> Tested-by: Sylwester Nawrocki <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-28ASoC: Fixup build error for mt6358Kuninori Morimoto1-1/+1
This patch fixup build error for commit 6a8d4198ca8 ("ASoC: mediatek: mt6358: add codec driver") Fixes: commit 6a8d4198ca8 ("ASoC: mediatek: mt6358: add codec driver") Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-01-27Linux 5.0-rc4Linus Torvalds1-1/+1