mmind00 changed the topic of #linux-rockchip to: Rockchip development discussion | public log at https://libera.irclog.whitequark.org/linux-rockchip
stikonas has quit [Read error: Connection reset by peer]
stikonas has joined #linux-rockchip
stikonas has quit [Read error: Connection reset by peer]
stikonas has joined #linux-rockchip
qschulz has quit [Remote host closed the connection]
qschulz has joined #linux-rockchip
stikonas has quit [Ping timeout: 264 seconds]
sL1pKn07 has joined #linux-rockchip
vagrantc has quit [Quit: leaving]
naoki has quit [Quit: naoki]
System_Error has quit [Ping timeout: 260 seconds]
System_Error has joined #linux-rockchip
Net147 has quit [Quit: Quit]
Net147 has joined #linux-rockchip
Net147 has quit [Changing host]
Net147 has joined #linux-rockchip
Stat_headcrabed has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
warpme has joined #linux-rockchip
warpme has quit [Client Quit]
naoki has joined #linux-rockchip
naoki has quit [Client Quit]
werdahias has joined #linux-rockchip
psydroid has joined #linux-rockchip
warpme has joined #linux-rockchip
stikonas has joined #linux-rockchip
werdahias has quit [Quit: werdahias]
werdahias has joined #linux-rockchip
dsimic has quit [Ping timeout: 255 seconds]
dsimic has joined #linux-rockchip
Stat_headcrabed has quit [Quit: Stat_headcrabed]
werdahias has quit [Quit: werdahias]
werdahias has joined #linux-rockchip
raster has joined #linux-rockchip
werdahias has quit [Remote host closed the connection]
<mort> does anyone know anything about i2s on the rk3588?
<mort> I *think* I enabled i2s1 in the devicetree? But there's still only one card in alsamixer. But that card is called "card 0: rockchiphdmi0 [rockchip-hdmi0], device 0: rockchip-hdmi0 i2s-hifi-0 [rockchip-hdmi0 i2s-hifi-0]"
<mort> how can card 0's device 0 be both rockchip-hdmi0 and i2s-hifi-0
<wens> a card can have multiple pcm streams
<wens> plus, you would need to add descriptions to DT on how to tie i2s1 to a codec, using something like simple-audio-card. then you would get another card in the system
<wens> minute: all PCIe peripherals (both ethernet controllers, M.2 E key, M.2 B key) work fine for me on Orange Pi 5 Plus on next-20240215
<mort> wens: that sounds like exactly what I'm missing, but I don't know how I'd go about that
<mort> there's an hdmi0-sound node which refers to the hdmi@fde80000 node as its 'rockchip,codec', I guess I need something similar which refers to the i2s@fe480000 node as its codec
<mort> ...but I also have no idea how to really do that, so help would be greatly appreciated
<wens> adjust for your codec
<mort> I don't think I understand exactly how this audio stuff fits together, e.g what a "codec" is and what a "dai" is and what a "card" is
<mort> or what a "cpu" is
<mort> but okay, in your case, the i2s node is the "cpu" and the i2c node contains the "codec"
<mort> wens: I don't understand why you're setting codec's compatible to ti,pcm5122 or its reg to 0x4d
<mort> isn't it a bit weird that something as basic as "output sound on this linux computer" requires digging so extremely deep into devicetree stuff?
<wens> mort: well, i2s is just a digital audio interface. you need a codec to convert that to analog
<mort> that's an external dac connected via i2s, which gets configured via SPI in userspace
<mort> I literally just wanna send digital sound over the i2s gpio pins
<CounterPillow> i2s is a non-self-enumerating bus so yes device tree is a requirement, otherwise how would you describe the hardware?
<wens> mort: as far as ALSA knows, I2S is only part of a card, you need to give it the other parts
<mort> CounterPillow: right but I just want to say "send digital sound via i2s1", I get that some level of devicetree stuff is required for that but this seems like a lot
<mort> wens: can I give it "dummy" versions of those other cards somehow..?
<mort> things like volume control will also happen via spi in userspace
<wens> for now, just use "ti,pcm5102a" for the codec. It's a dumb codec.
<mort> and the reg?
<mort> also you put it as a sub-node under i2c2, where am I supposed to put it?
<wens> no reg. and move that node up to the root node, at the same level as the audio card
<mort> alright
<wens> for the kernel, you'll need CONFIG_SND_SOC_PCM5102A and CONFIG_SND_SIMPLE_CARD for those two
<mort> SND_SIMPLE_CARD is enabled, SND_SOC_PCM5102A isn't even there (it was presumably added after 5.10?)
eballetbo has joined #linux-rockchip
<mort> very weird that there's no way to tell alsa, "just send digital audio data through this digital audio interface you know exists"
<wens> it could be blocked behind some other option
<mort> it's not like we need the PCM5102A anyway right, we just need to find another codec driver which doesn't mess stuff up too badly by being too smart
<mort> how about the TS3A227E, that's =y
<mort> or SND_SOC_DUMMY_CODEC sounds relevant?
<wens> I've not tried anything else
<mort> wens: why does your overlay work even though https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/sound/pcm512x.txt claims that there are 3 required power supply related properties that you didn't provide?
Stat_headcrabed has joined #linux-rockchip
<mort> ok hang on
<mort> I've spent the past 20 minutes trying to find a codec driver that's 1) enabled in my kernel config and 2) stupid enough to work even though the thing it's driving doesn't actually exist
<mort> and the only reason I need this is to trick Linux into letting me send digital audio data through the digital audio interface that Linux already knows exists
<mort> this *can't* be the right solution, there *has* to be a better way
Stat_headcrabed has quit [Quit: Stat_headcrabed]
<mort> so, realistically, what do I do
<minute> wens: thank you very much, i also wrote here that i made it work by feeding another refclk into port1 of pcie3. i only had one fed into port0 but it looks like the IP needs both to work
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raster has quit [Quit: Gettin' stinky!]
raster has joined #linux-rockchip
psydroid has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
warpme has joined #linux-rockchip
warpme has quit [Client Quit]
<mort> wens: alright so I found the linux,spdif-dit codec which is supposed to be pretty dumb. I now have this in the devicetree: https://p.mort.coffee/Xva and a fe480000.i2s-dit-hifi card is now available
<mort> however, when I play audio through it, only the sclk pin has data on it; none of the others seem to do anything
<mort> not the dto pins, not the lrclk pin
naoki has joined #linux-rockchip
raster has quit [Quit: Gettin' stinky!]
werdahias has joined #linux-rockchip
eballetbo has quit [Quit: Connection closed for inactivity]