Skip to contentSkip to conversation

ASoC: Intel: Add KeemBay ASoC platform driver

PATCH Superseded Sia Jee Heng 2 participants 6 messages Jun 5, 2020 – Jun 9, 2020

Subsystems (4)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v4 cover ASoC: Intel: Add KeemBay ASoC platform driver

The below series of patches support the KeemBay ASoC platform driver. The platform driver initialize the i2s to capture and playback the pcm data on the ARM. The i2s is running in polling mode.

There is no DSP in the KeemBay SoC. Users are rely on the Gstreamer plugin to perform Audio preprocessing.

Audio graph card is used to connect the platform driver with the tlv320aic3204 codec.

Change History:
v4:
- Reduce if-otology at the tx/rx function.
- Fix indentation.
- specify .rate directly

v3:
- Adjusted header format.
- Use Audio graph card instead of custom sound card.
- Use if-else instead of conditional operator.
- Enabled .set_fmt to configure master clock.

v2:
- Corrected I2S naming for DT binding.

v1:
- Initial version.

Sia Jee Heng (3):
ASoC: Intel: Add KeemBay platform driver
ASoC: Intel: Add makefiles and kconfig changes for KeemBay
dt-bindings: sound: Add documentation for KeemBay i2s

 .../bindings/sound/intel,keembay-i2s.yaml          |  68 +++
 sound/soc/intel/Kconfig                            |   7 +
 sound/soc/intel/Makefile                           |   1 +
 sound/soc/intel/keembay/Makefile                   |   4 +
 sound/soc/intel/keembay/kmb_platform.c             | 654 +++++++++++++++++++++
 sound/soc/intel/keembay/kmb_platform.h             | 145 +++++
 6 files changed, 879 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml
 create mode 100644 sound/soc/intel/keembay/Makefile
 create mode 100644 sound/soc/intel/keembay/kmb_platform.c
 create mode 100644 sound/soc/intel/keembay/kmb_platform.h
Signature · 1 line
1.9.1
#1 lore raw

PATCH v4 1/3 ASoC: Intel: Add KeemBay platform driver

Add KeemBay ASoC platform driver which initialize the i2s controller and uses i2s to capture and transmit pcm data to external codec. The i2s is running in polling mode.

---
 sound/soc/intel/keembay/Makefile       |   4 +
 sound/soc/intel/keembay/kmb_platform.c | 654 +++++++++++++++++++++++++++++++++
 sound/soc/intel/keembay/kmb_platform.h | 145 ++++++++
 3 files changed, 803 insertions(+)
 create mode 100644 sound/soc/intel/keembay/Makefile
 create mode 100644 sound/soc/intel/keembay/kmb_platform.c
 create mode 100644 sound/soc/intel/keembay/kmb_platform.h
sound/soc/intel/keembay/Makefile new file +4 -0
new file mode 100644
index 0000000..9084e8c
@@ -0,0 +1,4 @@
+snd-soc-kmb_platform-objs := \
+	        kmb_platform.o
+
+obj-$(CONFIG_SND_SOC_INTEL_KEEMBAY) += snd-soc-kmb_platform.o
sound/soc/intel/keembay/kmb_platform.c new file +654 -0

654 lines not on this page · raw message

sound/soc/intel/keembay/kmb_platform.h new file +145 -0

145 lines not on this page · raw message

Signature · 1 line
1.9.1
#2 lore raw

PATCH v4 2/3 ASoC: Intel: Add makefiles and kconfig changes for KeemBay

In reply to Sia Jee Heng

Add makefile and kconfig changes for Intel KeemBay platform driver.

---
 sound/soc/intel/Kconfig  | 7 +++++++
 sound/soc/intel/Makefile | 1 +
 2 files changed, 8 insertions(+)
sound/soc/intel/Kconfig +7 -0
index c8de0bb..bc93448 100644
@@ -244,6 +244,13 @@ config SND_SOC_ACPI_INTEL_MATCH
 
 endif ## SND_SOC_INTEL_SST_TOPLEVEL || SND_SOC_SOF_INTEL_TOPLEVEL
 
+config SND_SOC_INTEL_KEEMBAY
+	tristate "Keembay Platforms"
+	depends on OF && (ARM64 || COMPILE_TEST)
+	depends on COMMON_CLK
+	help
+	  If you have a Intel Keembay platform then enable this option
+	  by saying Y or m.
 
 # ASoC codec drivers
 source "sound/soc/intel/boards/Kconfig"
