mbox series

[v1,0/6] ASoC: codecs: add support for LPASS Codec macros

Message ID 20201026141945.19707-1-srinivas.kandagatla@linaro.org
Headers show
Series ASoC: codecs: add support for LPASS Codec macros | expand

Message

Srinivas Kandagatla Oct. 26, 2020, 2:19 p.m. UTC
This patchset adds support for two Codec Macro blocks( WSA and VA) available in
Qualcomm LPASS (Low Power Audio SubSystem).

There are WSA, VA, TX and RX Macros on LPASS IP, each of the Macro block
has specific connectivity like WSA Macros are intended to connect
to WSA Smart speaker codecs via SoundWire. VA Macro is intended for DMICs,
and TX/RX for Analog codecs via SoundWire like other WCD Codecs to provide
headphone/ear/lineout etc ..

Most of the work is derived from downstream Qualcomm kernels.
Credits to various Qualcomm authors from Patrick Lai's team who have
contributed to this code.

This patchset has been tested on support to Qualcomm Robotics RB5 Development
Kit based on QRB5165 Robotics SoC. This board has 2 WSA881X smart speakers
with onboard DMIC connected to internal LPASS codec via WSA  and VA macros
respectively.

yaml bindings depend on gfm headers from "clk: qcom : add sm8250 LPASS GFM drivers"
patches posted at
https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2352255.html

Thanks,
srini

Srinivas Kandagatla (6):
  ASoC: qcom: dt-bindings: add bindings for lpass wsa macro codec
  ASoC: codecs: lpass-wsa-macro: Add support to WSA Macro
  ASoC: codecs: lpass-wsa-macro: add dapm widgets and route
  ASoC: qcom: dt-bindings: add bindings for lpass va macro codec
  ASoC: codecs: lpass-va-macro: Add support to VA Macro
  ASoC: codecs: lpass-va-macro: add dapm widgets and routes

 .../bindings/sound/qcom,lpass-va-macro.yaml   |   68 +
 .../bindings/sound/qcom,lpass-wsa-macro.yaml  |   70 +
 sound/soc/codecs/Kconfig                      |    8 +
 sound/soc/codecs/Makefile                     |    4 +
 sound/soc/codecs/lpass-va-macro.c             | 1500 ++++++++++
 sound/soc/codecs/lpass-wsa-macro.c            | 2503 +++++++++++++++++
 sound/soc/codecs/lpass-wsa-macro.h            |   15 +
 7 files changed, 4168 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-va-macro.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,lpass-wsa-macro.yaml
 create mode 100644 sound/soc/codecs/lpass-va-macro.c
 create mode 100644 sound/soc/codecs/lpass-wsa-macro.c
 create mode 100644 sound/soc/codecs/lpass-wsa-macro.h

Comments

Pierre-Louis Bossart Oct. 26, 2020, 8:01 p.m. UTC | #1
> +static int va_dmic_clk_enable(struct snd_soc_component *component,
> +			      u32 dmic, bool enable)
> +{
> +	struct va_macro *va = snd_soc_component_get_drvdata(component);
> +	u8  dmic_clk_en = 0x01;
> +	u16 dmic_clk_reg = 0;
> +	s32 *dmic_clk_cnt = NULL;
> +	u8 *dmic_clk_div = NULL;
> +	u8 freq_change_mask = 0;

the 4 initializations above are ignored, remove?