Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Multiroom / power on-off amp
#5
Right, the receiver opens the audio device and leaves it open while its waiting for data packets from the sender.

The receiver daemon does not post a "play state" event indicating whether it's playing or not, and I'm not sure that state can be determined by an external program. I checked various ALSA blocks and no luck seeing an indication of play state.

# ALSA device block (card1 = Heaphone)
Code:
pi@pb1:~ $ ls /proc/asound/card1/pcm0p/sub0/

hw_params  info  prealloc  prealloc_max  status  sw_params

# ALSA commands
Code:
alsabat
alsabat-test
alsacap
alsactl
alsa-info
alsaloop
alsamixer
alsatplg
alsaucm

TRX Receiver source
https://github.com/bitkeeper/trx/blob/fe...urtis/rx.c

I did a quick test of the receiver in debug mode while sender is stopped and then playing and there were no NULL packets reported. In other words no obvious way to determine the play state from debug output.

Code:
sudo killall trx-rx
sudo trx-rx -d plughw:1,0 -h 239.0.0.1 -p 1350 -m 128 -j 64 -f 1920 -R 45 -v 2

I can add "Code a trx-rx event to indicate play state" to the TODO list but practically speaking its going to take another dev to do the investigation and work because of time constraints on my end.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
Multiroom / power on-off amp - by ptoschi - 02-14-2024, 08:15 AM
RE: Multiroom / power on-off amp - by Tim Curtis - 02-14-2024, 11:45 AM
RE: Multiroom / power on-off amp - by ptoschi - 02-15-2024, 06:04 PM
RE: Multiroom / power on-off amp - by ptoschi - 02-16-2024, 09:24 AM
RE: Multiroom / power on-off amp - by Tim Curtis - 02-16-2024, 01:03 PM
RE: Multiroom / power on-off amp - by Nutul - 02-16-2024, 03:39 PM
RE: Multiroom / power on-off amp - by Tim Curtis - 02-16-2024, 03:47 PM
RE: Multiroom / power on-off amp - by ptoschi - 02-17-2024, 02:30 PM

Forum Jump: