mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/4] MT8195 Acer Tomato - Audio support
@ 2022-09-22  9:49 AngeloGioacchino Del Regno
  2022-09-22  9:49 ` [PATCH 1/4] arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support AngeloGioacchino Del Regno
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-22  9:49 UTC (permalink / raw)
  To: matthias.bgg
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel, wenst,
	AngeloGioacchino Del Regno

This series enables full support for audio, with DSP, on the Cherry
Chromebooks.
Related ALSA UCM2 configuration was already merged in its upstream
repository [1]: this is fully tested and working as-is since all of
the required fixes for MT8195 SOF drivers were picked and are present
since `next-20220908`.

[1]: https://github.com/alsa-project/alsa-ucm-conf/commit/a59c3b1a57de8eb424c4f754bb031265e856260e

______________________________________
_________ Platform overview: _________

What's still missing?

* Format:    feature  (location)
*
* MediaTek vcodec enc/dec (mt8195.dtsi only)
* PCI-Express WiFi card (mt8195 and mt8195-cherry)
* VDOSYS1 (mt8195.dtsi and mediatek-drm/mmsys drivers)
* DP/eDP outputs for external/internal display (mt8195 and mt8195-cherry)
* LVTS Thermal Sensors (mt8195.dtsi, driver is missing)
* GPU support (clocks and mtk-regulator-coupler are awaiting for review/pick)

AngeloGioacchino Del Regno (4):
  arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support
  arm64: dts: mediatek: cherry: Enable the Audio DSP for SOF
  arm64: dts: mediatek: cherry: Add external codecs and speaker
    amplifier
  arm64: dts: mediatek: cherry: Add sound card configuration

 .../dts/mediatek/mt8195-cherry-tomato-r1.dts  |  10 ++
 .../dts/mediatek/mt8195-cherry-tomato-r2.dts  |  10 ++
 .../dts/mediatek/mt8195-cherry-tomato-r3.dts  |  10 ++
 .../boot/dts/mediatek/mt8195-cherry.dtsi      | 109 ++++++++++++++++++
 4 files changed, 139 insertions(+)

-- 
2.37.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/4] arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support
  2022-09-22  9:49 [PATCH 0/4] MT8195 Acer Tomato - Audio support AngeloGioacchino Del Regno
@ 2022-09-22  9:49 ` AngeloGioacchino Del Regno
  2022-09-22  9:49 ` [PATCH 2/4] arm64: dts: mediatek: cherry: Enable the Audio DSP for SOF AngeloGioacchino Del Regno
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-22  9:49 UTC (permalink / raw)
  To: matthias.bgg
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel, wenst,
	AngeloGioacchino Del Regno

In preparation for adding audio support, enable the AFE HW with
the appropriate eTDM configuration and memory region.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
index 9b62e161db26..bc7890300a57 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
@@ -117,9 +117,23 @@ scp_mem: memory@50000000 {
 			reg = <0 0x50000000 0 0x2900000>;
 			no-map;
 		};
+
+		afe_mem: memory@60d80000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x60d80000 0 0x100000>;
+			no-map;
+		};
 	};
 };
 
+&afe {
+	status = "okay";
+
+	mediatek,etdm-in2-cowork-source = <2>;
+	mediatek,etdm-out2-cowork-source = <0>;
+	memory-region = <&afe_mem>;
+};
+
 &i2c0 {
 	status = "okay";
 
-- 
2.37.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/4] arm64: dts: mediatek: cherry: Enable the Audio DSP for SOF
  2022-09-22  9:49 [PATCH 0/4] MT8195 Acer Tomato - Audio support AngeloGioacchino Del Regno
  2022-09-22  9:49 ` [PATCH 1/4] arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support AngeloGioacchino Del Regno
@ 2022-09-22  9:49 ` AngeloGioacchino Del Regno
  2022-09-22  9:49 ` [PATCH 3/4] arm64: dts: mediatek: cherry: Add external codecs and speaker amplifier AngeloGioacchino Del Regno
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-22  9:49 UTC (permalink / raw)
  To: matthias.bgg
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel, wenst,
	AngeloGioacchino Del Regno

This platform is able to use the Audio DSP embedded into the
MT8195 SoC: in preparation for adding audio support for Cherry,
add the ADSP related memory nodes and enable it.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
index bc7890300a57..3bc624e6f499 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
@@ -118,14 +118,32 @@ scp_mem: memory@50000000 {
 			no-map;
 		};
 
+		adsp_mem: memory@60000000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x60000000 0 0xd80000>;
+			no-map;
+		};
+
 		afe_mem: memory@60d80000 {
 			compatible = "shared-dma-pool";
 			reg = <0 0x60d80000 0 0x100000>;
 			no-map;
 		};
+
+		adsp_device_mem: memory@60e80000 {
+			compatible = "shared-dma-pool";
+			reg = <0 0x60e80000 0 0x280000>;
+			no-map;
+		};
 	};
 };
 
+&adsp {
+	status = "okay";
+
+	memory-region = <&adsp_device_mem>, <&adsp_mem>;
+};
+
 &afe {
 	status = "okay";
 
-- 
2.37.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 3/4] arm64: dts: mediatek: cherry: Add external codecs and speaker amplifier
  2022-09-22  9:49 [PATCH 0/4] MT8195 Acer Tomato - Audio support AngeloGioacchino Del Regno
  2022-09-22  9:49 ` [PATCH 1/4] arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support AngeloGioacchino Del Regno
  2022-09-22  9:49 ` [PATCH 2/4] arm64: dts: mediatek: cherry: Enable the Audio DSP for SOF AngeloGioacchino Del Regno
@ 2022-09-22  9:49 ` AngeloGioacchino Del Regno
  2022-09-22  9:49 ` [PATCH 4/4] arm64: dts: mediatek: cherry: Add sound card configuration AngeloGioacchino Del Regno
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-22  9:49 UTC (permalink / raw)
  To: matthias.bgg
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel, wenst,
	AngeloGioacchino Del Regno

The entire Cherry family has two digital microphones, for which
we use the generic dmic-codec, linked to the MT6359 PMIC.
Moreover, it uses a Realtek RT1019p amplifier for the speakers
and has either a Realtek RT5682i or RT5682s audio codec on I2C2:
specifically, RT5682i is found on Tomato's rev 1 and rev 2 boards,
while RT5682s is found in rev3 and rev4 boards.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../dts/mediatek/mt8195-cherry-tomato-r1.dts  |  5 +++
 .../dts/mediatek/mt8195-cherry-tomato-r2.dts  |  5 +++
 .../dts/mediatek/mt8195-cherry-tomato-r3.dts  |  5 +++
 .../boot/dts/mediatek/mt8195-cherry.dtsi      | 37 +++++++++++++++++++
 4 files changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts
index 3348ba69ff6c..3767b49ea896 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts
@@ -10,6 +10,11 @@ / {
 	compatible = "google,tomato-rev1", "google,tomato", "mediatek,mt8195";
 };
 
+&audio_codec {
+	compatible = "realtek,rt5682i";
+	realtek,btndet-delay = <16>;
+};
+
 &ts_10 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts
index 4669e9d917f8..0ed83a79d680 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts
@@ -10,6 +10,11 @@ / {
 	compatible = "google,tomato-rev2", "google,tomato", "mediatek,mt8195";
 };
 
