ytrio has quit [Quit: Connection closed for inactivity]
jhovold has joined #linux-msm
niej has quit [Remote host closed the connection]
Daanct12 has joined #linux-msm
niej has joined #linux-msm
<z3ntu>
Hi, I'm fighting since quite a while with getting speaker (MI2S to external amplifier which is controlled with I2C) to output proper sound. With some hacks (like increasing mi2s clk in kernel driver) I can get the audio to play back reasonably well but the sound is barely audible, just when you hold the speaker close to the ear. So somewhere some volume control or something is wrong. I've seen this on both SM7225 (SM6350) and QCM6490 (SC7280)
<z3ntu>
phones, both have similar audio setup with quinary MI2S to the external amp
<z3ntu>
Anybody got any tips what to look at? I've also dug through a bunch of (confidential) qualcomm docs but haven't found anything useful
<travmurav[m]>
Luca Weiss: does the amp have some control knob for volume maybe?
<travmurav[m]>
since I'd assume i2s would be "line level" by default
<travmurav[m]>
as it's digital anwyay
<z3ntu>
travmurav: I believe the amp does have something but I've even traced i2c communication between downstream and mainline and seems the same
<travmurav[m]>
ugh interesting
<z3ntu>
The amp also loads some sort of firmware but I'm pretty sure that's also the same
<travmurav[m]>
Luca Weiss: is it those awinic amps in fp5?
<z3ntu>
I'd really love to attach a probe to the i2s bus but since it's a production phone it's probably super annoying
<z3ntu>
Yes FP4 and FP5 both have some awinic amp
<travmurav[m]>
seems like fp5 has i2s testpoints even, fun
<travmurav[m]>
but hm I guess it's connected to vbat for spekaer power so no regulator to miss there...
<z3ntu>
Oh if it does have a test point there I definitely need to attach something. Honestly didn't look for that yet
<travmurav[m]>
TP2501~04
<travmurav[m]>
according to the official fp5 schematic at least
<travmurav[m]>
Luca Weiss: but I'd assume it might be something like "amplifier level" kind of thing in the amp itself
niej has quit [Ping timeout: 480 seconds]
<travmurav[m]>
that is set to minimum/bypass by default
<travmurav[m]>
Luca Weiss: just that my experience so far was that "dumb" i2s amps "just work" with i2s data being "line level"
<z3ntu>
I have no other info than that schematics document either 😉 Found the TPs on the board also, unfortunately on the back side of what you see from the back (so front)
<z3ntu>
So probably need to solder some wires to it
<z3ntu>
That amp unfortunately thinks too much I believe, since it loads firmware and needs plenty of i2c commands it is not dumb :(
<travmurav[m]>
yeah but what I implied is "I blame the amp not the soc bits" xD
<z3ntu>
Currently I just have no clue where things are going wrong volume-wise, either something in ADSP is going wrong and sending quiet audio via i2s, or i2s is full volume and amplifier is doing something wrong. I think that's kind of the possibilities
<travmurav[m]>
right, I guess the first one might be easiest to check by tapping to the line indeed...
<z3ntu>
Yeah guess I'll do that once I'm back to where I have this equipment
<z3ntu>
So far I've always blamed the qcom kernel stack but good to check who's at fault
niej has joined #linux-msm
Daanct12 has quit [Quit: WeeChat 4.2.1]
Daanct12 has joined #linux-msm
Daanct12 has quit [Quit: WeeChat 4.2.1]
Daanct12 has joined #linux-msm
niej has quit [Read error: Connection reset by peer]
pespin has joined #linux-msm
<strongtz[m]>
umm does anyone know why the Snapdragon Sensor Core service (Service 400) doesn't appear in qrtr-lookup on sm8550?
<strongtz[m]>
I tried both userpsace and in-kernel pd-mapper (w/ adsp_sensor_pd added to sm8550_adsp_domains)
<strongtz[m]>
while in Android qrtr-lookup there is `400 1 0 5 24 <unknown>`
<DylanVanAssche>
strongtzThat's for hexagonrpcd to do fastRPC stuff
<DylanVanAssche>
To load the JSON files of the sensors
<DylanVanAssche>
It could be that the firmware does not expose the service until it has the files, this is not the case for SDM845, there it exposes the service but without any sensors available.
<DylanVanAssche>
Maybe they changed things, I don't know, I can only reverse engineer, no docs here
<strongtz[m]>
hmm okay, I guess I may also need to dig into Android :)
<DylanVanAssche>
strongtzYou need these patches as well to make the loading work otherwise none of the sensors will even appear. All of them are already in mainline except the one of the FastRPC driver
<narmstrong>
z3ntu: thx for testing the 4 lanes setup :-)
<narmstrong>
z3ntu: by curiosity, what did you plug ? I tested with an USB-C to DP cable to a DP native monitor, it was the only plug trying 4 lanes
<z3ntu>
narmstrong: it's a dongle that has 2x (I think) 1080p monitors attached
<narmstrong>
what's weird it the dp driver is supposed to reduce num_lanes at each train attempt, so even if the 4 lanes setup was wrong it would test 2 and 1 lanes and should succeed
<narmstrong>
=> dp_ctrl_link_lane_down_shift()
<narmstrong>
so it means the PHY is in a bad state
<narmstrong>
z3ntu: interesting, does it work in 2 lanes?
<z3ntu>
narmstrong: without the patches, both monitors light up (mirrored) with 1920x1200 60Hz configuration and dp_debug says 2 lanes
<narmstrong>
Nice dongle, can you share the model?
<z3ntu>
Zero markings on there apart from this "logo"
<narmstrong>
z3ntu: ah ah ok I'll look for something similar then!
pespin has quit [Remote host closed the connection]
mripard has quit [Quit: mripard]
<JIaxyga[m]>
<z3ntu> "Yes FP4 and FP5 both have some..." <- Oh we can test this amp on sweet sm7150
<JIaxyga[m]>
This was just discussed today
<JIaxyga[m]>
I also saw in your commits that you have problems getting speaker and earpiece to work at the same time (at least in some old branch)
<JIaxyga[m]>
I have the same problem on surya. They work separately, but not together. (Perhaps I just need to edit the alsa cfg correctly, but I'm not very knowledgeable about this)
<z3ntu>
But no, for me even though it's quiet, audio is coming out of both top and bottom speaker (a.k.a earpiece and speaker) if both are hooked up in dts
<z3ntu>
JIaxyga: Also any particular reason you've configured TERTIARY_MI2S_TX in q6afedai?
<JIaxyga[m]>
z3ntu: Because surya uses tert?
<z3ntu>
TERTIARY_MI2S_RX makes sense, I'm asking about TX so TERTIARY_MI2S_TX