Skip to content

Audio (speakers only) for Mangmi Air X#2460

Closed
sunshineinabox wants to merge 21 commits intoROCKNIX:nextfrom
sunshineinabox:airxaudio
Closed

Audio (speakers only) for Mangmi Air X#2460
sunshineinabox wants to merge 21 commits intoROCKNIX:nextfrom
sunshineinabox:airxaudio

Conversation

@sunshineinabox
Copy link
Copy Markdown
Collaborator

@sunshineinabox sunshineinabox commented Mar 23, 2026

  • Enable full audio pipeline on SM6115: speakers (AW88261 x2), headphone jack (ES8326), and built-in microphone via Secondary MI2S
  • Fix DTS sound card definition with correct MCLK source (LPASS MCLK1 @ 12.288 MHz), proper codec interrupt/pinctrl configuration, and separate L/R speaker routing
  • Some initial headphones enablement

TODO:

  • Stable Speakers
  • Double prepare

@loki666
Copy link
Copy Markdown
Contributor

loki666 commented Mar 23, 2026

I'll check that.
thanks

Copy link
Copy Markdown
Contributor

@loki666 loki666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there
I think we can address HeadPhones and Mic later

Comment thread projects/ROCKNIX/packages/audio/pipewire/patches/SM6115/000-increase-buffer.patch Outdated
Copy link
Copy Markdown
Contributor

@loki666 loki666 Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that quirk file necesseary, since it's basically the same as the UCM BootSequence ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can also be deleted

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is UI audio working for you at boot without hte quirk?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, but only for PPSSPP, it works fine in others for you ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was working okay, but I wasn't sure if removing this quirk is what broke it for me since after boot I have to restart emulationstation before audio works on my dev branch and I had already removed quirk and the other patches. I'll have to bisect the changes to see what it was causing this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, that file has no effect for me

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do have UI sound in Duckstation if I launch it from the Tools menu, but launching a game crash

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably the same for PPSSPP, I only test the UI, let me test a game

Copy link
Copy Markdown
Contributor

@loki666 loki666 Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no it works in PPSSPP sa
EDIT: once

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this related to the double prepare in dmesg I'll take a look at this later today

@loki666
Copy link
Copy Markdown
Contributor

loki666 commented Mar 24, 2026

made some tests...

I managed to get sound with PPSSPP sa, but that's about it...
PortMaster, RetroArch, Duckstation (didn't test them all) hang or crash

I can see alot of dmesg errors

[   88.744706] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: q6asm_dai_prepare: private data null or audio client freed
[   88.744729] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: ASoC error (-22): at snd_soc_pcm_component_prepare() on a400000.remoteproc:glink-edge:apr:service@7:dais
[   88.782850] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: q6asm_dai_prepare: private data null or audio client freed
[   88.782874] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: ASoC error (-22): at snd_soc_pcm_component_prepare() on a400000.remoteproc:glink-edge:apr:service@7:dais

@loki666
Copy link
Copy Markdown
Contributor

loki666 commented Mar 24, 2026

I alsa had to add a wireplumber config to use software volume mixer, else volume doesnt work

monitor.alsa.rules = [
  {
    matches = [
      {
        device.name = "~alsa_card.*"
      }
    ]
    actions = {
      update-props = {
        # Do not use the hardware mixer for volume control. It
        # will only use software volume. The mixer is still used
        # to mute unused paths based on the selected port.
        api.alsa.soft-mixer = true
      }
    }
  }
]

Comment thread projects/ROCKNIX/packages/audio/pipewire/patches/SM6115/000-increase-buffer.patch Outdated
@loki666
Copy link
Copy Markdown
Contributor

loki666 commented Mar 24, 2026

managed to get the beginning of the dmesg issues

[   30.360777] aw88261 0-0035: start success
[   30.361343] aw88261 0-0034: start success
[   46.729416] aw88261 0-0035: start success
[   46.729674] aw88261 0-0034: start success
[   46.809942] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: Buffer already allocated
[   46.812701] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: cmd = 0x10db3 returned error = 0x9
[   46.812919] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: DSP returned error[9]
[   46.812925] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: q6asm_dai_prepare: q6asm_open_write failed
[   46.813339] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: ASoC error (-22): at snd_soc_pcm_component_prepare() on a400000.remoteproc:glink-edge:apr:service@7:dais
[   46.835959] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: q6asm_dai_prepare: private data null or audio client freed
[   46.835967] q6asm-dai a400000.remoteproc:glink-edge:apr:service@7:dais: ASoC error (-22): at snd_soc_pcm_component_prepare() on a400000.remoteproc:glink-edge:apr:service@7:dais

@loki666
Copy link
Copy Markdown
Contributor

loki666 commented Mar 25, 2026

yikes ... it's worst I'd say ... now only scratch is getting out the speakers

@sunshineinabox
Copy link
Copy Markdown
Collaborator Author

I'll have to take a look on my device and actually try it again, it was working at one point something recent must have broken it. Also trying to chase down headphones issue in andriod I realized only th es8326 codec is on secondary, speakers are wired quarternary so I need to test some changes also. Didn't think patch would fix it, it was too easy and cosmetic.

@loki666
Copy link
Copy Markdown
Contributor

loki666 commented Mar 25, 2026

ok so with both pipewire patches from SM8650 for the buffer size, it works fine now
https://github.com/ROCKNIX/distribution/tree/next/projects/ROCKNIX/packages/audio/pipewire/patches/SM8650

should we merge this, and continue on headphones in a new branch ?

EDIT: I still have some clicks, but maybe we need to raise the buffer a bit more
and I still see the double start in dmesg

[   29.915341] aw88261 0-0034: start success
[   29.916202] aw88261 0-0035: start success
[   30.680627] ath10k_snoc c800000.wifi: chan info: invalid frequency 0 (idx 41 out of bounds)
[   36.225615] ath10k_snoc c800000.wifi: chan info: invalid frequency 0 (idx 41 out of bounds)
[   56.055314] aw88261 0-0034: start success
[   56.055918] aw88261 0-0035: start success

but not always it would seems, just rebooted, only one couple of start succes logs, and no clicks
so there is still something fishy

@sunshineinabox sunshineinabox changed the title Audio for Mangmi Air X Audio (speakers only) for Mangmi Air X Mar 28, 2026
@loki666
Copy link
Copy Markdown
Contributor

loki666 commented Mar 28, 2026

merged in #2487

@loki666 loki666 closed this Mar 28, 2026
@sunshineinabox sunshineinabox deleted the airxaudio branch April 16, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants