aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-02-01ASoC: rsnd: add R-Car Gen4 Sound supportKuninori Morimoto6-6/+140
This patch is tested on V4H White Hawk + ARD-AUDIO-DA7212 Signed-off-by: Linh Phung <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: dt-bindings: renesas: add R8A779G0 V4HKuninori Morimoto1-0/+4
Document R-Car V4H (R8A779G0), and R-Car Gen4 SoC bindings. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: dma.c: tidyup rsnd_dma_probe()Kuninori Morimoto1-2/+7
This patch tidyups rsnd_dma_probe(), but there is no effect. This is prepare for Gen4 support. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: tidyup rsnd_dma_addr()Kuninori Morimoto1-5/+5
This patch tidyups rsnd_dma_addr(), but there is no effect. This is prepare for Gen4 support. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: use array for 44.1kHz/48kHz rate handlingKuninori Morimoto1-30/+30
ADG need to know output rate of 44.1kHz/48kHz. It is using single variable for each, but this patch changes it to array. Nothing is changed by this patch. This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: use clkin/out_sizeKuninori Morimoto1-7/+23
Current adg.c is assuming number of clkin/clkout are fixed, but it is not correct on Gen4. This patch uses clkin/out_size to handling it. This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: moves clkout_name to top of the fileKuninori Morimoto1-6/+7
This patch moves clkout_name to top of the file to handling both clkin/clkout in the same place. This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: rename clk to clkinKuninori Morimoto1-19/+20
Current adg.c is usig "clk" as clock IN, but is using "clkout" for clock OUT. This patch arranges "clk" to "clkin". This is prepare for R-Car Gen4 support. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: remove unnecessary ADG flagsKuninori Morimoto1-21/+4
The flag LRCLK_ASYNC / AUDIO_OUT_48 had been added to handling special case of Salvator-X board, but it is not used on upstream. It makes code complex today, let's remove these. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: use same debug message format on clkoutKuninori Morimoto1-2/+2
This patch follows clkin debug message style on clkout. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: indicate warning once if it can't handle requested ruleKuninori Morimoto2-3/+17
Some SoC can't handle all requested hw rule. In such case, it will indicate like below, but it is unclear why it didn't work to user. This patch indicates warning in such case once, because player will try to similar rule many times. # aplay sound.wav Playing WAVE 'sound.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo aplay: aplay.c: 1359: set_params: Assertion `err >= 0' failed. Aborted by signal Aborted... Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: indicate necessary error when clock start failedKuninori Morimoto1-5/+8
rsnd_ssi_master_clk_start() indicates error message if it couldn't handle requested clock/rate, but it is not caring all cases. This patch cares it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: Remove unnecessary rsnd_dbg_dai_call()Kuninori Morimoto1-10/+0
commit b43b8ae87c8e0a8 ("ASoC: rsnd: protect mod->status") removed RSND_DEBUG_NO_DAI_CALL and rsnd_dbg_dai_call(), but these are still exist on rsnd.h. This patch removes it. Fixes: b43b8ae87c8e ("ASoC: rsnd: protect mod->status") Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: fixup #endif positionKuninori Morimoto1-2/+2
commit 1f9c82b5ab83ff2 ("ASoC: rsnd: add debugfs support") added CONFIG_DEBUG_FS related definitions on rsnd.h, but it should be added inside of RSND_H. This patch fixup it. Fixes: 1f9c82b5ab83 ("ASoC: rsnd: add debugfs support") Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: rsnd: check whether playback/capture property existsKuninori Morimoto1-16/+26
Current rsnd sets "channels_min" which is used from snd_soc_dai_stream_valid() without checking DT playback/capture property. Thus, "aplay -l" or "arecord -l" will indicate un-exising device. This patch checks DT proerty and do nothing playback/capture settings if not exist. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: qcom: apq8096: set driver name correctlyYassine Oudjana1-0/+1
Set driver name to allow matching different UCM2 configurations for the multiple devices sharing the same APQ8096 ASoC. Signed-off-by: Yassine Oudjana <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-02-01ASoC: cs42l42: use helper functionKuninori Morimoto1-4/+1
Current ASoC has many helper function. Link: https://lore.kernel.org/r/[email protected] Reported-by: Stephen Rothwell <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cs42l42: Add SoundWire supportMark Brown8-50/+729
Merge series from Stefan Binding <[email protected]>: The CS42L42 has a SoundWire interface for control and audio. This chain of patches adds support for this. Patches #1 .. #5 split out various changes to the existing code that are needed for adding Soundwire. These are mostly around clocking and supporting the separate probe and enumeration stages in SoundWire. Patches #6 .. #8 actually adds the SoundWire handling.
2023-01-31ASoC: use helper function and cleanupMark Brown58-316/+276
Merge series from Kuninori Morimoto <[email protected]>: struct snd_soc_dai need to have info for playback/capture, but it is using "playback/capture_xxx" or "tx/tx_xxx" or array. This kind of random definition is very difficult to read. This patch-set add helper functions and each driver use it. And cleanup the definition.
2023-01-31ASoC: mchp-spdifrx: add runtime PM support and fixesMark Brown1-149/+403
Merge series from Claudiu Beznea <[email protected]>: This series adds runtime PM support for Microchip SPDIFRX driver. Along with it I added few fixes identified while going though the code and playing with Microchip SPDIFRX controller.
2023-01-31ASoC: codecs: Add Awinic AW88395 audio amplifierMark Brown11-0/+4338
Merge series from [email protected]: The Awinic AW88395 is an I2S/TDM input, high efficiency digital Smart K audio amplifier with an integrated 10.25V smart boost converter. Add a DT schema for describing Awinic AW88395 audio amplifiers. They are controlled using I2C
2023-01-31Add the Renesas IDT821034 codec supportMark Brown5-0/+1275
Merge series from Herve Codina <[email protected]>: The Renesas IDT821034 codec is four channel PCM codec with on-chip filters and programmable gain setting. It also provides SLIC (Subscriber Line Interface Circuit) signals as GPIOs.
2023-01-31ASoC: cs42l42: Wait for debounce interval after resumeStefan Binding1-1/+9
Since clock stop causes bus reset on Intel controllers, we need to wait for the debounce interval on resume, to ensure all the interrupt status registers are set correctly. Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cs42l42: Don't set idle_bias_onRichard Fitzgerald1-1/+0
idle_bias_on was set because cs42l42 has a "VMID" type pseudo-midrail supply (named FILT+), and these typically take a long time to charge. But the driver never enabled pm_runtime so it would never have powered- down the cs42l42 anyway. In fact, FILT+ can charge to operating voltage within 12.5 milliseconds of enabling HP or ADC. This time is already covered by the startup delay of the HP/ADC. The datasheet warning about FILT+ taking up to 1 second to charge only applies in the special cases that either the PLL is started or DETECT_MODE set to non-zero while both HP and ADC are off. The driver never does either of these. Removing idle_bias_on allows the Soundwire host controller to suspend if there isn't a snd_soc_jack handler registered. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cs42l42: Add SoundWire supportRichard Fitzgerald5-0/+642
This adds support for using CS42L42 as a SoundWire device. SoundWire-specifics are kept separate from the I2S implementation as much as possible, aiming to limit the risk of breaking the I2C+I2S support. There are some important differences in the silicon behaviour between I2S and SoundWire mode that are reflected in the implementation: - ASP (I2S) most not be used in SoundWire mode because the two interfaces share pins. - The SoundWire capture (record) port only supports 1 channel. It does not have left-to-right duplication like the ASP. - DP2 can only be prepared if the HP has powered-up. DP1 can only be prepared if the ADC has powered-up. (This ordering restriction does not exist for ASPs.) The SoundWire core port-prepare step is triggered by the DAI-link prepare(). This happens before the codec DAI prepare() or the DAPM sequence so these cannot be used to enable HP/ADC. Instead the HP/ADC enable/disable are done during the port_prep callback. - The SRCs are an integral part of the audio chain but in silicon their power control is linked to the ASP. There is no equivalent power link to SoundWire DPs so the driver must take "manual" control of SRC power. - The SoundWire control registers occupy the lower part of the SoundWire address space so cs42l42 registers are offset by 0x8000 (non-paged) in SoundWire mode. - Register addresses are 8-bit paged in I2C mode but 16-bit unpaged in SoundWire. - Special procedures are needed on register read/writes to (a) ensure that the previous internal bus transaction has completed, and (b) handle delayed read results, when the read value could not be returned within the SoundWire read command. There are also some differences in driver implementation between I2S and SoundWire operation: - CS42L42 I2S does not runtime_suspend, but runtime_suspend/resume support has been added into the driver in SoundWire mode as the most convenient way to power-up the bus manager and to handle the unattach_request condition, though the CS42L42 chip does not itself suspend or resume. - Intel SoundWire host controllers have a low-power clock-stop mode that requires resetting all peripherals when resuming. This means that the interrupt registers will be reset in between the interrupt being generated and the interrupt being handled, and since the interrupt status is debounced, these values may not be accurate immediately, and may cause spurious unplug events before settling. - As in I2S mode, the PLL is only used while audio is active because of clocking quirks in the silicon. For SoundWire the cs42l42_pll_config() is deferred until the DAI prepare(), to allow the cs42l42_bus_config() callback to set the SCLK. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cs42l42: Export some functions for SoundWireRichard Fitzgerald2-5/+14
Export functions that will be needed by a SoundWire module. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cs42l42: Separate ASP config from PLL configRichard Fitzgerald2-38/+44
Setup of the ASP (audio serial port) was being done as a side-effect of cs42l42_pll_config() and forces a restriction on the ratio of sample_rate to bit_clock that is invalid for Soundwire. Move the ASP setup into a dedicated function. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cs42l42: Ensure MCLKint is a multiple of the sample rateRichard Fitzgerald1-3/+9
The chosen clocking configuration must give an internal MCLK (MCLKint) that is an integer multiple of the sample rate. On I2S each of the supported bit clock frequencies can only be generated from one sample rate group (either the 44100 or the 48000) so the code could use only the bitclock to look up a PLL config. The relationship between sample rate and bitclock frequency is more complex on Soundwire and so it is possible to set a frame shape to generate a bitclock from the "wrong" group. For example 2*147 with a 48000 sample rate would give a bitclock of 14112000 which on I2S could only be derived from a 44100 sample rate. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cs42l42: Add SOFT_RESET_REBOOT registerRichard Fitzgerald2-0/+7
The SOFT_RESET_REBOOT register is needed to recover CS42L42 state after a Soundwire bus reset. This is required to be set whenever there is severe/hard bus reset. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31soundwire: stream: Add specific prep/deprep commands to port_prep callbackStefan Binding2-5/+7
Currently, port_prep callback only has commands for PRE_PREP, PREP, and POST_PREP, which doesn't directly say whether this is for a prepare or deprepare call. Extend the command list enum to say whether the call is for prepare or deprepare aswell. Also remove SDW_OPS_PORT_PREP from sdw_port_prep_ops as this is unused, and update this enum to be simpler and more consistent with enum sdw_clk_stop_type. Note: Currently, the only users of SDW_OPS_PORT_POST_PREP are codec drivers sound/soc/codecs/wsa881x.c and sound/soc/codecs/wsa883x.c, both of which seem to assume that POST_PREP only occurs after a prepare, even though it would also have occurred after a deprepare. Since it doesn't make sense to mark the port prepared after a deprepare, changing the enum to separate PORT_DEPREP from PORT_PREP should make the check for PORT_PREP in those drivers be more logical. Signed-off-by: Stefan Binding <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Acked-By: Vinod Koul <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: dt-bindings: irondevice,sma1303.yaml: Fix about breaking the checksKiseok Jo1-7/+6
Fix the bindings checks like syntax error. Signed-off-by: Kiseok Jo <[email protected]> Reported-by: Rob Herring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: sma1303: Convert to i2c's .probe_new()Uwe Kleine-König1-3/+2
The probe function doesn't make use of the i2c_device_id * parameter so it can be trivially converted. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31MAINTAINERS: add IRON DEVICE AUDIO CODEC DRIVERSKiseok Jo1-0/+7
Add Kiseok Jo as maintainer for Iron Device audio codec drivers. Signed-off-by: Kiseok Jo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: soc-dai.h: cleanup Playback/Capture data for snd_soc_daiKuninori Morimoto2-44/+28
Current snd_soc_dai has data for Playback/Capture, but it is very random. Someone is array (A), someone is playback/capture (B), and someone is tx/rx (C); struct snd_soc_dai { ... (A) unsigned int stream_active[SNDRV_PCM_STREAM_LAST + 1]; (B) struct snd_soc_dapm_widget *playback_widget; (B) struct snd_soc_dapm_widget *capture_widget; (B) void *playback_dma_data; (B) void *capture_dma_data; ... (C) unsigned int tx_mask; (C) unsigned int rx_mask; }; Because of it, the code was very complicated. This patch creates new data structure to merge these into one, and tidyup the code. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: soc-topology.c: use helper functionKuninori Morimoto1-2/+2
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: soc-pcm.c: use helper functionKuninori Morimoto1-9/+3
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: soc-dai.c: use helper functionKuninori Morimoto1-2/+7
Current ASoC has many helper function. This patch use it. Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: soc-dapm.c: use helper functionKuninori Morimoto1-14/+12
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: soc-core.c: use helper functionKuninori Morimoto1-4/+4
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: ti: use helper functionKuninori Morimoto3-6/+9
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: tegra: use helper functionKuninori Morimoto5-10/+9
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: sof: use helper functionKuninori Morimoto1-66/+38
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: rockchip: use helper functionKuninori Morimoto3-4/+4
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: meson: use helper functionKuninori Morimoto7-35/+38
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Jerome Brunet <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: mediatek: use helper functionKuninori Morimoto7-26/+32
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: intel: use helper functionKuninori Morimoto4-31/+17
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: sdw-mockup: use helper functionKuninori Morimoto1-4/+1
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: spear: use helper functionKuninori Morimoto1-1/+2
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: cirrus: use helper functionKuninori Morimoto2-4/+4
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2023-01-31ASoC: rt: use helper functionKuninori Morimoto14-48/+21
Current ASoC has many helper function. This patch use it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>