camilladsp icon indicating copy to clipboard operation
camilladsp copied to clipboard

Camilla 2.0.0 stops working after random time, broken pipe on input (ALSA loopback device)

Open klappspaten2 opened this issue 2 years ago • 36 comments

I'm using camilladsp on Xubuntu 23.10 (64bit) on Intel Haswell CPU. Input is the ALSA loopback device.

After updating to Camilla 2.0.0 I get a lot of random ALSA broken pipe errors, which are not there with version 1.0.3 and the exact same configuration. Sometimes it works for 30mins or more, but mostly only for some seconds before the errors occurs. With Camilla 1.0.3 it runs for 24h+ without any issue. If the chunksize is set from 1024 to 2048, it seems to work fine, but in my case, the peak and rms data I want to plot are not accurate enough with more that 1024 samples @ 44.1khz.

2023-12-16 10:28:48.701444 WARN [src/alsadevice.rs:281] Capture device failed while waiting for available frames, error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe' 2023-12-16 10:28:48.701474 ERROR [src/bin.rs:307] Capture error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe' 2023-12-16 10:28:48.701489 DEBUG [src/bin.rs:312] Wait for playback thread to exit.. 2023-12-16 10:28:48.701616 TRACE [src/processing.rs:34] AudioMessage::EndOfStream received 2023-12-16 10:28:48.701730 TRACE [src/bin.rs:321] All threads stopped, returning

Also with 1.0.3 I can use chunksizes like 1280 or 3072 samples just fine without any issues. With 2.0.0 camilladsp wont even really start processing, if the chunksize isn´t a power of 2, even building it myself with FFTW library. The error itself looks identical to me, but coming immediately, not just after some seconds or minutes. I also attached a log for 3072 samples.

Here are the full trace-level log files and config files: CamillaBug.zip

klappspaten2 avatar Dec 16 '23 10:12 klappspaten2

Thanks for the logs. This looks very similar to https://github.com/HEnquist/camilladsp/issues/310 Version 2.0 has some changes to the alsa device buffer and period parameters, to make it work with more devices. Looks like these changes can make the loopback unhappy.

HEnquist avatar Dec 16 '23 11:12 HEnquist

Can you try without dsnoop?

HEnquist avatar Dec 16 '23 20:12 HEnquist

I have tried reproducing the problem on my test system (up-to-date Manjaro on an i3-8400) but here things are running fine.

When using the dsnoop plugin, the possible values get limited and the result is that the only difference between 2.0.0 and 1.0.3 is that 1.0.3 sets a factor 2 larger device buffer size. Somehow, the loopback (or the dsnoop plugin) can misbehave with certain combinations of buffer size and period size.

  • buffer = 4096, period = 1024 works fine
  • buffer = 2048, period = 1024 is unstable Maybe the buffer size needs to be more than 2 * period size.

Can you compile a modified camilladsp yourself to try this? If yes, then edit this line: https://github.com/HEnquist/camilladsp/blob/6e24873726cb047976b68d1bc8c21045f250054a/src/alsadevice_buffermanager.rs#L40C9-L40C58 to say let buffer_frames = 2 * self.calculate_buffer_size();

HEnquist avatar Dec 16 '23 20:12 HEnquist

Thank you!

I have to use dsnoop, as I have 2 CamillaDSP instances running at the same time and using the same loopback-data as input. One is for audio processing for the speakers, and the second one is just for the filters of the analyzer, but both show the same symptoms.

I can compile camilladsp myself and change the line you asked for, to test if this helps. But it might take me a day or two to report back.

klappspaten2 avatar Dec 16 '23 22:12 klappspaten2

You could also try defining a custom dsnoop: https://alsa.opensrc.org/Dsnoop#Choosing_recording_rates That way you can set the period smaller than the default 1024. Try 512 or 256.

HEnquist avatar Dec 16 '23 22:12 HEnquist

I have tested both solutions, just a quick status update:

With a custom dsnoop I can run chunksizes of 1024 without any drops for a while. But I still can´t use chunksizes that are not a power of 2 (which would be really nice to fine tune the data plotted for my analyzer).

With the increase of the buffer and recompiling, it seems that both issues are fixed, odd junksizes and no dropouts anymore with 1024 samples.

I still have to test for more than just 1-2 hours, but it seems that the solution with the buffersize is necessary in my case, since it allows me to use any junksize I want like 1.0.3 did.

klappspaten2 avatar Dec 18 '23 23:12 klappspaten2

Thanks for testing! I think the problem may be that the buffer size gets too small compared to the period size. I made an attempt at a more general fix. Can you try the version in branch buffer_at_least_4_periods? PR here: https://github.com/HEnquist/camilladsp/pull/314

HEnquist avatar Dec 19 '23 20:12 HEnquist

Thank you! I will try this in the next few days and report back.

klappspaten2 avatar Dec 21 '23 22:12 klappspaten2

I tested your branch, and it is not working well with odd chunksizes - which worked well with the manual change I made. After some seconds or minutes I get "Broken Pipe" again. I attached a log again with this error. With the manual change you advised me, I could at run it for hours without issues.

Also I noticed with v2 in any variant I get some errors in my input camilla processes. They are mainly copying input to dmix with no or only minimal filters (like gain or channel-swapping). With Version 2 I have cracks and pops every now and then, which are gone with version 1. This is what the log is telling me, sometimes it works for hours, then again it pops every other second.

2023-12-26 10:10:13.592813 WARN [src/alsadevice_buffermanager.rs:102] Trying to set avail_min to 1024, must be larger than or equal to period of 5513 2023-12-26 10:10:13.621459 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2023-12-26 10:23:38.218734 WARN [src/alsadevice.rs:138] PB: Prepare playback after buffer underrun

It seems that v1 is more robust when using ALSA, as far as my tests on 3 different machines go. When running v2 for some hours, I get PB buffer underruns way more often than v1. But I would really like to experiment with the compressor... :-)

cdsp-spectrum.zip

klappspaten2 avatar Dec 26 '23 09:12 klappspaten2

Ok so it looks as if things run better with the larger buffer sizes of v1.0. Just increasing the size should not cause any trouble, I'll update that PR.

src/alsadevice_buffermanager.rs:102] Trying to set avail_min to 1024, must be larger than or equal to period of 5513

How did you end up with a period size of 5513? It's a pretty strange number!

HEnquist avatar Dec 26 '23 21:12 HEnquist

I have no idea whats going on with the buffersize, I just use Xubuntu 23.10 in mostly standard configuration. This value varies over time, as it seems. On my CarPC (my main project) with different hardware I get similiar messages, but not sure if also 5513 or some other number. Should I investigate further? Any advice where to look?

klappspaten2 avatar Dec 27 '23 15:12 klappspaten2

It would be helpful if you can figure out under what conditions you get these very large and strange period sizes. Such a large period will likely lead to all kinds of trouble.

HEnquist avatar Dec 27 '23 19:12 HEnquist

After checking my complete alsa path through the system, I figured out that a dmix device i created, without any parameters for buffering, was the culprit. Slave is the alsa loopback device, which was the one with these odd values on the playback side. Seems without any parameters buffering is set to 5513 samples period-size and 16539 buffer-size.

I added values for period_size (512 okay?) and buffer_size of 4096 @ 44100hz to the dmix, and now the loopback is using these values after a restart of all processes using the dmix. The odd number is gone. Must be some default in Alsa or (x)Ubuntu then?

klappspaten2 avatar Dec 27 '23 20:12 klappspaten2

512 should be an ok period. Are things working ok now? 5513 is probably the rounded result of 44100/8 = 5512.5.

HEnquist avatar Dec 27 '23 22:12 HEnquist

After testing a little bit, I would say this is my result so far:

  • v2 from your branch - still buffer underruns, but odd chunksizes seems to work now
  • v2 with the change made by me - basically the same, maybe a little bit less buffer underruns, but hard to really tell after this short time
  • v1 works fine without buffer underruns

klappspaten2 avatar Dec 28 '23 12:12 klappspaten2

Some of these buffer underruns are likely caused by using dsnoop, because it prevents the rate adjust from working. When capturing directly from the loopback with "hw:Loopback,0", then CamillaDSP is able to adjust the virtual sample clock to match the playback device and prevent underruns. But when you put the dsnoop in between, this no longer works and you will inevitably have underruns. How often depends tends to vary from day to day.

If you absolutely need that dsnoop, then you will need to enable the asynchronous resampler. That will solve it but it's not for free in terms of CPU time. An alternative would be to write some kind of script that monitors the buffer level of CamillaDSP and adjusts the Loopback clock.

HEnquist avatar Dec 28 '23 20:12 HEnquist

Okay, thank you very much for you help and explanation! I will think of an alternative to dsnoop, but I still need the two camilla-dsp processes to use the same input. But the buffer underruns with v2 occur on the camilla processes that are capturing from hardware and playing to dmix as well, so no dsnoop involved there.

If its not a big deal for you, can you maybe please explain shortly what you changed to the alsa buffering in v2? I am pretty sure you have good reasons for this, I am just curious and want to get a deeper understanding of these issues. :-)

klappspaten2 avatar Dec 28 '23 21:12 klappspaten2

V1.0 just sets the buffer size to 2*chunksize, and period to chunksize/4. This leads to trouble with some quite common devices that don't accept arbitrary values, or have some special rules for the sizes.

In V2, instead of using the chunksize directly, it calculates the next larger power of two. Then it applies that. If the device doesn't accept that value, it tries again with the same value multiplied by 1.5, which makes it a multiple of 3 (sometimes needed when using 24-bit samples). After this, it reads what the actual buffer size became (it's not always the requested value), and sets the period to buffersize/8.

The new logic tends to give smaller buffer sizes, which may be what causes your extra underruns. But I think that it should be ok to increase the target size by a factor 2.

HEnquist avatar Dec 28 '23 22:12 HEnquist

I updated that new branch to double the buffer sizes, could you give it a new try?

HEnquist avatar Dec 30 '23 20:12 HEnquist

Thanks! Of course, I will try it in the next days. :-)

klappspaten2 avatar Dec 30 '23 21:12 klappspaten2

So far it looks really good, I would say its at least as stable as 1.0.3 now. Thank you! :-)

klappspaten2 avatar Dec 31 '23 18:12 klappspaten2

Thanks for testing! And happy new year 🥳

HEnquist avatar Dec 31 '23 18:12 HEnquist

Thank you, happy new year to you too! 🥳

So will this fix be included in 2.0.1 main branch then? :-)

klappspaten2 avatar Dec 31 '23 19:12 klappspaten2

So will this fix be included in 2.0.1 main branch then? :-)

Yes!

HEnquist avatar Dec 31 '23 19:12 HEnquist

Hey,

I'm also facing this issue:

2023-12-31 11:52:42.536140 INFO [src/bin.rs:683] CamillaDSP version 2.0.0 2023-12-31 11:52:42.536151 INFO [src/bin.rs:684] Running on linux, x86_64 2023-12-31 11:52:42.996159 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2023-12-31 11:53:18.040975 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2023-12-31 15:56:26.269447 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2024-01-01 21:07:29.699366 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2024-01-01 21:08:10.409375 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2024-01-02 16:30:37.925279 WARN [src/alsadevice.rs:241] Prepare capture device 2024-01-02 16:30:37.935459 INFO [src/alsadevice.rs:799] Capture device is stalled, processing is stalled 2024-01-02 16:30:38.164803 WARN [src/alsadevice.rs:281] Capture device failed while waiting for available frames, error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe' 2024-01-02 16:30:38.164893 ERROR [src/bin.rs:307] Capture error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe'

Beginning of my yml config:

description: null devices: adjust_period: 10 capture: channels: 18 device: hw:UMC1820 format: S32LE type: Alsa capture_samplerate: 48000 chunksize: 128 enable_rate_adjust: true playback: channels: 20 device: hw:UMC1820 format: S24LE3 type: Alsa queuelimit: 4 rate_measure_interval: 1 resampler: null samplerate: 48000 silence_threshold: -80 silence_timeout: 3600 stop_on_rate_change: false target_level: 32 volume_ramp_time: null

Not using loopback though.

Regards Michael

mike811 avatar Jan 02 '24 17:01 mike811

@mike811 was this on the normal 2.0.0 release? Could you repeat with debug log level so I can see the alsa buffer parameters?

HEnquist avatar Jan 02 '24 19:01 HEnquist

Yes normal release. ok, will do (but it may take some time for this to show up)

mike811 avatar Jan 02 '24 19:01 mike811

The log doesn't need to include a buffer underrrun, just the startup phase until it starts processing. I'm interested in the logs from when the Alsa devices are opened and started.

HEnquist avatar Jan 02 '24 19:01 HEnquist

