-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fairphone 3 speaker support #137
base: 6.4.7/main
Are you sure you want to change the base?
Conversation
FP3 doesn't use wcd_codec, remove bits from msm8953.dtsi Commands: echo start | sudo tee /sys/class/remoteproc/remoteproc0/state amixer -c0 cset name='QUIN_MI2S_RX Audio Mixer MultiMedia1' 1 amixer -c0 cset name='aw8898_speaker_switch' 1 aplay -D plughw:0,0 testfiles/03.wav
You could override audio-routing and maybe we could add a label for dai-link and than you can delete it with /delete-node/. |
I'd mostly say non-common stuff (like the stuff I commented out) just shouldn't be in msm8953.dtsi but should be in device dts or so. |
I understand audio-routing could be moved out because it is different on almost every device, but what about the dai-link many device uses the wcd_codec, i don't really like the approach duplicating stuffs. With a label you could override the |
Just pulled this in on v6.11.1. It needs this patch to compile if drivers are compiled as modules:
And gives a few compile warnings:
|
Also no sound yet, in qpwgraph I only get dummy input and output devices
Edit: Probably I'm missing an important CONFIG_ option. Edit2: I also have a sound card error in dmesg:
|
Didn't try lately, but did you have adsp booted in your testing? Also the commands you need to run in user space are in the last commit message, but I guess you've also seen them. |
The adsp is reported as running in sysfs when I boot into debian. I've compiled every sound option and the remoteprocs with CONFIG_*=y, at least the deferred probe error is gone, but still only dummy devices in qpwgraph. |
When I try to adjust the aw8898_rx_volume in alsamixer, I always get these messages in dmesg:
Perhaps a missing clock CONFIG option? |
@spasswolf Did you try the exact branch of this PR? Might be worth to compare if there's something else wrong in your stack. |
Just tried your branch (6.4.7/main/fp3-audio, commit 012f14b), and got the same error again and a new one
Here's the full dmesg after booting: Here's the .config I used: Edit: If you have a .config that works for you, that would be interesting, too. |
Ubuntu touch running in Slot A of my fairphone-fp3 seems to use this as the sound card:
I've found something similar in the msm8996-xiaomi-common.dtsi devicetree:
The relevant devicenodes in the downstream (4.9) FP3 kernel are in msm8953-audio.dtsi:
|
For defconfig, normally I push them to the same branch. Weird I forgot. In an older branch z3ntu@e49f019#diff-51e9ac942cbedfdaf79995df045cabed9d28c14dc6a166cb2f33f9b252fb70bc I see |
Also important question which I just remembered, do you have a FP3 or FP3+? The audio amplifier chip is different in the two. FP3 has AW8898 while FP3+ has TAS2557. |
I have the normal FP3, in ubuntu touch I get messages from aw8898 in dmesg, too. In branch (6.4.7/main/fp3-audio, commit 012f14b), there are no slim nodes (and no wcd9335) in the devicetree, perhaps I need to those to get working audio. |
Just confirmed this branch works still with this .config and the commands in the last commit message. It's basically |
I used your .config and have working sound with aplay now and have "Built-in Audio Stereo" devices in qpwgraph (instead of dummy_devices as before), but still cannot change the volume with alsamixer (same error as before), music plays at the same volume even thought aw8898 volume is 0 in alsamixer.
In 6.11.1 I also have working sound with aplay, but no sound devices are detected in gnome (and gnome sound settings do nothing). |
I think generally only e.g. pulseaudio reduces the volume and sends that audio stream, and no hardware controls are used to change the volume.
You need ALSA UCM for pulseaudio to properly detect the audio device. |
Imports downstream amplifier driver (which isn't pretty of course, but works...).
Not quite sure how to handle the required
#if 0
inmsm8953.dtsi
I added (which are necessary because FP3 doesn't use wcd_codec). Should we just move this out ofmsm8953.dtsi
into the device dts which do use wcd_codec?If that's resolved, I'll of course rework the commits and make them prettier.