ChanServ changed the topic of #linux-msm to:
lumag_ has quit [Ping timeout: 480 seconds]
qyousef_ has joined #linux-msm
qyousef has quit [Ping timeout: 480 seconds]
marvin24 has joined #linux-msm
marvin24_ has quit [Ping timeout: 480 seconds]
pevik_ has joined #linux-msm
Daanct12 has joined #linux-msm
jhovold has joined #linux-msm
lumag_ has joined #linux-msm
Daanct12 has quit [Ping timeout: 480 seconds]
pevik_ has quit [Quit: Lost terminal]
pespin has joined #linux-msm
lumag_ has quit [Remote host closed the connection]
lumag_ has joined #linux-msm
Daanct12 has joined #linux-msm
Daanct12 has quit [Remote host closed the connection]
Daanct12 has joined #linux-msm
lumag_ has quit [Ping timeout: 480 seconds]
Daanct12 has quit [Remote host closed the connection]
lumag_ has joined #linux-msm
<calebccff> lumag: you're working on msm8960? Can I ask what for?
<calebccff> I have an 8960 device I really want to get going :>
lumag_ has quit [Ping timeout: 480 seconds]
<aka_[m]> srinik: are PCM clocks set somewhere in q6afe or i have to set every single one?
<aka_[m]> It looks like it starts with 9.6Mhz just like Internal codec from msm8916-wcd
<srinik> aka_[m]: we have to set this individually for each cpu dai in machine driver using snd_soc_dai_set_sysclk, ex: some examples in apq8016_sbc.c
<aka_[m]> i now try to understand packets and i assume
<aka_[m]> second one is port + DAI in that case 0x2c on Quinary
<aka_[m]> 00000010: 000100ef 002c1016 00000000 00000000
<aka_[m]> srinik: well i do use apq8016_sbc.c i meant i its being set by this driver so i can ignore PCM and just add ibit/this single one mi2s OSR for quin
<aka_[m]> s/i/if/
<aka_[m]> entire dai init and rest is inside that driver i see.
<aka_[m]> so far from inspecting packets it appears only Primary and Quinary is being set
<aka_[m]> i thought Tertiary is somehow related to analog codec
<srinik> aka_[m]: none of the clks are set other than from machine drivers. For I2S all you need to set is IBIT and MCLK
<aka_[m]> and i have question about multimedias, can i skip links in dts?>
<aka_[m]> or its possible to set all of them to be from quin inside alsa-ucm-conf
<srinik> aka_[m]: regarding packet format you can take a look at struct afe_port_cmd_set_param_v2 in q6afe.c and 0x000100EF corresponds to AFE_PORT_CMD_SET_PARAM_V2
<srinik> aka_[m]: We need both Frontend and backend dais in dts, for Frontend Dais are MultiMedia[1..8] and backend dais would be your codec nodes. both of these should in the dts for machine driver to be able to build dai_links.
<srinik> aka_[m]: you can also manually build dai_links in machine driver but you would need to specify exact dai name to be able to bind to sound card.
<aka_[m]> and what will happen if q6routing assume Multimedia2 wants to go with Tetr interface which i disabled?
<aka_[m]> there is msm8916 fork of alsa-ucm-conf which have this q6components conf
<srinik> aka_[m]: you can mix any frontend with backend using Mixer controls like 'QUAT_MI2S_RX Audio Mixer MultiMedia1' ...etc
<aka_[m]> i exactly did that
<aka_[m]> and it was throwing me that it cannot something backend dai
<aka_[m]> but maybe thats because my QUIN was failing
<aka_[m]> lets try now once again.
<srinik> aka_[m]: yes, we can only do playback once both frontend and backend dais are connected, also make sure that you are playing on correct card device and subdevice id.
<aka_[m]> this is kinda hard for me to understand
<aka_[m]> downstream mixer path have mm4 as deep buffer or something
<aka_[m]> i assume WCD device contains card_index,subdevice_id
<aka_[m]> so in theory if there is mm1 mm2 mm3 and mm4 and i want to play on mm4 i should set it to 0,3?
<srinik> aka_[m]: downstream is bit different, they define dai links statically in the machine driver. if you have lets say mm1, mm2 in your dts as frontend dais then in aplay you should see them as card 0, subdevice 0, and subdevice 1
<srinik> aka_[m]: then lets say you wanted to play something on a QUAT_MI2S connected codec, first we set mixer "amixer cset iface=MIXER,name='QUAT_MI2S_RX Audio Mixer MultiMedia4' 1"
<srinik> aka_[m]: them aplay -D plughw:0,0 test.wav
<aka_[m]> so we route MM4 to QUAT ?
<srinik> aka_[m]: sorry I meant MM1
<aka_[m]> so MM are like virtual routes which we set to output to specific interface?
<srinik> aka_[m]: something like "amixer cset iface=MIXER,name='QUAT_MI2S_RX Audio Mixer MultiMedia1' 1
<srinik> aka_[m]: MM are PCM interfaces that can be connected to any backend dai devices...
<srinik> aka_[m]: this should help you a bit https://www.kernel.org/doc/html/v5.17/sound/soc/dpcm.html
<aka_[m]> well even if so im a little(or a lot) too dumb to understand that xD
<aka_[m]> uh its failing me
<aka_[m]> MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1
<aka_[m]> What can be wrong there?
<srinik> aka_[m]: mm1-dai-link should be inside sound node
<aka_[m]> its under sound-card@c051000
<aka_[m]> which is apq8016_sbc.c
<srinik> aka_[m]: it was not clear in https://pastebin.com/X0aTgYRT i see it at very end not sure which node it belonged to.but it should look somthing like https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/qcom/sdm845-db845c.dts?h=v5.18-rc1#n651
<aka_[m]> its same like this
<srinik> aka_[m]: can you also share output of aplay -l and which mixer command you are setting?
<aka_[m]> i have dummy output in gnome settings so uh
<aka_[m]> pulse ends with PCM IOCTL prepare failed
Danct12 has quit [Remote host closed the connection]
<aka_[m]> alsa-util.c: Failed to set hardware parameters on plug:SLAVE='hw:0': Invalid argument
Danct12 has joined #linux-msm
<aka_[m]> something is showing now
<aka_[m]> wcdplaybackpcm is from analog and playbackpcm is from digital?
<aka_[m]> srinik: there is some noise
<aka_[m]> weird af
<aka_[m]> once i got adsp up wcnss start to act
<aka_[m]> disabled bt maybe it has issues with both running
<aka_[m]> well there is no sound at the end
<aka_[m]> it shows one device
<aka_[m]> "analog output"
<aka_[m]> something is wrong
<Mis012[m]> noise sounds like progress
<aka_[m]> well
<aka_[m]> qdsp not crashing
<Mis012[m]> also that
<aka_[m]> shouldnt i have more devices to output?
<Mis012[m]> well... in the end, yes
<Mis012[m]> presumably
<aka_[m]> and there is no input devices
<aka_[m]> i assume i have to try get tert up
<Mis012[m]> headphones are usually separate from speaker
<srinik> aka_[m]: dsp is consuming buffers is a good sign, do you also configure Word select clk source using snd_soc_dai_set_fmt ?
<aka_[m]> its inside msm8916_qdsp6_dai_init
<srinik> aka_[m]: have you setup the codec mixers that is other thing to look at.
<Mis012[m]> srinik: xtensa DSP or hexagon DSP? :P
<aka_[m]> its all dark magic for me
<Mis012[m]> there are too many DSPs in this pipeline
<aka_[m]> i just added clock setup and ucm
<aka_[m]> it was working without anything more on my other device
<srinik> aka_[m]: i meant q6dsp
<aka_[m]> Mis012: Can you translate
<Mis012[m]> well...
<Mis012[m]> q6 means hexagon v6.x presumably
<Mis012[m]> but all of the sound stuff if sw defined afaik
<aka_[m]> i have codec added under quinary mi2s
<aka_[m]> sdlines set to 0
<aka_[m]> this seems to be in liine
<aka_[m]> ws_src=1 is equal to
<aka_[m]> and thats what is done inside dai init of qdsp6
<Mis012[m]> I guess so?
<aka_[m]> well and what about enable sequence for speaker?
<aka_[m]> i kinda kanged it from Vknecht
<Mis012[m]> idk, try headphones? :P
<aka_[m]> this device has no headphone jack
<Mis012[m]> oof
<aka_[m]> and usb muxing stuff for audio
<aka_[m]> both digital and analog
<aka_[m]> t has earpiece but it does not show
<aka_[m]> in gnome settings just like headphones
<aka_[m]> its just "analog output" there
<Mis012[m]> well, is it in the dts?
<Mis012[m]> and ucm
<aka_[m]> i assume switching is related to Vknecht's RCV gpios
<aka_[m]> right?
<Mis012[m]> ¯\_(ツ)_/¯
<aka_[m]> i see no such thing in your device
<Mis012[m]> I'd try to start with the simplest sound ouptut
<Mis012[m]> so earpiece maybe
<aka_[m]> are you getting that i don't have it on selection of outputs and im to dumb to find how to select that?
<aka_[m]> ok rebuilding now lets see what i will see
<Mis012[m]> well, I'd assume that you're missing stuff in dts or ucm
<aka_[m]> might miss headset
<aka_[m]> lemme see
<aka_[m]> well
<aka_[m]> it has headphones inside
<aka_[m]> not sure how earpiece is handled
<aka_[m]> okh yes its separate
<aka_[m]> gonna add, your samsung has no earpiece
<Mis012[m]> eh, it does have an earpiece :P
<Mis012[m]> might be using some other lines for it than qcom intended, but it's there
<aka_[m]> its still only showing "analog output"
<aka_[m]> its weird tho
<aka_[m]> because with external amp it should show something else
<aka_[m]> still something must be rong
<aka_[m]> i see mainline doing CMD: AFE_SVC_CMD_SET_PARAM
<aka_[m]> it does not happen at all on downstream
<Mis012[m]> does that noise you mentioned come from the speaker? :P
<aka_[m]> that was something else
<aka_[m]> not noise
<aka_[m]> i assume its related to routing
<aka_[m]> wait 0x33=51
<aka_[m]> #define SECONDARY_TDM_TX_551
<aka_[m]> ok so reverting MM1 to use Primary Mi2S ended with crash again
<aka_[m]> with same issue
<aka_[m]> -110
<Mis012[m]> timeout?
<aka_[m]> some clocks not set
<aka_[m]> with QUIN it was enought to set OSR one
<aka_[m]> there are 10 packets to configure ports
<aka_[m]> Mis012: imma try add more clocks there and hope it will not crash
<aka_[m]> its haard
<aka_[m]> really
<aka_[m]> and Primary still keep crashing
jhovold has quit [Ping timeout: 480 seconds]
jhovold has joined #linux-msm
jhovold has quit [Ping timeout: 480 seconds]
pespin has quit [Remote host closed the connection]
lumag_ has joined #linux-msm
<aka_[m]> srinik: so anything other than QUIN crashes device and i came to conclusion i might need new type of fe dais to q6asm-dai.c as this one only supports MultiMedia type and i need hostless ones.
<aka_[m]> * might need to add new type
lumag_ has quit [Ping timeout: 480 seconds]
lumag_ has joined #linux-msm
_whitelogger has joined #linux-msm
Daanct12 has joined #linux-msm
cxl000 has joined #linux-msm