summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-02-26ASoC: Add initial support for multiple CPU DAIsShreyas NC2-77/+106
ASoC core supports multiple codec DAIs but supports only a CPU DAI. To support multiple cpu DAIs, add cpu_dai and num_cpu_dai in snd_soc_dai_link and snd_soc_pcm_runtime structures similar to support for codec_dai. This is intended as a preparatory patch to eventually support the unification of the Codec and CPU DAI. Inline with multiple codec DAI approach, add support to allocate, init, bind and probe multiple cpu_dai on init if driver specifies that. Also add support to loop over multiple cpu_dai during suspend and resume. This is intended as a preparatory patch to eventually unify the CPU and Codec DAI into DAI components. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Shreyas NC <shreyas.nc@intel.com> Link: https://lore.kernel.org/r/20200225133917.21314-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: Intel: mrfld: fix incorrect check on p->sinkColin Ian King1-1/+1
The check on p->sink looks bogus, I believe it should be p->source since the following code blocks are related to p->source. Fix this by replacing p->sink with p->source. Fixes: 24c8d14192cc ("ASoC: Intel: mrfld: add DSP core controls") Signed-off-by: Colin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Copy-paste error") Link: https://lore.kernel.org/r/20191119113640.166940-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25Merge branch 'for-5.6' of ↵Mark Brown18-419/+204
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
2020-02-25ASoC: soc-pcm cleanup step4Mark Brown7-281/+241
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: Hi Mark These are soc-pcm cleanup step4. [01/13] - [06/13] are posted but not yet accepted patches. To avoid conflict, I merged these into step4. These patches are already received Reviewed-by from Pierre-Louis. Subject: [PATCH 0/6] ASoC: use for_each_rtd_codec_dai() macro Date: Thu, 13 Feb 2020 13:08:07 +0900 Kuninori Morimoto (13): 1) ASoC: soundwaire: qcom: use for_each_rtd_codec_dai() macro 2) ASoC: qcom: sdm845: use for_each_rtd_codec_dai() macro 3) ASoC: qcom: apq8016_sbc: use for_each_rtd_codec_dai() macro 4) ASoC: intel: cml_rt1011_rt5682: use for_each_rtd_codec_dai() macro 5) ASoC: intel: kbl_da7219_max98927: use for_each_rtd_codec_dai() macro 6) ASoC: mediatek: mt8183-da7219-max98357: use for_each_rtd_codec_dai() macro 7) ASoC: soc-pcm: add snd_soc_dai_get_pcm_stream() 8) ASoC: soc-pcm: cleanup soc_pcm_apply_msb() 9) ASoC: soc-pcm: add snd_soc_dai_get_widget() 10) ASoC: soc-pcm: merge dpcm_run_new/old_update() into dpcm_fe_runtime_update() 11) ASoC: soc-pcm: move dpcm_path_put() to soc-pcm.c 12) ASoC: soc-pcm: move CONFIG_DEBUG_FS functions to top side 13) ASoC: soc-pcm: add dpcm_create/remove_debugfs_state() drivers/soundwire/qcom.c | 7 +- include/sound/soc-dai.h | 15 + include/sound/soc-dapm.h | 1 + include/sound/soc-dpcm.h | 7 +- sound/soc/intel/boards/cml_rt1011_rt5682.c | 3 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 8 +- sound/soc/intel/skylake/skl-pcm.c | 10 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 8 +- sound/soc/qcom/apq8016_sbc.c | 7 +- sound/soc/qcom/sdm845.c | 20 +- sound/soc/soc-dai.c | 7 +- sound/soc/soc-dapm.c | 20 +- sound/soc/soc-pcm.c | 462 ++++++++---------- 13 files changed, 266 insertions(+), 309 deletions(-) -- 2.17.1 Thank you for your help !! Best regards --- Kuninori Morimoto
2020-02-25ASoC: soc-pcm: fix state tracking error in snd_soc_component_open/close()Kai Vehmanen3-39/+30
ASoC component open/close and snd_soc_component_module_get/put are called independently for each component-substream pair, so the logic added in commit dd03907bf129 ("ASoC: soc-pcm: call snd_soc_component_open/close() once") was not sufficient and led to PCM playback and module unload errors. Implement handling of failures directly in soc_pcm_components_open(), so that any successfully opened components are closed upon error with other components. This allows to clean up error handling in soc_pcm_open() without adding more state tracking. Fixes: dd03907bf129 ("ASoC: soc-pcm: call snd_soc_component_open/close() once") Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20200220094955.16968-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: soc-pcm: add dpcm_create/remove_debugfs_state()Kuninori Morimoto1-17/+34
soc-pcm.c has implementation which depends on CONFIG_DEBUG_FS. But, we don't want to have random #ifdef. This patch adds dpcm_create/remove_debugfs_state() and care it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/877e0jjc9b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: soc-pcm: move CONFIG_DEBUG_FS functions to top sideKuninori Morimoto1-138/+138
This is prepare for CONFIG_DEBUG_FS cleanup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878skzjc9k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: soc-pcm: move dpcm_path_put() to soc-pcm.cKuninori Morimoto4-6/+17
dpcm_path_put() (A) is calling kfree(*list). The freed list is created by dapm_widget_list_create() (B) which is called from snd_soc_dapm_dai_get_connected_widgets() (C) which is called from dpcm_path_get() (D). (B) dapm_widget_list_create(**list, ...) { ... => *list = kzalloc(); ... } (C) snd_soc_dapm_dai_get_connected_widgets(..., **list, ...) { ... dapm_widget_list_create(list, ...); ... } (D) dpcm_path_get(..., **list) { ... snd_soc_dapm_dai_get_connected_widgets(..., list, ...); ... } (A) dpcm_path_put(**list) { => kfree(*list); } This kind of unbalance code is very difficult to read/understand. To avoid this issue, this patch adds each missing paired function dapm_widget_list_free() for dapm_widget_list_create() (B), and snd_soc_dapm_dai_free_widgets() for snd_soc_dapm_dai_get_connected_widgets() (C). This patch uses these, and moves dpcm_path_put() next to dpcm_path_get(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87a75fjc9q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: soc-pcm: merge dpcm_run_new/old_update() into dpcm_fe_runtime_update()Kuninori Morimoto1-28/+7
soc-pcm has dpcm_run_new/old_update(), but these are used from dpcm_fe_runtime_update() only, and are very verbose functions. This patch disassembles these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87blpvjc9v.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: soc-pcm: add snd_soc_dai_get_widget()Kuninori Morimoto4-29/+16
soc-pcm.c has dai_get_widget(), but it can be more generic. This patch renames it to snd_soc_dai_get_widget(), and use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87d0abjca1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: soc-pcm: cleanup soc_pcm_apply_msb()Kuninori Morimoto1-17/+12
soc_pcm_apply_msb() apply msb for CPU/Codec, but, it has duplicate code. The difference is only SNDRV_PCM_STREAM_PLAYBACK and SNDRV_PCM_STEAM_CAPTURE. It is very verbose and duplicate code. This patch simplify code by using snd_soc_dai_get_pcm_stream(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87eeurjca6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-25ASoC: soc-pcm: add snd_soc_dai_get_pcm_stream()Kuninori Morimoto3-46/+17
DAI driver has playback/capture stream. OTOH, we have SNDRV_PCM_STREAM_PLAYBACK/CAPTURE. Because of this kind of implementation, ALSA SoC needs to have many verbose code. To solve this issue, this patch adds snd_soc_dai_get_pcm_stream() macro to get playback/capture stream pointer from stream. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ftf7jcab.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-24ASoC: Intel: Skylake: Fix available clock counter incrementationAmadeusz Sławiński1-1/+3
Incrementation of avail_clk_cnt was incorrectly moved to error path. Put it back to success path. Fixes: 6ee927f2f01466 ('ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev') Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200224125202.13784-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-24ASoC: soc-pcm/soc-compress: don't use snd_soc_dapm_stream_stop()Kuninori Morimoto2-2/+2
commit b0edff42360ab4 ("ASoC: soc-pcm/soc-compress: use snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP") uses snd_soc_dapm_stream_stop() for soc_compr_free_fe() and dpcm_fe_dai_shutdown() because it didn't care about pmdown_time. But, it didn't need to care. This patch rollback to original code. Some system will wait unneeded timed-out without this patch. Special Thanks for reporting to Chris Gorman. ... intel_sst_acpi 808622A8:00: Wait timed-out condition:0x0, msg_id:0x1 fw_state 0x3 intel_sst_acpi 808622A8:00: fw returned err -16 sst-mfld-platform sst-mfld-platform: ASoC: PRE_PMD: pcm0_in event failed: -16 ... Fixes: commit b0edff42360ab4 ("ASoC: soc-pcm/soc-compress: use snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP") Reported-by: Chris Gorman <chrisjohgorman@gmail.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87lfowspeb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-24ASoC: meson: aiu: fix semicolon.cocci warningskbuild test robot1-1/+1
sound/soc/meson/aiu-encoder-i2s.c:129:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 3e25c44598aa ("ASoC: meson: aiu: add support for the Meson8 and Meson8b SoC families") Signed-off-by: kbuild test robot <lkp@intel.com> CC: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Link: https://lore.kernel.org/r/20200222170154.GA119396@e50d7db646c3 Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-24ASoC: Fix SND_SOC_ALL_CODECS imply ac97 falloutGeert Uytterhoeven1-0/+3
On i386 randconfig: sound/soc/codecs/wm9705.o: In function `wm9705_soc_resume': wm9705.c:(.text+0x128): undefined reference to `snd_ac97_reset' sound/soc/codecs/wm9712.o: In function `wm9712_soc_resume': wm9712.c:(.text+0x2d1): undefined reference to `snd_ac97_reset' sound/soc/codecs/wm9713.o: In function `wm9713_soc_resume': wm9713.c:(.text+0x820): undefined reference to `snd_ac97_reset' Fix this by adding the missing dependencies on SND_SOC_AC97_BUS. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20200224112537.14483-1-geert@linux-m68k.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: tlv320adcx140: Add decimation filter supportDan Murphy1-0/+18
Add decimation filter selection support. Per Section 8.3.6.7 the Digital Decimation Filter is selectable between a Linear Phase, Low Latency, and Ultra Low Latency filer. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200221181358.22526-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: tlv320adcx140: Add DRE and AGC supportDan Murphy2-0/+56
The TLV320ADCx140 parts support Dynamic Range Enhancer (DRE) as defined in Section 8.3.2 of the data sheets. The DRE achieves a complete-channel dynamic range as high as 120 dB. At a system level, the DRE scheme enables far-field, high-fidelity recording of audio signals in very quiet environments and low-distortion recording in loud environments. There are 2 enables for DRE. The first is a global setting that enables the DRE engine in the device and the other enable is per channel. If the DRE is enabled globally then either DRE or AGC can be used per each configured channel. If global DRE is disabled then even setting the DRE enable bit in the channel config register will have no effect. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200221181358.22526-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: meson: axg-card: add toacodec supportJerome Brunet1-1/+2
Make sure the axg audio card driver recognise the dai_link as a codec-to-codec link if the cpu dai is the internal dac glue. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200221153607.1585499-4-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: meson: g12a: add internal DAC glue driverJerome Brunet3-0/+263
Add support for the internal audio DAC glue found on the Amlogic g12a and sm1 SoC families. This allows to connect the TDM outputs of the SoC to the internal t9015 audio DAC. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200221153607.1585499-3-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: meson: g12a: add toacodec dt-binding documentationJerome Brunet2-0/+61
Add the DT bindings and documentation of the internal audio DAC glue found on Amlogic g12a and sm1 SoC families Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200221153607.1585499-2-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: tas2562: Add support for digital volume controlDan Murphy2-2/+82
Add support for digital volume control. There is no dedicated register for volume control but instead there are 4. The values of the registers are determined with exponential floating point math. So a table was created with register values for 2dB step increments from -110dB to 0dB. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200221124151.8774-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: sun8i-codec: Remove unused dev from codec structSamuel Holland1-3/+0
This field is not used anywhere in the driver, so remove it. Fixes: 36c684936fae ("ASoC: Add sun8i digital audio codec") Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-by: Chen-Yu Tsai <wens@csie.org> Link: https://lore.kernel.org/r/20200217064250.15516-5-samuel@sholland.org Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: meson: aiu: add support for the Meson8 and Meson8b SoC familiesMartin Blumenstingl4-23/+81
The AIU audio controller on the Meson8 and Meson8b SoC families is compatible with the one found in the later GXBB family. Add compatible strings for these two older SoC families so the driver can be loaded for them. Instead of using the I2S divider from the AIU_CLK_CTRL_MORE register we need to use the I2S divider from the AIU_CLK_CTRL register. This older register is less flexible because it only supports four divider settings (1, 2, 4, 8) compared to the AIU_CLK_CTRL_MORE register (which supports dividers in the range 0..64). Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200220205711.77953-4-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: meson: aiu: introduce a struct for platform specific informationMartin Blumenstingl2-3/+21
Introduce a struct aiu_platform_data to make the driver aware of platform specific information. Convert the existing check for the internal stereo audio codec (only available on GXL) to this new struct. Support for the 32-bit SoCs will need this as well because the AIU_CLK_CTRL_MORE register doesn't have the I2S divider bits (and we need to use the I2S divider from AIU_CLK_CTRL instead). Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200220205711.77953-3-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: meson: aiu: Document Meson8 and Meson8b support in the dt-bindingsMartin Blumenstingl1-0/+2
The AIU audio output controller on the Meson8 and Meson8b SoC families is compatible with the one found in the GXBB family. Document the compatible string for these two older SoCs. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200220205711.77953-2-martin.blumenstingl@googlemail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: meson: g12a: add tohdmitx resetJerome Brunet1-0/+6
Reset the g12a hdmi codec glue on probe. This ensure a sane startup state. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200221121146.1498427-1-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver familyDan Murphy4-0/+990
Add the tlv320adcx140 codec driver family. The TLV320ADCx140 is a Burr-Brown™ highperformance, audio analog-to-digital converter (ADC) that supports simultaneous sampling of up to four analog channels or eight digital channels for the pulse density modulation (PDM) microphone input. The device supports line and microphone inputs, and allows for both single-ended and differential input configurations. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200220210759.31466-3-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21dt-bindings: sound: Add TLV320ADCx140 dt bindingsDan Murphy1-0/+83
Add dt bindings for the TLV320ADCx140 Burr-Brown ADC. The initial support is for the following: TLV320ADC3140 - http://www.ti.com/lit/gpn/tlv320adc3140 TLV320ADC5140 - http://www.ti.com/lit/gpn/tlv320adc5140 TLV320ADC6140 - http://www.ti.com/lit/gpn/tlv320adc6140 Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200220210759.31466-2-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-21ASoC: pcm512x: Fix unbalanced regulator enable call in probe error pathMatthias Reichl1-3/+5
When we get a clock error during probe we have to call regulator_bulk_disable before bailing out, otherwise we trigger a warning in regulator_put. Fix this by using "goto err" like in the error cases above. Fixes: 5a3af1293194d ("ASoC: pcm512x: Add PCM512x driver") Signed-off-by: Matthias Reichl <hias@horus.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200220202956.29233-1-hias@horus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-20ASoC: SOF: Intel: hda: allow operation without i915 gfxKai Vehmanen2-15/+18
Add support to configure the HDA controller with an external HDA codec even if iDisp codec in i915 is not available. This can happen for multiple reasons: - internal graphics is disabled on the system - i915 driver is not enabled in kernel or it fails to init - i915 codec reports error in HDA codec probe - HDA codec driver probe fails Address all these scenarios, but keep using the existing topology. In case failures occur, HDMI PCM nodes are created, but they will report error if application tries to use them. No ALSA mixer controls are created. If the external HDA codec init fails as well, SOF probe will return error as before. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206085 BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1163677 BugLink: https://github.com/thesofproject/linux/issues/1658 Link: https://lore.kernel.org/r/20200220171028.22023-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-20ASoC: intel/skl/hda - add no-HDMI cases to generic HDA driverKai Vehmanen2-5/+24
Extend the generic HDA driver to support systems where iDisp/HDMI audio codecs are disabled for some reason. Switch codecs to SoC dummy in the affected DAI links. This allows to reuse existing topologies for this case. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206085 BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1163677 BugLink: https://github.com/thesofproject/linux/issues/1658 Link: https://lore.kernel.org/r/20200220171028.22023-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-20ASoC: samsung: Update dependencies for Arizona machine driversCharles Keepax1-2/+2
Currently it is possible to get the following bad config: WARNING: unmet direct dependencies detected for SND_SOC_WM5110 Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && MFD_WM5110 [=n] commit ea00d95200d0 ("ASoC: Use imply for SND_SOC_ALL_CODECS") commit d8dd3f92a6ba ("ASoC: Fix SND_SOC_ALL_CODECS imply misc fallout") After these two patches the machine drivers still selects the SND_SOC_WM5110 symbol which doesn't take account of the dependency added on the MFD_WM5110 symbol, fix this by also adding a dependency on MFD_WM5110 itself. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20200220125654.7064-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-20ASoC: dpcm: remove confusing trace in dpcm_get_be()Jerome Brunet1-3/+1
Now that dpcm_get_be() is used in dpcm_end_walk_at_be(), it is not a error if this function does not find a BE for the provided widget. Remove the related dev_err() trace which is confusing since things might be working as expected. When called from dpcm_add_paths(), it is an error if dpcm_get_be() fails to find a BE for the provided widget. The necessary error trace is already done in this case. Fixes: 027a48387183 ("ASoC: soc-pcm: use dpcm_get_be() at dpcm_end_walk_at_be()") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20200219115048.934678-1-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-20ASoC: soc-core: fix for_rtd_codec_dai_rollback() macroPierre-Louis Bossart1-1/+1
The use of parentheses to protect the argument is fine for (i)++ but not for (--i). Fixes: 83f94a2e293d61 ("ASoC: soc-core: add snd_soc_close_delayed_work()") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20200219222130.29933-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: dt-bindings: stm32: convert i2s to json-schemaOlivier Moysan2-62/+87
Convert the STM32 I2S bindings to DT schema format using json-schema. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200207120345.24672-1-olivier.moysan@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: meson: add t9015 internal DAC driverJerome Brunet3-0/+343
Add the codec driver of the internal DAC found on Amlogic gxl, g12a and sm1 family. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200219173503.1112561-3-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: meson: add t9015 internal codec binding documentationJerome Brunet1-0/+58
Add the DT binding documention of the internal DAC found in the Amlogic gxl, g12a and sm1 SoC family. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Link: https://lore.kernel.org/r/20200219173503.1112561-2-jbrunet@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: topology: Fix memleak in soc_tplg_manifest_load()Dragos Tarcatu1-6/+6
In case of ABI version mismatch, _manifest needs to be freed as it is just a copy of the original topology manifest. However, if a driver manifest handler is defined, that would get executed and the cleanup is never reached. Fix that by getting the return status of manifest() instead of returning directly. Fixes: 583958fa2e52 ("ASoC: topology: Make manifest backward compatible from ABI v4") Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com> Link: https://lore.kernel.org/r/20200207185325.22320-3-dragos_tarcatu@mentor.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: topology: Fix memleak in soc_tplg_link_elems_load()Dragos Tarcatu1-1/+4
If soc_tplg_link_config() fails, _link needs to be freed in case of topology ABI version mismatch. However the current code is returning directly and ends up leaking memory in this case. This patch fixes that. Fixes: 593d9e52f9bb ("ASoC: topology: Add support to configure existing physical DAI links") Signed-off-by: Dragos Tarcatu <dragos_tarcatu@mentor.com> Link: https://lore.kernel.org/r/20200207185325.22320-2-dragos_tarcatu@mentor.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: rockchip: Make RK3328 GPIO_MUTE control explicitRobin Murphy1-15/+16
The RK3328 reference design uses an external line driver IC as a buffer on the analog codec output, enabled by the GPIO_MUTE pin, and such a configuration is currently assumed in the codec driver's direct poking of GRF_SOC_CON10 to control the GPIO_MUTE output value. However, some boards wire up analog audio yet use that pin for some other purpose, so that assumption doesn't always hold. Update this functionality to rely on an explicit GPIO descriptor, such that it can be managed at the board level. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/5bc383ed1832f0f5d1dcb3c97ad92fd68e5217e3.1581376744.git.robin.murphy@arm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: dt-bindings: Make RK3328 codec GPIO explicitRobin Murphy1-1/+6
Existing RK3328 codec drivers have overloaded the GRF phandle to assume implicit control of the limited-function GPIO_MUTE pin, which is usually used to enable an external audio line driver IC. Since this pin has a proper binding of its own (see gpio/rockchip,rk3328-grf-gpio.txt), make a GPIO explicit in the codec binding too. This will help avoid ambiguity on boards that use that pin for some other purpose. (and while touching the example, enforce the "don't include status" rule) Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/5f7a399dea8a9dedef57f6f99f0f6ab1c1fdc56a.1581376744.git.robin.murphy@arm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: mediatek: mt8183-da7219-max98357: use for_each_rtd_codec_dai() macroKuninori Morimoto1-4/+4
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87h7znjcag.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: intel: kbl_da7219_max98927: use for_each_rtd_codec_dai() macroKuninori Morimoto1-4/+4
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87imk3jcal.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: intel: cml_rt1011_rt5682: use for_each_rtd_codec_dai() macroKuninori Morimoto1-2/+1
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87k14jjcaq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: qcom: apq8016_sbc: use for_each_rtd_codec_dai() macroKuninori Morimoto1-4/+3
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87lfozjcaw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: qcom: sdm845: use for_each_rtd_codec_dai() macroKuninori Morimoto1-11/+9
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87mu9fjcb4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: soundwaire: qcom: use for_each_rtd_codec_dai() macroKuninori Morimoto1-3/+4
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87o8tvjcbc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: tas2562: Add support for ISENSE and VSENSEDan Murphy2-8/+30
Add additional support for ISENSE and VSENSE feature for the TAS2562. This feature monitors the output to the loud speaker attempts to eliminate IR drop errors due to packaging. This feature is defined in Section 8.4.5 IV Sense of the data sheet. Signed-off-by: Dan Murphy <dmurphy@ti.com> Link: https://lore.kernel.org/r/20200219134622.22066-1-dmurphy@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-19ASoC: mediatek: mt8183-da7219: use SND_SOC_DAPM_PINCTRL in TDM outTzung-Bi Shih1-88/+10
Uses SND_SOC_DAPM_PINCTRL in TDM out to simplify code. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20200219170951.2.I7ed16ef57d9e0bcafc37e766142f68cbad5b54c6@changeid Signed-off-by: Mark Brown <broonie@kernel.org>