<DylanVanAssche>
srinik: I managed to get almost everything working on SDM845 with WCD9340 codec. However, when switching between earpiece and headphones, it breaks earpiece audio. Headphones keeps working (but sometimes the audio is cracking). dmesg (with audio cracking, see overcurrent): https://paste.debian.net/1245564/ and dts: https://paste.debian.net/1245565/
<rawoul>
it's not finished and progressing very slowly since I have little time to work on it unfortunately
<rawoul>
but it works in my setup
<srinik>
DylanVanAssche: Can you check the level of gains, Also thinking about this it is worth implementing .mute_stream call back in wcd934x_dai_ops which should take care of this properly.
<DylanVanAssche>
srinik: I printed the contents with amixer and all gains stay the same between the working and non-working situation.
<DylanVanAssche>
srinik: How do you see .mute_stream? I'm not that familiar with the ALSA driver stuff
<srinik>
DylanVanAssche: so implementing a digital mute would help such situations..
<DylanVanAssche>
srinik: Implementing digital mute, would that also help keeping the earpiece working? It works on boot.
<DylanVanAssche>
Digital mute, would be setting a control I think? I don't have any documentation about the WCD chips
cxl000 has joined #linux-msm
<calebccff>
It would be great to get earpiece/headphone switching working before dealing with other issues
<srinik>
DylanVanAssche: wcd934x does not have mute implemented in the codec driver yet.. its worth a shot to implement this. .I got few things in my plate to finsh off before looking at this..
<DylanVanAssche>
calebccff: Well but the cracking is kinda related to it, it happens after switching (like 50% of the cases)
<calebccff>
ah right
<srinik>
DylanVanAssche: is cracking happening before/after playback or while playback in progress?
<srinik>
DylanVanAssche: digital mute can help the former case.. not the later
<calebccff>
srinik: could you point us to the missing bits for muting? Perhaps the earpiece is getting muted by the chip and we're missing the code that would unmute it
<srinik>
calebccff: downstream code should have most of the bits.. but I can recheck it once again
<DylanVanAssche>
srinik: boot -> play headphones OK -> switch to & play earpiece -> OK -> switch headphones -> cracking in 50% cases + earpiece completely no sound (until rebooted). If you switch directly to earpiece on boot, same behavior.
<srinik>
DylanVanAssche: have you tried to check the register dumps for both working and non-working case?
<DylanVanAssche>
srinik: `amixer -c0 contents` you mean? I checked those
<srinik>
DylanVanAssche: no regmap registers from /sys/kernel/debug/regmap/...
<DylanVanAssche>
srinik: Ah no, I can check those.
<calebccff>
srinik: the hphl/r handling code explicitly disables the mute by writing to WCD934X_CDC_RX[1,2,3...]_RX_PATH_MIX_CTL, but there's no such thing for the earpiece on RX0
<srinik>
DylanVanAssche: that might give some clues.. even tracing reg writes in both the case should help aswell
<ndec>
rawoul: i will share your notes with dmitry. he is out this week, and likely might not see them.. thanks for sharing!
<lumag>
rawoul: thanks a lot for sharing! I'm taking a peek this moment. Three CEC support.... I'm eager to see this on the mailing list!
<rawoul>
lumag: thanks for checking out the patches, I will try to cleanup what already works (proper commit messages), I need to make my db820c boot before then to make sure I don't introduce regressions. I also haven't tested properly without "pd_ignore_unused" and "clk_ignore_unused", but clock trees are hard on qcom chips :)
<lumag>
rawoul: week I should be able to test on 820c and on ifc6410
<rawoul>
my main problem even with those flags is that the extp clock cannot be brought up again after it's brought down (after a mode resolution change), I'm not sure why
<lumag>
This sounds like a gdsc issue. Maybe bamse can comment on this
<lumag>
Is it in 8996 or 8998?
<lumag>
The extp issue
<calebccff>
bamse: do you know why recvfrom would return EAGAIN for qrtr? The same code was working before I put it in it's own thread
<calebccff>
hmm, eagain = no data to read? weird
<rawoul>
lumag: 8998
<lumag>
rawoul: let's see if bamse knows more
<steev>
my understanding is that clk_ignore_unused will be required for a very long time
<bamse>
calebccff: that should be because your socket is non-blocking
<calebccff>
right, thanks, i put the send and receive code in different threads and i think that's causing some issues, sorry for the random ping
<bamse>
rawoul: which clock is that?
<rawoul>
bamse: it is MDSS_EXTPCLK_CLK on msm8998. I might set the wrong power-domains on the hdmi tx controller, as lumag suspected. Currently I have "power-domains = <&rpmpd MSM8998_VDDCX>, <&mmcc MDSS_GDSC>"
<bamse>
two power-domains?
<rawoul>
I have to say I'm completely unaware of what I'm doing when dealing with power domains... I've tried to make it work by looking at the downstream dt bindings but they are splitted very differently
<bamse>
okay, so if you have a single power-domains, it will be turned on/off following the pm_runtime state
<bamse>
if you > 1 then that won't happen automagically, so the driver needs to handle that
<bamse>
i'm not familiar with the hdmi driver, but most likely you specifying both means that neither is requested enabled
<bamse>
i believe MDSS_GDSC is your power domain, and that is likely subdomain of VDDCX...but you probably don't need to bother with VDDCX...it's on
<rawoul>
MDSS_GDSC might also not be needed since it's the power domain of the MDSS block
flto_ has joined #linux-msm
arnd_ has joined #linux-msm
flto has quit [synthon.oftc.net larich.oftc.net]
srinik has quit [synthon.oftc.net larich.oftc.net]
jstultz has quit [synthon.oftc.net larich.oftc.net]
sumits has quit [synthon.oftc.net larich.oftc.net]
arnd has quit [synthon.oftc.net larich.oftc.net]
flto_ has quit []
jstultz has joined #linux-msm
srinik has joined #linux-msm
flto has joined #linux-msm
srinik has quit [Ping timeout: 481 seconds]
sumits has joined #linux-msm
jstultz has quit [Ping timeout: 481 seconds]
srinik has joined #linux-msm
jstultz has joined #linux-msm
pespin__ has quit [Remote host closed the connection]
jhovold has quit [Ping timeout: 480 seconds]
<Mis012[m]>
bamse: well... "don't need to bother with" doesn't necessarily mean it shouldn't be specified...? I guess in this case ideally the power domain driver knows that MDSS_GDSC depends on VDDCX being enabled, unless the hw handles that by itself
<Mis012[m]>
rawoul: hm, right... it's probably not correct to put it in the HDMI node then
<Mis012[m]>
though maybe there's no devicetree node for the MDSS block as a whole?
<Mis012[m]>
would probably be simple-power-managed-bus
<rawoul>
Mis012[m]: there is a node for mdss, which is the parent for mdp, dsi0, dsi0_phy, ..., hdmi and hdmi_phy
<Mis012[m]>
then I guess it would make sense to have it there
<Mis012[m]>
clocks are indeed fun...
<rawoul>
I'm not sure power domains are the issue for the MDSS_EXTPCLK_CLK clock being stuck because the output of /sys/kernel/debug/pm_genpd//sys/kernel/debug/pm_genpd/pm_genpd_summary is the same on boot (when extpclk_clk_src and mdss_extpclk_clk are enabled) and after hdmi modeswitch