tizonia / tizonia-openmax-il

Command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, iHeartRadio, Plex servers and Chromecast devices.
https://tizonia.org
GNU Lesser General Public License v3.0
1.69k stars 87 forks source link

Tizonia does not allow opening of recording device when playing audio #481

Open htruong opened 6 years ago

htruong commented 6 years ago

Description

I am working on a demo of the Google Voice AIY device, basically, it has a DAC that can record and play audio. Other programs, such as mpv allow another recording programs to open the recording device on the same sound card while it's playing music. Somehow tizonia blocks the whole soundcard when it's playing audio, so other programs can't record audio at the same time with Tizonia.

Steps to Reproduce

  1. Have any DAC, disable the RPI DAC so we have one sound card that can both play and record.
  2. Create a screen or tmux session
  3. On one window, do tizonia --youtube-audio-mix-search "Wrecking Balls"
  4. On another window, do arecord -c 2 -V stereo /tmp/temp.wav

Expected behavior: [What you expect to happen]

Since tizonia use the audio output and arecord use audio input, they should both work and the arecord VU meter should move.

Actual behaviour: [What actually happens]

If you do arecord before tizonia, then tizonia won't play anything. If you do tizonia before arecord, arecord won't move its VU meter.

Tested both with tizonia using alsa and pulseaudio backend.

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

tizonia 0.13.0 raspbian stretch google aiy voice hat, but I believe if you have any DAC, the bug will be reproducible

Installation Method Used

Built from the official bash pipe script

juanrubio commented 6 years ago

Hi!, thanks for taking the time to report this issue.

I can't imagine what's going. Tizonia uses the ALSA and PulseAudio apis, depending on which renderer is selected in tizonia.conf. You mention that you have seen this issue with both renderers.

Let me try this out to see if I can reproduce it.

htruong commented 6 years ago

Yup, my tizonia config is attached. I tried to make it as simple as possible, but it did not help. Thanks so much for your fantastic software and dedication!

tizonia.conf.txt

iz2k commented 3 years ago

Did you ever get a solution for this? I am also trying to use Tizonia with a RaspberryPi 3A+ with googlevoicechat soundcard in order to support I2S output and I2S input. When I try to play anything with Tizonia, I get: [OMX.Aratelia.audio_renderer.alsa.pcm:port:0] [OMX_ErrorInsufficientResources] I do not get to play anything even if the I2S input is not being used. Using both in/out simultaneously would be best, but I could also accept not using the input while playing with Tizonia. What are you using in your asound.conf?