jakemoroni / audio_async_loopback

Real-time S/PDIF PCM/AC3 capture and playback
GNU General Public License v3.0
25 stars 7 forks source link

Question: which hardware do you use? #4

Open rotdrop opened 2 years ago

rotdrop commented 2 years ago

Just out of obscurity, because not all sound cards provide the ac3 signal over SPDIF input. Thanks.

jakemoroni commented 2 years ago

I’m using the MiniDSP USB Streamer B.

The USB Streamer B has several different configurations that can be selected by flashing different firmwares using a tool they provide. I’m running the “stereo” firmware which just gives you a 2 channel optical input and 2 channel output (which I’m not using).

I haven’t tried other devices yet, but yes not all cards will work. The card must not perform any gain control, mixing, resampling/retiming, or any other operation that will modify the raw data in the frame.

If you find that another card works, let me know and I’ll update the readme.

mkkot commented 1 year ago

For me it works on:

lspci |grep -i creative
05:00.0 Audio device: Creative Labs Sound Core3D [Sound Blaster Recon3D / Z-Series] (rev 01)

Creative Sound Blaster ZxR https://us.creative.com/p/archived-products/sound-blaster-zxr

jakemoroni commented 1 year ago

For what it's worth, I've found that I have to force Pulseaudio to avoid resampling the input for AC3 to work. Any form of sample rate conversion will destroy an AC3 bitstream. If using PCM, then it doesn't matter.

These are the settings I put into daemon.conf:

avoid-resampling = true
default-sample-format = s32le
default-sample-rate = 48000

It might be worth a try if you find that a particular sound card doesn't work.

dstolpmann commented 11 months ago

I tested different sound cards with this software. As sources, I used an original Microsoft XBOX, a Creative Audigy 2ZS and a Creative X-Fi Titanium, all connected via S/PDIF. Here are my results:

TerraTec Aureon 5.1 Fun PCI Sound Card

Results:

Notes: Depending on the device, the "IEC958 In Phase Inverse" option has to be set in ALSA. Using a S/PDIF Matrix from Ligawo inverses the required setting.

Creative X-Fi Titanium PCIe Sound Card

Results:

Notes: I also tried the following options for the X-Fi kernel module, which did not make a difference for the Dolby Digital input: options snd-ctxfi reference_rate=48000 multiple=1

External 7.1 USB Sound Card (CSL)

Details:

Results:

Notes I do not know why there is no sound from the XBOX. My guess is that this has to do with SCMS (Serial Copy Management System). This is supported by the chipset and documented here to block the input if active.

External 7.1 USB Sound Card (Conrad AA1570)

Details:

Results:

Notes This probably uses the same chipset as the CSL one above.

Hifime UR23 SPDIF Optical to USB Converter

Details:

Results:

Notes: There is noise on the input if no signal is fed into the interface. From looking at the waveform, it seems that some audio samples are looped. I tested this directly with ALSA, so this is not a bug in audio_async_loopback, PulseAudio or PipeWire. On Windows, the recording in Audacity stops if no signal is present, so I think this is a problem in the Linux kernel / ALSA.