+&audio_codec {
+	compatible = "realtek,rt5682i";
+	realtek,btndet-delay = <16>;
+};
+
 &pio_default {
 	pins-low-power-hdmi-disable {
 		pinmux = <PINMUX_GPIO31__FUNC_GPIO31>,
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts
index 5021edd02f7c..c47b341e98fb 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts
@@ -11,6 +11,11 @@ / {
 		     "google,tomato", "mediatek,mt8195";
 };
 
+&audio_codec {
+	compatible = "realtek,rt5682s";
+	realtek,amic-delay-ms = <250>;
+};
+
 &pio_default {
 	pins-low-power-hdmi-disable {
 		pinmux = <PINMUX_GPIO31__FUNC_GPIO31>,
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
index 3bc624e6f499..95e93b791432 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
@@ -26,6 +26,12 @@ chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	dmic-codec {
+		compatible = "dmic-codec";
+		num-channels = <2>;
+		wakeup-delay-ms = <50>;
+	};
+
 	memory@40000000 {
 		device_type = "memory";
 		reg = <0 0x40000000 0 0x80000000>;
@@ -136,6 +142,14 @@ adsp_device_mem: memory@60e80000 {
 			no-map;
 		};
 	};
+
+	spk_amplifier: rt1019p {
+		compatible = "realtek,rt1019p";
+		label = "rt1019p";
+		pinctrl-names = "default";
+		pinctrl-0 = <&rt1019p_pins_default>;
+		sdb-gpios = <&pio 100 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &adsp {
@@ -185,6 +199,17 @@ &i2c2 {
 	clock-frequency = <400000>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c2_pins>;
+
+	audio_codec: codec@1a {
+		/* Realtek RT5682i or RT5682s, sharing the same configuration */
+		reg = <0x1a>;
+		interrupts-extended = <&pio 89 IRQ_TYPE_EDGE_BOTH>;
+		realtek,jd-src = <1>;
+
+		AVDD-supply = <&mt6359_vio18_ldo_reg>;
+		MICVDD-supply = <&pp3300_z2>;
+		VBAT-supply = <&pp3300_z5>;
+	};
 };
 
 &i2c3 {
@@ -289,6 +314,11 @@ &mmc1 {
 	vqmmc-supply = <&mt_pmic_vmc_ldo_reg>;
 };
 
+&mt6359codec {
+	mediatek,dmic-mode = <1>;  /* one-wire */
+	mediatek,mic-type-0 = <2>; /* DMIC */
+};
+
 /* for CPU-L */
 &mt6359_vcore_buck_reg {
 	regulator-always-on;
@@ -723,6 +753,13 @@ pins-low-power-pupd {
 		};
 	};
 
+	rt1019p_pins_default: rt1019p-default-pins {
+		pins-amp-sdb {
+			pinmux = <PINMUX_GPIO100__FUNC_GPIO100>;
+			output-low;
+		};
+	};
+
 	scp_pins: scp-default-pins {
 		pins-vreq {
 			pinmux = <PINMUX_GPIO76__FUNC_SCP_VREQ_VAO>;
-- 
2.37.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 4/4] arm64: dts: mediatek: cherry: Add sound card configuration
  2022-09-22  9:49 [PATCH 0/4] MT8195 Acer Tomato - Audio support AngeloGioacchino Del Regno
                   ` (2 preceding siblings ...)
  2022-09-22  9:49 ` [PATCH 3/4] arm64: dts: mediatek: cherry: Add external codecs and speaker amplifier AngeloGioacchino Del Regno
@ 2022-09-22  9:49 ` AngeloGioacchino Del Regno
  2022-10-07  8:42 ` [PATCH 0/4] MT8195 Acer Tomato - Audio support Chen-Yu Tsai
  2022-12-16 13:41 ` Matthias Brugger
  5 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-22  9:49 UTC (permalink / raw)
  To: matthias.bgg
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel, wenst,
	AngeloGioacchino Del Regno

Configure the sound card on all MT8195 Cherry Tomato devices to
enable audio support.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 .../dts/mediatek/mt8195-cherry-tomato-r1.dts  |  5 +++
 .../dts/mediatek/mt8195-cherry-tomato-r2.dts  |  5 +++
 .../dts/mediatek/mt8195-cherry-tomato-r3.dts  |  5 +++
 .../boot/dts/mediatek/mt8195-cherry.dtsi      | 40 +++++++++++++++++++
 4 files changed, 55 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts
index 3767b49ea896..2d5e8f371b6d 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r1.dts
@@ -15,6 +15,11 @@ &audio_codec {
 	realtek,btndet-delay = <16>;
 };
 
+&sound {
+	compatible = "mediatek,mt8195_mt6359_rt1019_rt5682";
+	model = "mt8195_r1019_5682";
+};
+
 &ts_10 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts
index 0ed83a79d680..2586c32ce6e6 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r2.dts
@@ -35,6 +35,11 @@ pins-low-power-pcie0-disable {
 	};
 };
 
+&sound {
+	compatible = "mediatek,mt8195_mt6359_rt1019_rt5682";
+	model = "mt8195_r1019_5682";
+};
+
 &ts_10 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts
index c47b341e98fb..f54f9477b99d 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry-tomato-r3.dts
@@ -36,6 +36,11 @@ pins-low-power-pcie0-disable {
 	};
 };
 
+&sound {
+	compatible = "mediatek,mt8195_mt6359_rt1019_rt5682";
+	model = "m8195_r1019_5682s";
+};
+
 &ts_10 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
index 95e93b791432..3410e16d7e99 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi
@@ -526,6 +526,34 @@ &pio {
 		"AP_SPI_FLASH_MOSI",
 		"AP_SPI_FLASH_MISO";
 
+	aud_pins_default: audio-default-pins {
+		pins-cmd-dat {
+		    pinmux = <PINMUX_GPIO69__FUNC_AUD_CLK_MOSI>,
+			     <PINMUX_GPIO70__FUNC_AUD_SYNC_MOSI>,
+			     <PINMUX_GPIO71__FUNC_AUD_DAT_MOSI0>,
+			     <PINMUX_GPIO72__FUNC_AUD_DAT_MOSI1>,
+			     <PINMUX_GPIO73__FUNC_AUD_DAT_MISO0>,
+			     <PINMUX_GPIO74__FUNC_AUD_DAT_MISO1>,
+			     <PINMUX_GPIO75__FUNC_AUD_DAT_MISO2>,
+			     <PINMUX_GPIO0__FUNC_TDMIN_MCK>,
+			     <PINMUX_GPIO1__FUNC_TDMIN_DI>,
+			     <PINMUX_GPIO2__FUNC_TDMIN_LRCK>,
+			     <PINMUX_GPIO3__FUNC_TDMIN_BCK>,
+			     <PINMUX_GPIO60__FUNC_I2SO2_D0>,
+			     <PINMUX_GPIO49__FUNC_I2SIN_D0>,
+			     <PINMUX_GPIO50__FUNC_I2SO1_MCK>,
+			     <PINMUX_GPIO51__FUNC_I2SO1_BCK>,
+			     <PINMUX_GPIO52__FUNC_I2SO1_WS>,
+			     <PINMUX_GPIO53__FUNC_I2SO1_D0>;
+		};
+
+		pins-hp-jack-int-odl {
+			pinmux = <PINMUX_GPIO89__FUNC_GPIO89>;
+			input-enable;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
+		};
+	};
+
 	cr50_int: cr50-irq-default-pins {
 		pins-gsc-ap-int-odl {
 			pinmux = <PINMUX_GPIO88__FUNC_GPIO88>;
@@ -833,6 +861,18 @@ cros-ec-rpmsg {
 	};
 };
 
+&sound {
+	status = "okay";
+
+	mediatek,adsp = <&adsp>;
+	mediatek,dai-link =
+		"DL10_FE", "DPTX_BE", "ETDM1_IN_BE", "ETDM2_IN_BE",
+		"ETDM1_OUT_BE", "ETDM2_OUT_BE","UL_SRC1_BE",
+		"AFE_SOF_DL2", "AFE_SOF_DL3", "AFE_SOF_UL4", "AFE_SOF_UL5";
+	pinctrl-names = "default";
+	pinctrl-0 = <&aud_pins_default>;
+};
+
 &spi0 {
 	status = "okay";
 
-- 
2.37.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] MT8195 Acer Tomato - Audio support
  2022-09-22  9:49 [PATCH 0/4] MT8195 Acer Tomato - Audio support AngeloGioacchino Del Regno
                   ` (3 preceding siblings ...)
  2022-09-22  9:49 ` [PATCH 4/4] arm64: dts: mediatek: cherry: Add sound card configuration AngeloGioacchino Del Regno
@ 2022-10-07  8:42 ` Chen-Yu Tsai
  2022-10-07  8:52   ` AngeloGioacchino Del Regno
  2022-12-16 13:41 ` Matthias Brugger
  5 siblings, 1 reply; 9+ messages in thread
From: Chen-Yu Tsai @ 2022-10-07  8:42 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: matthias.bgg, robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel

Hi,

On Thu, Sep 22, 2022 at 5:49 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> This series enables full support for audio, with DSP, on the Cherry
> Chromebooks.
> Related ALSA UCM2 configuration was already merged in its upstream
> repository [1]: this is fully tested and working as-is since all of
> the required fixes for MT8195 SOF drivers were picked and are present
> since `next-20220908`.
>
> [1]: https://github.com/alsa-project/alsa-ucm-conf/commit/a59c3b1a57de8eb424c4f754bb031265e856260e

While trying this patch, I get the following error:

# modprobe mt8195-mt6359
[   44.985107] mt6359-sound mt6359-sound: ASoC: sink widget AIF1TX overwritten
[   44.994393] dmic-codec dmic-codec: GPIO lookup for consumer dmicen
[   45.000636] dmic-codec dmic-codec: using device tree for GPIO lookup
[   45.007165] of_get_named_gpiod_flags: can't parse 'dmicen-gpios'
property of node '/dmic-codec[0]'
[   45.016177] of_get_named_gpiod_flags: can't parse 'dmicen-gpio'
property of node '/dmic-codec[0]'
[   45.025084] dmic-codec dmic-codec: using lookup tables for GPIO lookup
[   45.031666] dmic-codec dmic-codec: No GPIO consumer dmicen found
[   45.041434] sof-audio-of-mt8195 10803000.dsp: Topology: ABI 3:22:1
Kernel ABI 3:23:0
[   45.050185] mt8195_mt6359 mt8195-sound: ASoC: Parent card not yet
available, widget card binding deferred
[   45.060566] sof-audio-of-mt8195 10803000.dsp: ipc tx error for
0x30010000 (msg/reply size: 96/20): -22
[   45.069965] sof-audio-of-mt8195 10803000.dsp: Failed to setup widget AFE3.IN
[   45.077575] sof-audio-of-mt8195 10803000.dsp: error: tplg component
load failed -22
[   45.085291] sof-audio-of-mt8195 10803000.dsp: error: failed to load
DSP topology -22
[   45.093062] sof-audio-of-mt8195 10803000.dsp: ASoC: error at
snd_soc_component_probe on 10803000.dsp: -22
[   45.102880] mt8195_mt6359 mt8195-sound: ASoC: failed to instantiate card -22
[   45.123915] mt8195_mt6359: probe of mt8195-sound failed with error -22

Any ideas?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] MT8195 Acer Tomato - Audio support
  2022-10-07  8:42 ` [PATCH 0/4] MT8195 Acer Tomato - Audio support Chen-Yu Tsai
@ 2022-10-07  8:52   ` AngeloGioacchino Del Regno
  2022-11-18 10:14     ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-10-07  8:52 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: matthias.bgg, robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel

Il 07/10/22 10:42, Chen-Yu Tsai ha scritto:
> Hi,
> 
> On Thu, Sep 22, 2022 at 5:49 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> This series enables full support for audio, with DSP, on the Cherry
>> Chromebooks.
>> Related ALSA UCM2 configuration was already merged in its upstream
>> repository [1]: this is fully tested and working as-is since all of
>> the required fixes for MT8195 SOF drivers were picked and are present
>> since `next-20220908`.
>>
>> [1]: https://github.com/alsa-project/alsa-ucm-conf/commit/a59c3b1a57de8eb424c4f754bb031265e856260e
> 
> While trying this patch, I get the following error:
> 
> # modprobe mt8195-mt6359
> [   44.985107] mt6359-sound mt6359-sound: ASoC: sink widget AIF1TX overwritten
> [   44.994393] dmic-codec dmic-codec: GPIO lookup for consumer dmicen
> [   45.000636] dmic-codec dmic-codec: using device tree for GPIO lookup
> [   45.007165] of_get_named_gpiod_flags: can't parse 'dmicen-gpios'
> property of node '/dmic-codec[0]'
> [   45.016177] of_get_named_gpiod_flags: can't parse 'dmicen-gpio'
> property of node '/dmic-codec[0]'
> [   45.025084] dmic-codec dmic-codec: using lookup tables for GPIO lookup
> [   45.031666] dmic-codec dmic-codec: No GPIO consumer dmicen found
> [   45.041434] sof-audio-of-mt8195 10803000.dsp: Topology: ABI 3:22:1
> Kernel ABI 3:23:0
> [   45.050185] mt8195_mt6359 mt8195-sound: ASoC: Parent card not yet
> available, widget card binding deferred
> [   45.060566] sof-audio-of-mt8195 10803000.dsp: ipc tx error for
> 0x30010000 (msg/reply size: 96/20): -22
> [   45.069965] sof-audio-of-mt8195 10803000.dsp: Failed to setup widget AFE3.IN
> [   45.077575] sof-audio-of-mt8195 10803000.dsp: error: tplg component
> load failed -22
> [   45.085291] sof-audio-of-mt8195 10803000.dsp: error: failed to load
> DSP topology -22
> [   45.093062] sof-audio-of-mt8195 10803000.dsp: ASoC: error at
> snd_soc_component_probe on 10803000.dsp: -22
> [   45.102880] mt8195_mt6359 mt8195-sound: ASoC: failed to instantiate card -22
> [   45.123915] mt8195_mt6359: probe of mt8195-sound failed with error -22
> 
> Any ideas?

We have to recheck if the firmware that was sent upstream is the right one for
Tomato's dts topology variant, I think.
That's surely a firmware issue that you're seeing, anyway.

sof-mt8195.ri

Cheers,
Angelo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] MT8195 Acer Tomato - Audio support
  2022-10-07  8:52   ` AngeloGioacchino Del Regno
@ 2022-11-18 10:14     ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-18 10:14 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: matthias.bgg, robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel

Il 07/10/22 10:52, AngeloGioacchino Del Regno ha scritto:
> Il 07/10/22 10:42, Chen-Yu Tsai ha scritto:
>> Hi,
>>
>> On Thu, Sep 22, 2022 at 5:49 PM AngeloGioacchino Del Regno
>> <angelogioacchino.delregno@collabora.com> wrote:
>>>
>>> This series enables full support for audio, with DSP, on the Cherry
>>> Chromebooks.
>>> Related ALSA UCM2 configuration was already merged in its upstream
>>> repository [1]: this is fully tested and working as-is since all of
>>> the required fixes for MT8195 SOF drivers were picked and are present
>>> since `next-20220908`.
>>>
>>> [1]: 
>>> https://github.com/alsa-project/alsa-ucm-conf/commit/a59c3b1a57de8eb424c4f754bb031265e856260e
>>
>> While trying this patch, I get the following error:
>>
>> # modprobe mt8195-mt6359
>> [   44.985107] mt6359-sound mt6359-sound: ASoC: sink widget AIF1TX overwritten
>> [   44.994393] dmic-codec dmic-codec: GPIO lookup for consumer dmicen
>> [   45.000636] dmic-codec dmic-codec: using device tree for GPIO lookup
>> [   45.007165] of_get_named_gpiod_flags: can't parse 'dmicen-gpios'
>> property of node '/dmic-codec[0]'
>> [   45.016177] of_get_named_gpiod_flags: can't parse 'dmicen-gpio'
>> property of node '/dmic-codec[0]'
>> [   45.025084] dmic-codec dmic-codec: using lookup tables for GPIO lookup
>> [   45.031666] dmic-codec dmic-codec: No GPIO consumer dmicen found
>> [   45.041434] sof-audio-of-mt8195 10803000.dsp: Topology: ABI 3:22:1
>> Kernel ABI 3:23:0
>> [   45.050185] mt8195_mt6359 mt8195-sound: ASoC: Parent card not yet
>> available, widget card binding deferred
>> [   45.060566] sof-audio-of-mt8195 10803000.dsp: ipc tx error for
>> 0x30010000 (msg/reply size: 96/20): -22
>> [   45.069965] sof-audio-of-mt8195 10803000.dsp: Failed to setup widget AFE3.IN
>> [   45.077575] sof-audio-of-mt8195 10803000.dsp: error: tplg component
>> load failed -22
>> [   45.085291] sof-audio-of-mt8195 10803000.dsp: error: failed to load
>> DSP topology -22
>> [   45.093062] sof-audio-of-mt8195 10803000.dsp: ASoC: error at
>> snd_soc_component_probe on 10803000.dsp: -22
>> [   45.102880] mt8195_mt6359 mt8195-sound: ASoC: failed to instantiate card -22
>> [   45.123915] mt8195_mt6359: probe of mt8195-sound failed with error -22
>>
>> Any ideas?
> 
> We have to recheck if the firmware that was sent upstream is the right one for
> Tomato's dts topology variant, I think.
> That's surely a firmware issue that you're seeing, anyway.
> 
> sof-mt8195.ri
> 

Update to this: what you were seeing was not related to this series, which is
entirely correct, but due to an ABI breakage in SoundOpenFirmware.

After I reported that to SOF, a commit [1] was pushed to fix the same - now this
series is fully working, as expected.

[1]: 
https://lore.kernel.org/alsa-devel/20221117232120.112639-1-pierre-louis.bossart@linux.intel.com/T/#u

Chen-Yu, would you please test this again with the aforementioned commit?
Works here, should work for you as well now :-)

Cheers!
Angelo


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/4] MT8195 Acer Tomato - Audio support
  2022-09-22  9:49 [PATCH 0/4] MT8195 Acer Tomato - Audio support AngeloGioacchino Del Regno
                   ` (4 preceding siblings ...)
  2022-10-07  8:42 ` [PATCH 0/4] MT8195 Acer Tomato - Audio support Chen-Yu Tsai
@ 2022-12-16 13:41 ` Matthias Brugger
  5 siblings, 0 replies; 9+ messages in thread
From: Matthias Brugger @ 2022-12-16 13:41 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: robh+dt, krzysztof.kozlowski+dt, linux-arm-kernel,
	linux-mediatek, devicetree, linux-kernel, wenst

Whole series applied, thanks a lot.

Matthias

On 22/09/2022 11:49, AngeloGioacchino Del Regno wrote:
> This series enables full support for audio, with DSP, on the Cherry
> Chromebooks.
> Related ALSA UCM2 configuration was already merged in its upstream
> repository [1]: this is fully tested and working as-is since all of
> the required fixes for MT8195 SOF drivers were picked and are present
> since `next-20220908`.
> 
> [1]: https://github.com/alsa-project/alsa-ucm-conf/commit/a59c3b1a57de8eb424c4f754bb031265e856260e
> 
> ______________________________________
> _________ Platform overview: _________
> 
> What's still missing?
> 
> * Format:    feature  (location)
> *
> * MediaTek vcodec enc/dec (mt8195.dtsi only)
> * PCI-Express WiFi card (mt8195 and mt8195-cherry)
> * VDOSYS1 (mt8195.dtsi and mediatek-drm/mmsys drivers)
> * DP/eDP outputs for external/internal display (mt8195 and mt8195-cherry)
> * LVTS Thermal Sensors (mt8195.dtsi, driver is missing)
> * GPU support (clocks and mtk-regulator-coupler are awaiting for review/pick)
> 
> AngeloGioacchino Del Regno (4):
>    arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support
>    arm64: dts: mediatek: cherry: Enable the Audio DSP for SOF
>    arm64: dts: mediatek: cherry: Add external codecs and speaker
>      amplifier
>    arm64: dts: mediatek: cherry: Add sound card configuration
> 
>   .../dts/mediatek/mt8195-cherry-tomato-r1.dts  |  10 ++
>   .../dts/mediatek/mt8195-cherry-tomato-r2.dts  |  10 ++
>   .../dts/mediatek/mt8195-cherry-tomato-r3.dts  |  10 ++
>   .../boot/dts/mediatek/mt8195-cherry.dtsi      | 109 ++++++++++++++++++
>   4 files changed, 139 insertions(+)
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-12-16 13:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22  9:49 [PATCH 0/4] MT8195 Acer Tomato - Audio support AngeloGioacchino Del Regno
2022-09-22  9:49 ` [PATCH 1/4] arm64: dts: mediatek: cherry: Add Audio Front End (AFE) support AngeloGioacchino Del Regno
2022-09-22  9:49 ` [PATCH 2/4] arm64: dts: mediatek: cherry: Enable the Audio DSP for SOF AngeloGioacchino Del Regno
2022-09-22  9:49 ` [PATCH 3/4] arm64: dts: mediatek: cherry: Add external codecs and speaker amplifier AngeloGioacchino Del Regno
2022-09-22  9:49 ` [PATCH 4/4] arm64: dts: mediatek: cherry: Add sound card configuration AngeloGioacchino Del Regno
2022-10-07  8:42 ` [PATCH 0/4] MT8195 Acer Tomato - Audio support Chen-Yu Tsai
2022-10-07  8:52   ` AngeloGioacchino Del Regno
2022-11-18 10:14     ` AngeloGioacchino Del Regno
2022-12-16 13:41 ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®