sound/soc/intel/Makefile +1 -0
index 8160520..f5aa32b 100644
@@ -7,6 +7,7 @@ obj-$(CONFIG_SND_SOC_INTEL_HASWELL) += haswell/
 obj-$(CONFIG_SND_SOC_INTEL_BAYTRAIL) += baytrail/
 obj-$(CONFIG_SND_SST_ATOM_HIFI2_PLATFORM) += atom/
 obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += skylake/
+obj-$(CONFIG_SND_SOC_INTEL_KEEMBAY) += keembay/
 
 # Machine support
 obj-$(CONFIG_SND_SOC) += boards/
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH v4 2/3] ASoC: Intel: Add makefiles and kconfig changes for KeemBay

sound/soc/intel/Kconfig config SND_SOC_ACPI_INTEL_MATCH

Quoted 6 lines · Sia Jee Heng

Add makefile and kconfig changes for Intel KeemBay platform driver.

sound/soc/intel/Kconfig +3 -0
+config SND_SOC_INTEL_KEEMBAY
+	tristate "Keembay Platforms"
 
+	depends on OF && (ARM64 || COMPILE_TEST)

You can't compile test w/o OF?

Quoted 4 lines
sound/soc/intel/Kconfig +4 -0
+	depends on COMMON_CLK
+	help
+	  If you have a Intel Keembay platform then enable this option
+	  by saying Y or m.
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw

RE: [PATCH v4 2/3] ASoC: Intel: Add makefiles and kconfig changes for KeemBay

-----Original Message-----
From: Shevchenko, Andriy <[email protected]>
Sent: Friday, June 5, 2020 9:07 PM
To: Sia, Jee Heng <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Rojewski, Cezary <[email protected]>; [email protected]
Subject: Re: [PATCH v4 2/3] ASoC: Intel: Add makefiles and kconfig changes for KeemBay

sound/soc/intel/Kconfig config SND_SOC_ACPI_INTEL_MATCH

Quoted 6 lines · Sia Jee Heng

Add makefile and kconfig changes for Intel KeemBay platform driver.

sound/soc/intel/Kconfig +3 -0
+config SND_SOC_INTEL_KEEMBAY
+	tristate "Keembay Platforms"
 
+	depends on OF && (ARM64 || COMPILE_TEST)

You can't compile test w/o OF?
[>>] Good catch, OF functions are shifted to audio graph card. Will remove it from kconfig

Quoted 4 lines
sound/soc/intel/Kconfig +4 -0
+	depends on COMMON_CLK
+	help
+	  If you have a Intel Keembay platform then enable this option
+	  by saying Y or m.
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw

PATCH v4 3/3 dt-bindings: sound: Add documentation for KeemBay i2s

In reply to Sia Jee Heng

Document Intel KeemBay i2s DT bindings.

---
 .../bindings/sound/intel,keembay-i2s.yaml          | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml
Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml new file +68 -0
new file mode 100644
index 0000000..175e4fb
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2020 Intel Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/intel,keembay-i2s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel KeemBay I2S Device Tree Bindings
+
+maintainers:
+  - Sia, Jee Heng <[email protected]>
+
+description: |
+ Intel KeemBay I2S
+
+properties:
+  compatible:
+    enum:
+      - intel,keembay-i2s
+
+  "#sound-dai-cells":
+    const: 0
+
+  reg:
+    items:
+      - description: I2S configuration
+
+  reg-names:
+    items:
+      - const: i2s-regs
+      - const: i2s_gen_cfg
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: Bus Clock
+      - description: Module Clock
+
+  clock-names:
+    items:
+      - const: osc
+      - const: apb_clk
+
+required:
+  - compatible
+  - "#sound-dai-cells"
+  - reg
+  - clocks
+  - clock-names
+  - interrupts
+
+examples:
+  - |
+     #include <dt-bindings/interrupt-controller/arm-gic.h>
+     #include <dt-bindings/interrupt-controller/irq.h>
+     #define KEEM_BAY_PSS_AUX_I2S3
+     #define KEEM_BAY_PSS_I2S3
+     i2s3: i2s@20140000 {
+         compatible = "intel,keembay-i2s";
+         #sound-dai-cells = <0>;
+         reg = <0x20140000 0x200 0x202a00a4 0x4>;
+         reg-names = "i2s-regs", "i2s_gen_cfg";
+         interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+         clock-names = "osc", "apb_clk";
+         clocks = <&scmi_clk KEEM_BAY_PSS_AUX_I2S3>, <&scmi_clk KEEM_BAY_PSS_I2S3>;
+     };
Signature · 1 line
1.9.1