Didn't have to wait. This "Broken pipe" thing sometimes shows up during startup: … 2024-01-02 19:54:08.974858 DEBUG [src/processing.rs:19] build filters, waiting to start processing loop 2024-01-02 19:54:09.000221 DEBUG [src/alsadevice.rs:334] Available Playback devices: [("hw:PCH,0,0", "HDA Intel PCH, ALC294 Analog, subdevice #0"), ("hw:UMC1820,0,0", "UMC1820, USB Audio, subdevice #0"), ("null", "Discard all samples (playback) or generate zero samples (capture)"), ("samplerate", "Rate Converter Plugin Using Samplerate Library"), ("speexrate", "Rate Converter Plugin Using Speex Resampler"), ("jack", "JACK Audio Connection Kit"), ("oss", "Open Sound System"), ("pulse", "PulseAudio Sound Server"), ("upmix", "Plugin for channel upmix (4,6,8)"), ("vdownmix", "Plugin for channel downmix (stereo) with a simple spacialization"), ("hw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 0\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=7", "HDA Intel PCH, HDMI 1\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=8", "HDA Intel PCH, HDMI 2\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=9", "HDA Intel PCH, HDMI 3\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=10", "HDA Intel PCH, HDMI 4\nDirect hardware device without any conversions"), ("plughw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 0\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=7", "HDA Intel PCH, HDMI 1\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=8", "HDA Intel PCH, HDMI 2\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=9", "HDA Intel PCH, HDMI 3\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=10", "HDA Intel PCH, HDMI 4\nHardware device with all software conversions"), ("default:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("sysdefault:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("front:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nFront output / input"), ("surround21:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n2.1 Surround output to Front and Subwoofer speakers"), ("surround40:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n4.0 Surround output to Front and Rear speakers"), ("surround41:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n4.1 Surround output to Front, Rear and Subwoofer speakers"), ("surround50:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n5.0 Surround output to Front, Center and Rear speakers"), ("surround51:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n5.1 Surround output to Front, Center, Rear and Subwoofer speakers"), ("surround71:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"), ("hdmi:CARD=PCH,DEV=0", "HDA Intel PCH, HDMI 0\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=1", "HDA Intel PCH, HDMI 1\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=2", "HDA Intel PCH, HDMI 2\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 3\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=4", "HDA Intel PCH, HDMI 4\nHDMI Audio Output"), ("dmix:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 0\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=7", "HDA Intel PCH, HDMI 1\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=8", "HDA Intel PCH, HDMI 2\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=9", "HDA Intel PCH, HDMI 3\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=10", "HDA Intel PCH, HDMI 4\nDirect sample mixing device"), ("usbstream:CARD=PCH", "HDA Intel PCH\nUSB Stream Output"), ("hw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect hardware device without any conversions"), ("plughw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nHardware device with all software conversions"), ("default:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("sysdefault:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("front:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nFront output / input"), ("surround21:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n2.1 Surround output to Front and Subwoofer speakers"), ("surround40:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n4.0 Surround output to Front and Rear speakers"), ("surround41:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n4.1 Surround output to Front, Rear and Subwoofer speakers"), ("surround50:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n5.0 Surround output to Front, Center and Rear speakers"), ("surround51:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n5.1 Surround output to Front, Center, Rear and Subwoofer speakers"), ("surround71:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"), ("iec958:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nIEC958 (S/PDIF) Digital Audio Output"), ("dmix:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect sample mixing device"), ("usbstream:CARD=UMC1820", "UMC1820\nUSB Stream Output")] 2024-01-02 19:54:09.001106 DEBUG [src/alsadevice.rs:334] Available Capture devices: [("hw:PCH,0,0", "HDA Intel PCH, ALC294 Analog, subdevice #0"), ("hw:PCH,2,0", "HDA Intel PCH, ALC294 Alt Analog, subdevice #0"), ("hw:UMC1820,0,0", "UMC1820, USB Audio, subdevice #0"), ("null", "Discard all samples (playback) or generate zero samples (capture)"), ("samplerate", "Rate Converter Plugin Using Samplerate Library"), ("speexrate", "Rate Converter Plugin Using Speex Resampler"), ("jack", "JACK Audio Connection Kit"), ("oss", "Open Sound System"), ("pulse", "PulseAudio Sound Server"), ("upmix", "Plugin for channel upmix (4,6,8)"), ("vdownmix", "Plugin for channel downmix (stereo) with a simple spacialization"), ("hw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=2", "HDA Intel PCH, ALC294 Alt Analog\nDirect hardware device without any conversions"), ("plughw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=2", "HDA Intel PCH, ALC294 Alt Analog\nHardware device with all software conversions"), ("default:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("sysdefault:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("front:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nFront output / input"), ("dsnoop:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect sample snooping device"), ("dsnoop:CARD=PCH,DEV=2", "HDA Intel PCH, ALC294 Alt Analog\nDirect sample snooping device"), ("usbstream:CARD=PCH", "HDA Intel PCH\nUSB Stream Output"), ("hw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect hardware device without any conversions"), ("plughw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nHardware device with all software conversions"), ("default:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("sysdefault:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("front:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nFront output / input"), ("dsnoop:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect sample snooping device"), ("usbstream:CARD=UMC1820", "UMC1820\nUSB Stream Output")] 2024-01-02 19:54:09.001290 DEBUG [src/alsadevice.rs:352] Playback: supported channels, min: 20, max: 20, list: [20] 2024-01-02 19:54:09.001296 DEBUG [src/alsadevice.rs:353] Playback: setting channels to 20 2024-01-02 19:54:09.001322 DEBUG [src/alsadevice.rs:357] Playback: supported samplerates: Discrete([44100, 48000, 88200, 96000]) 2024-01-02 19:54:09.001324 DEBUG [src/alsadevice.rs:358] Playback: setting rate to 48000 2024-01-02 19:54:09.001331 DEBUG [src/alsadevice.rs:362] Playback: supported sample formats: [S24LE3] 2024-01-02 19:54:09.001332 DEBUG [src/alsadevice.rs:363] Playback: setting format to S24LE3 2024-01-02 19:54:09.001342 DEBUG [src/alsadevice_buffermanager.rs:43] Setting buffer size to 256 frames 2024-01-02 19:54:09.001352 DEBUG [src/alsadevice_buffermanager.rs:57] Device is using a buffer size of 256 frames 2024-01-02 19:54:09.001354 DEBUG [src/alsadevice_buffermanager.rs:65] Setting period size to 32 frames 2024-01-02 19:54:09.438476 DEBUG [src/alsadevice.rs:387] Opening Playback device "hw:UMC1820" with parameters: HwParams { channels: Ok(20), rate: "Ok(48000) Hz", format: Ok(S243LE), access: Ok(RWInterleaved), period_size: "Ok(32) frames", buffer_size: "Ok(256) frames" }, SwParams(avail_min: Ok(128) frames, start_threshold: Ok(1) frames, stop_threshold: Ok(256) frames) 2024-01-02 19:54:09.438513 DEBUG [src/alsadevice.rs:392] Playback device "hw:UMC1820" successfully opened 2024-01-02 19:54:09.438603 DEBUG [src/bin.rs:265] Playback thread ready to start 2024-01-02 19:54:09.440211 DEBUG [src/alsadevice.rs:352] Capture: supported channels, min: 18, max: 18, list: [18] 2024-01-02 19:54:09.440220 DEBUG [src/alsadevice.rs:353] Capture: setting channels to 18 2024-01-02 19:54:09.440224 DEBUG [src/alsadevice.rs:357] Capture: supported samplerates: Discrete([48000]) 2024-01-02 19:54:09.440226 DEBUG [src/alsadevice.rs:358] Capture: setting rate to 48000 2024-01-02 19:54:09.440228 DEBUG [src/alsadevice.rs:362] Capture: supported sample formats: [S32LE] 2024-01-02 19:54:09.440230 DEBUG [src/alsadevice.rs:363] Capture: setting format to S32LE 2024-01-02 19:54:09.440234 DEBUG [src/alsadevice_buffermanager.rs:43] Setting buffer size to 256 frames 2024-01-02 19:54:09.440244 DEBUG [src/alsadevice_buffermanager.rs:57] Device is using a buffer size of 256 frames 2024-01-02 19:54:09.440245 DEBUG [src/alsadevice_buffermanager.rs:65] Setting period size to 32 frames 2024-01-02 19:54:09.441115 DEBUG [src/alsadevice.rs:387] Opening Capture device "hw:UMC1820" with parameters: HwParams { channels: Ok(18), rate: "Ok(48000) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(32) frames", buffer_size: "Ok(256) frames" }, SwParams(avail_min: Ok(128) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(256) frames) 2024-01-02 19:54:09.441128 DEBUG [src/alsadevice.rs:392] Capture device "hw:UMC1820" successfully opened 2024-01-02 19:54:09.441167 DEBUG [src/bin.rs:275] Capture thread ready to start 2024-01-02 19:54:09.441173 DEBUG [src/bin.rs:278] Both capture and playback ready, release barrier 2024-01-02 19:54:09.441179 DEBUG [src/bin.rs:280] Supervisor loop starts now! 2024-01-02 19:54:09.441181 DEBUG [src/alsadevice.rs:1037] Starting captureloop 2024-01-02 19:54:09.441233 DEBUG [src/processing.rs:21] Processing loop starts now! 2024-01-02 19:54:09.441237 DEBUG [src/alsadevice.rs:951] Starting playback loop 2024-01-02 19:54:09.441241 DEBUG [src/alsadevice.rs:415] Playback loop uses a buffer of 128 frames 2024-01-02 19:54:09.441288 DEBUG [src/alsadevice.rs:657] Capture loop uses a buffer of 256 frames 2024-01-02 19:54:09.441300 DEBUG [src/alsadevice.rs:253] Starting capture from state: SND_PCM_STATE_PREPARED, Ready to start 2024-01-02 19:54:09.443972 DEBUG [src/countertimer.rs:240] Number of values changed. New 18, prev 2. Clearing history. 2024-01-02 19:54:09.443978 DEBUG [src/countertimer.rs:240] Number of values changed. New 18, prev 2. Clearing history. 2024-01-02 19:54:09.444421 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2024-01-02 19:54:09.444489 DEBUG [src/countertimer.rs:240] Number of values changed. New 20, prev 2. Clearing history. 2024-01-02 19:54:09.444492 DEBUG [src/countertimer.rs:240] Number of values changed. New 20, prev 2. Clearing history. 2024-01-02 19:54:09.489335 WARN [src/alsadevice.rs:281] Capture device failed while waiting for available frames, error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe' 2024-01-02 19:54:09.489386 ERROR [src/bin.rs:307] Capture error: ALSA function 'snd_pcm_wait' failed with error 'EPIPE: Broken pipe' 2024-01-02 19:54:09.489393 DEBUG [src/bin.rs:312] Wait for playback thread to exit.. 2024-01-02 19:54:09.496456 DEBUG [src/bin.rs:1038] Processing ended with status Ok(Restart) 2024-01-02 19:54:09.496468 DEBUG [src/bin.rs:1052] Restarting with new config 2024-01-02 19:54:09.496470 DEBUG [src/bin.rs:994] Wait for config 2024-01-02 19:54:09.496472 DEBUG [src/bin.rs:1010] Waiting to receive a command 2024-01-02 19:54:37.794902 DEBUG [/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tungstenite-0.16.0/src/handshake/server.rs:282] Server handshake done ….

