mbox series

[0/4] MT8195 Acer Tomato - Audio support

Message ID 20220922094908.41623-1-angelogioacchino.delregno@collabora.com (mailing list archive)
Headers show
Series MT8195 Acer Tomato - Audio support | expand

Message

AngeloGioacchino Del Regno Sept. 22, 2022, 9:49 a.m. UTC
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

Comments

Chen-Yu Tsai Oct. 7, 2022, 8:42 a.m. UTC | #1
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?
AngeloGioacchino Del Regno Oct. 7, 2022, 8:52 a.m. UTC | #2
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
AngeloGioacchino Del Regno Nov. 18, 2022, 10:14 a.m. UTC | #3
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
Matthias Brugger Dec. 16, 2022, 1:41 p.m. UTC | #4
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(+)
>