ASoC: Add q6voice ready for FP5 (on v7.1-kernel) - #32
Conversation
aa6ddc1 to
a11733e
Compare
|
@z3ntu some people confirm that with those patches calls work too on spacewar (nothing phone 1). |
Signed-off-by: Stephan Gerhold <stephan@gerhold.net> (cherry picked from commit a7f55b1) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
v2: strlcpy -> strscpy Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Signed-off-by: Nikita Travkin <nikita@trvn.ru> (cherry picked from commit eb82ba2) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net> (cherry picked from commit d04fd7b) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
This is just a stub for now. Later this would be used for features like call recording. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> (cherry picked from commit ba9cd1d) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
q6voice combines the 3 q6voice-related services (q6mvm, q6cvp, q6cvs) and allows to start/end voice calls at the moment. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> (cherry picked from commit e49b671) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The Q6 Voice DAI driver exposes the Q6 Voice subsystem to ASoC. At the moment it provides a single CS-Voice DAI with a hostless FE. Eventually usage should be simplified using a codec2codec link. v2: Set AIFs SND_SOC_NOPM v2.1: Fix __DT_BINDINGS_Q6_VOCIE_H__ typo Signed-off-by: Stephan Gerhold <stephan@gerhold.net> (cherry picked from commit fe78414) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Add function to get and set RX/TX ports and use those to un-hardcode the ports set in q6cvp_session_create() call. Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org> [use bool capture instead of enum similar to q6voice_start(), add path parameter] Signed-off-by: Stephan Gerhold <stephan@gerhold.net> (cherry picked from commit 6599fc6) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Add ALSA controls for voice RX and TX ports. Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org> [use mc->shift to mark TX mixers for now to simplify code] Signed-off-by: Stephan Gerhold <stephan@gerhold.net> (cherry picked from commit 0f30053) Link: https://github.com/msm8916-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
VoiceMMode1 is used instead of CS-Voice on newer firmwares. Signed-off-by: Otto Pflüger <otto.pflueger@abscue.de> (cherry picked from commit a3e2be3) Link: https://github.com/msm8953-mainline/linux Signed-off-by: Richard Acayan <mailingradian@gmail.com>
2e83363 to
4e13745
Compare
The codec may expect to delay data by 0, 1 or 2 bit clock cycles. Keeping the TDM ctrl_sync_data_delay value zero-initialized could result in corruption of data being read at the AFE. Add a configuration value for the data delay and send it when preparing the TDM port. Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The codec may expect to delay data by 0, 1 or 2 bit clock cycles. Keeping the TDM data delay zero-initialized by ignoring the device tree value could result in corruption of data being read at the AFE. Configure the data delay according to the value already supplied in device tree. Signed-off-by: Richard Acayan <mailingradian@gmail.com>
To use a topology ID, the DSP must first have the topology registered. Add support for registering topologies from an ACDB (Audio Calibration DataBase). No-submit: topologies are useless upstream, unless support is added to q6afe; missing dt-bindings Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The CVD 2.3 revision expects a different initialization sequence. Implement the commands to make this possible. Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Some platforms such as SDM670 have CVD version 2.3. This version requires different commands to run on creation. Add the initialization sequence for this version, using a device tree property to determine which sequence to run. No-submit: detect the params (channels, bit width, sample rate) Signed-off-by: Richard Acayan <mailingradian@gmail.com>
For some VoLTE calls between new phones, the topology IDs must be set to a value in the ACDB. Add RX and TX topology ID parameters to the functions that send the CREATE_FULL_CONTROL_SESSION command, so the correct topology IDs can be sent. Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The topology ID is now expected by q6cvp. Add the topology ID properties to the paths with accessors, and pass them to the DSP. Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The topology IDs are different between sound card models (smartphones in the context of the Pixel 3a), and even codecs. As a result, the topology IDs are not defined by the device tree, but rather by the ALSA configuration. Add controls to ALSA for the topology ID so they can be configured per codec. Signed-off-by: Richard Acayan <mailingradian@gmail.com>
The client callback for q6voice should not modify the response, as noted for the other clients in commit 86af3c2 ("ASoC: qcom: Constify APR callback response data") upstream. Mark the response data as const in q6voice to be compatible with the API change. Signed-off-by: Richard Acayan <mailingradian@gmail.com>
…kcontrol_to_dapm() The name of the function changed upstream in commit 2532041 ("ASoC: soc-dapm: rename snd_soc_dapm_kcontrol_dapm() to snd_soc_dapm_kcontrol_to_dapm()"). Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Signed-off-by: Bhushan Shah <bhushan.shah@machinesoul.in>
Signed-off-by: Val Packett <val@packett.cool>
On kodiak + wcd9375, only this topology seems to work so far for the mic. Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: Bhushan Shah <bhushan.shah@machinesoul.in>
Signed-off-by: Bhushan Shah <bhushan.shah@machinesoul.in>
4e13745 to
0c96d8a
Compare
|
Remember that this PR requires to enable |
|
The following patch fixes muting of the bottom speaker: It appears that the following commit, submitted by @valpackett on the mailing list, was changed at some point during development to remove this section (the commit is applied on Luca's kernel): Looking at the mailing list, it seems that Mark Brown commented on removing it initially: Then @valpackett said "that doesn't seem required" (not sure if this is in reference to the changes, or the comment from Mark Brown): Luca also mentioned that this is causing a warning, but I think he quoted too much text and it doesn't affect this patch (I honestly forget already if I saw any warnings when compiling this): I'm curious what Val has to say about this, but to me it seems like it was removed in haste under the assumption that it wasn't necessary to get call audio working. I still can't say whether this specific change is the correct way to get call audio working, but it certainly fixes the issue of the bottom speaker not getting muted for me. |
|
oh damit, i miss this discussion (and switch to android - lost interesset to fix/work without maintainer Feedback) |
That's unfortunate to hear, but understandable. I'm not actually sure why there has been zero feedback at all on either of your set of patches. |
|
I'm also very interested about this part! |
|
Hi @wrenix , it wasn't my intention to make it look like I'm not interested or something. |
|
I'll try to get back to fiddling with aw88261 "soon" but feel free to submit your own patches (to lkml)! All the code brought in from downstream awinic drivers (everything related to the "firmware" and its profiles) is bad. The convoluted start code path that has this mute thing is related to profile switching. The entire pattern of opaque register-value lists from loaded binaries absolutely stinks and never should've been accepted upstream, when we have datasheets that clearly describe the entire regmap of the hardware… Ideally we'd just expose all the remaining registers (like the whole amplification bypass for earpiece mode) as their own ALSA controls and eliminate all the BTW the easy hot fix would be to not touch the profile in UCM at all :p |
This removes the code responsible for keeping the aw88261 audio muted until power-on, since it appears to be unnecessary and prevents the bottom speaker from muting during calls on the Fairphone 5.
|
@z3ntu on the pmaport side, i enable more then on your fp5_defconfig / 6c1c703 : https://gitlab.postmarketos.org/wrenix/pmaports/-/commit/525cb7b33b38925647b0432b930b9d702aaf666d?file_path=device%2Fcommunity%2Flinux-postmarketos-qcom-sc7280%2Fconfig-postmarketos-qcom-sc7280.aarch64#6e42a73c557d269d3b7319942b6b6f6dd1953d8b |
|
@wrenix I have seen that, but what's the purpose of all those other options? It was working for me with just |
|
More specifically, all of those options are 100% for chromebooks ( |
adapt #27 for kernel v7.1(.2)