mike811 avatar Jan 02 '24 20:01 mike811

This is after manual restart of camilladsp and firing um apparently correctly:

2024-01-02 20:07:07.626982 DEBUG [src/processing.rs:19] build filters, waiting to start processing loop 2024-01-02 20:07:07.640761 DEBUG [src/alsadevice.rs:334] Available Capture devices: [("hw:PCH,0,0", "HDA Intel PCH, ALC294 Analog, subdevice #0"), ("hw:PCH,2,0", "HDA Intel PCH, ALC294 Alt Analog, subdevice #0"), ("hw:UMC1820,0,0", "UMC1820, USB Audio, subdevice #0"), ("null", "Discard all samples (playback) or generate zero samples (capture)"), ("samplerate", "Rate Converter Plugin Using Samplerate Library"), ("speexrate", "Rate Converter Plugin Using Speex Resampler"), ("jack", "JACK Audio Connection Kit"), ("oss", "Open Sound System"), ("pulse", "PulseAudio Sound Server"), ("upmix", "Plugin for channel upmix (4,6,8)"), ("vdownmix", "Plugin for channel downmix (stereo) with a simple spacialization"), ("hw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=2", "HDA Intel PCH, ALC294 Alt Analog\nDirect hardware device without any conversions"), ("plughw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=2", "HDA Intel PCH, ALC294 Alt Analog\nHardware device with all software conversions"), ("default:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("sysdefault:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("front:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nFront output / input"), ("dsnoop:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect sample snooping device"), ("dsnoop:CARD=PCH,DEV=2", "HDA Intel PCH, ALC294 Alt Analog\nDirect sample snooping device"), ("usbstream:CARD=PCH", "HDA Intel PCH\nUSB Stream Output"), ("hw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect hardware device without any conversions"), ("plughw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nHardware device with all software conversions"), ("default:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("sysdefault:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("front:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nFront output / input"), ("dsnoop:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect sample snooping device"), ("usbstream:CARD=UMC1820", "UMC1820\nUSB Stream Output")] 2024-01-02 20:07:07.640790 DEBUG [src/alsadevice.rs:334] Available Playback devices: [("hw:PCH,0,0", "HDA Intel PCH, ALC294 Analog, subdevice #0"), ("hw:UMC1820,0,0", "UMC1820, USB Audio, subdevice #0"), ("null", "Discard all samples (playback) or generate zero samples (capture)"), ("samplerate", "Rate Converter Plugin Using Samplerate Library"), ("speexrate", "Rate Converter Plugin Using Speex Resampler"), ("jack", "JACK Audio Connection Kit"), ("oss", "Open Sound System"), ("pulse", "PulseAudio Sound Server"), ("upmix", "Plugin for channel upmix (4,6,8)"), ("vdownmix", "Plugin for channel downmix (stereo) with a simple spacialization"), ("hw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 0\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=7", "HDA Intel PCH, HDMI 1\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=8", "HDA Intel PCH, HDMI 2\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=9", "HDA Intel PCH, HDMI 3\nDirect hardware device without any conversions"), ("hw:CARD=PCH,DEV=10", "HDA Intel PCH, HDMI 4\nDirect hardware device without any conversions"), ("plughw:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 0\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=7", "HDA Intel PCH, HDMI 1\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=8", "HDA Intel PCH, HDMI 2\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=9", "HDA Intel PCH, HDMI 3\nHardware device with all software conversions"), ("plughw:CARD=PCH,DEV=10", "HDA Intel PCH, HDMI 4\nHardware device with all software conversions"), ("default:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("sysdefault:CARD=PCH", "HDA Intel PCH, ALC294 Analog\nDefault Audio Device"), ("front:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nFront output / input"), ("surround21:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n2.1 Surround output to Front and Subwoofer speakers"), ("surround40:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n4.0 Surround output to Front and Rear speakers"), ("surround41:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n4.1 Surround output to Front, Rear and Subwoofer speakers"), ("surround50:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n5.0 Surround output to Front, Center and Rear speakers"), ("surround51:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n5.1 Surround output to Front, Center, Rear and Subwoofer speakers"), ("surround71:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\n7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"), ("hdmi:CARD=PCH,DEV=0", "HDA Intel PCH, HDMI 0\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=1", "HDA Intel PCH, HDMI 1\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=2", "HDA Intel PCH, HDMI 2\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 3\nHDMI Audio Output"), ("hdmi:CARD=PCH,DEV=4", "HDA Intel PCH, HDMI 4\nHDMI Audio Output"), ("dmix:CARD=PCH,DEV=0", "HDA Intel PCH, ALC294 Analog\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=3", "HDA Intel PCH, HDMI 0\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=7", "HDA Intel PCH, HDMI 1\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=8", "HDA Intel PCH, HDMI 2\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=9", "HDA Intel PCH, HDMI 3\nDirect sample mixing device"), ("dmix:CARD=PCH,DEV=10", "HDA Intel PCH, HDMI 4\nDirect sample mixing device"), ("usbstream:CARD=PCH", "HDA Intel PCH\nUSB Stream Output"), ("hw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect hardware device without any conversions"), ("plughw:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nHardware device with all software conversions"), ("default:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("sysdefault:CARD=UMC1820", "UMC1820, USB Audio\nDefault Audio Device"), ("front:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nFront output / input"), ("surround21:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n2.1 Surround output to Front and Subwoofer speakers"), ("surround40:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n4.0 Surround output to Front and Rear speakers"), ("surround41:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n4.1 Surround output to Front, Rear and Subwoofer speakers"), ("surround50:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n5.0 Surround output to Front, Center and Rear speakers"), ("surround51:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n5.1 Surround output to Front, Center, Rear and Subwoofer speakers"), ("surround71:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\n7.1 Surround output to Front, Center, Side, Rear and Woofer speakers"), ("iec958:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nIEC958 (S/PDIF) Digital Audio Output"), ("dmix:CARD=UMC1820,DEV=0", "UMC1820, USB Audio\nDirect sample mixing device"), ("usbstream:CARD=UMC1820", "UMC1820\nUSB Stream Output")] 2024-01-02 20:07:07.640980 DEBUG [src/alsadevice.rs:352] Capture: supported channels, min: 18, max: 18, list: [18] 2024-01-02 20:07:07.640984 DEBUG [src/alsadevice.rs:353] Capture: setting channels to 18 2024-01-02 20:07:07.641011 DEBUG [src/alsadevice.rs:357] Capture: supported samplerates: Discrete([44100, 48000, 88200, 96000]) 2024-01-02 20:07:07.641013 DEBUG [src/alsadevice.rs:358] Capture: setting rate to 48000 2024-01-02 20:07:07.641020 DEBUG [src/alsadevice.rs:362] Capture: supported sample formats: [S32LE] 2024-01-02 20:07:07.641021 DEBUG [src/alsadevice.rs:363] Capture: setting format to S32LE 2024-01-02 20:07:07.641030 DEBUG [src/alsadevice_buffermanager.rs:43] Setting buffer size to 256 frames 2024-01-02 20:07:07.641040 DEBUG [src/alsadevice_buffermanager.rs:57] Device is using a buffer size of 256 frames 2024-01-02 20:07:07.641042 DEBUG [src/alsadevice_buffermanager.rs:65] Setting period size to 32 frames 2024-01-02 20:07:07.641723 DEBUG [src/alsadevice.rs:387] Opening Capture device "hw:UMC1820" with parameters: HwParams { channels: Ok(18), rate: "Ok(48000) Hz", format: Ok(S32LE), access: Ok(RWInterleaved), period_size: "Ok(32) frames", buffer_size: "Ok(256) frames" }, SwParams(avail_min: Ok(128) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(256) frames) 2024-01-02 20:07:07.641737 DEBUG [src/alsadevice.rs:392] Capture device "hw:UMC1820" successfully opened 2024-01-02 20:07:07.641761 DEBUG [src/bin.rs:275] Capture thread ready to start 2024-01-02 20:07:07.641862 DEBUG [src/alsadevice.rs:352] Playback: supported channels, min: 20, max: 20, list: [20] 2024-01-02 20:07:07.641868 DEBUG [src/alsadevice.rs:353] Playback: setting channels to 20 2024-01-02 20:07:07.641872 DEBUG [src/alsadevice.rs:357] Playback: supported samplerates: Discrete([48000]) 2024-01-02 20:07:07.641873 DEBUG [src/alsadevice.rs:358] Playback: setting rate to 48000 2024-01-02 20:07:07.641876 DEBUG [src/alsadevice.rs:362] Playback: supported sample formats: [S24LE3] 2024-01-02 20:07:07.641878 DEBUG [src/alsadevice.rs:363] Playback: setting format to S24LE3 2024-01-02 20:07:07.641883 DEBUG [src/alsadevice_buffermanager.rs:43] Setting buffer size to 256 frames 2024-01-02 20:07:07.641893 DEBUG [src/alsadevice_buffermanager.rs:57] Device is using a buffer size of 256 frames 2024-01-02 20:07:07.641894 DEBUG [src/alsadevice_buffermanager.rs:65] Setting period size to 32 frames 2024-01-02 20:07:07.642592 DEBUG [src/alsadevice.rs:387] Opening Playback device "hw:UMC1820" with parameters: HwParams { channels: Ok(20), rate: "Ok(48000) Hz", format: Ok(S243LE), access: Ok(RWInterleaved), period_size: "Ok(32) frames", buffer_size: "Ok(256) frames" }, SwParams(avail_min: Ok(128) frames, start_threshold: Ok(1) frames, stop_threshold: Ok(256) frames) 2024-01-02 20:07:07.642604 DEBUG [src/alsadevice.rs:392] Playback device "hw:UMC1820" successfully opened 2024-01-02 20:07:07.642654 DEBUG [src/bin.rs:265] Playback thread ready to start 2024-01-02 20:07:07.642660 DEBUG [src/bin.rs:268] Both capture and playback ready, release barrier 2024-01-02 20:07:07.642666 DEBUG [src/bin.rs:270] Supervisor loop starts now! 2024-01-02 20:07:07.642669 DEBUG [src/alsadevice.rs:951] Starting playback loop 2024-01-02 20:07:07.642670 DEBUG [src/processing.rs:21] Processing loop starts now! 2024-01-02 20:07:07.642672 DEBUG [src/alsadevice.rs:415] Playback loop uses a buffer of 128 frames 2024-01-02 20:07:07.642677 DEBUG [src/alsadevice.rs:1037] Starting captureloop 2024-01-02 20:07:07.642746 DEBUG [src/alsadevice.rs:657] Capture loop uses a buffer of 256 frames 2024-01-02 20:07:07.642758 DEBUG [src/alsadevice.rs:253] Starting capture from state: SND_PCM_STATE_PREPARED, Ready to start 2024-01-02 20:07:07.645674 DEBUG [src/countertimer.rs:240] Number of values changed. New 18, prev 2. Clearing history. 2024-01-02 20:07:07.645683 DEBUG [src/countertimer.rs:240] Number of values changed. New 18, prev 2. Clearing history. 2024-01-02 20:07:07.646033 INFO [src/alsadevice.rs:142] PB: Starting playback from Prepared state 2024-01-02 20:07:07.646107 DEBUG [src/countertimer.rs:240] Number of values changed. New 20, prev 2. Clearing history. 2024-01-02 20:07:07.646112 DEBUG [src/countertimer.rs:240] Number of values changed. New 20, prev 2. Clearing history. 2024-01-02 20:07:07.810742 DEBUG [/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tungstenite-0.16.0/src/handshake/server.rs:282] Server handshake done.

mike811 avatar Jan 02 '24 20:01 mike811