You are not logged in.

#1 2016-10-23 05:33:12

DavKan
Member
Registered: 2016-09-27
Posts: 15

How to create digital stereo loopback.

I'm having difficulty listening to my optical line in on my soundcard. I have a Creative CA0110 sound card with optical IEC958 output and input. The optical output goes to my dac and is the only playback device I actively use. I want to listen to the optical in on my dac but I'm having difficulty creating a working low latency loopback device. I attempted to use "pactl load-module module-loopback". The first time I tried this latency was over 1 minute, The second time I tried this the latency was once again over one minute but was garbled as well, I don't know what I changed to cause this behavior. I created an alsa loopback with modprobe snd-aloop, was able to see the virtual card in amixer and pavucontrol but was unable to configure the device correctly. I tried jack2-dbus briefly but was lost completely. I have verified that the optical source works correctly via connecting directly to my dac. I'm open to any solutions, pa+alsa, jack+alsa and stand alone alsa are all fine. I just need a minimal latency high quality loopback for IEC958 digital audio. I'm running xfce4 on arch, system is current.


aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: Headset [Logitech G35 Headset], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 0: CA0110-IBG Analog [CA0110-IBG Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 1: CA0110-IBG Digital [CA0110-IBG Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

arecord -l

**** List of CAPTURE Hardware Devices ****
card 0: Headset [Logitech G35 Headset], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 0: CA0110-IBG Analog [CA0110-IBG Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Creative [HDA Creative], device 1: CA0110-IBG Digital [CA0110-IBG Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

The missing card 1 is the mobo Intel HD audio, (the source for my optical in) currently in use by a VM and unavailable to arch.

amixer -c 2

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 103
  Mono: Playback 93 [90%] [-5.00dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 103
  Mono:
  Front Left: Playback 0 [0%] [-51.50dB] [off]
  Front Right: Playback 0 [0%] [-51.50dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 254 [100%] [-0.20dB]
  Front Right: Playback 254 [100%] [-0.20dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 103
  Mono:
  Front Left: Playback 103 [100%] [0.00dB] [on]
  Front Right: Playback 103 [100%] [0.00dB] [on]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 103
  Mono:
  Front Left: Playback 103 [100%] [0.00dB] [on]
  Front Right: Playback 103 [100%] [0.00dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 103
  Mono: Playback 103 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 103
  Mono: Playback 103 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 103
  Mono:
  Front Left: Playback 103 [100%] [0.00dB] [on]
  Front Right: Playback 103 [100%] [0.00dB] [on]
Simple mixer control 'Line',0
  Capabilities: cvolume cswitch cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 115
  Front Left: Capture 115 [100%] [6.00dB] [off]
  Front Right: Capture 115 [100%] [6.00dB] [off]
Simple mixer control 'Mic',0
  Capabilities: cvolume cswitch cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 127
  Front Left: Capture 127 [100%] [12.00dB] [off]
  Front Right: Capture 127 [100%] [12.00dB] [off]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined cswitch cswitch-joined
  Playback channels: Mono
  Capture channels: Mono
  Mono: Playback [on] Capture [on]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Disabled'

lspci -vvs 0c:00.0

Subsystem: Creative Labs SB1040 PCI Express
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 64 (500ns min, 5000ns max)
Interrupt: pin A routed to IRQ 27
NUMA node: 0
Region 0: Memory at f9200000 (32-bit, non-prefetchable) [size=16K]
Capabilities: [dc] Power Management version 3
	Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
	Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel

/etc/modprobe.d/alsa-base.conf

options snd-hda-intel position_fix=1 model=3stack

Last edited by DavKan (2016-10-23 06:59:34)

Offline

#2 2016-10-23 21:15:26

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: How to create digital stereo loopback.

Low-latency = Jack. Saying you 'were lost' is not helpful, Jack is fairly easy to use with qjackctl or other patchbays, at least to verify its working (tuning parameters is a different question). Out-of-the-box performance should be good.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2016-10-24 01:40:10

DavKan
Member
Registered: 2016-09-27
Posts: 15

Re: How to create digital stereo loopback.

A fair criticism. Jack was the last solution a tried after a marathon day of beating my head against the wall. I will make further attempts today. I was having difficulty even getting the service to launch but that's a separate issue I'm sure will be sorted.

Offline

#4 2016-10-24 01:51:18

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: How to create digital stereo loopback.

DavKan wrote:

A fair criticism. Jack was the last solution a tried after a marathon day of beating my head against the wall. I will make further attempts today. I was having difficulty even getting the service to launch but that's a separate issue I'm sure will be sorted.

Use the wiki (Arch and Jack, slight preference for former), google whatever error/log messages you get, and post those here if needed. The frustrating thing about your post is that you give so much detail about alsa but none about Jack or pulse (both of which would be 'better' solutions).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

Board footer

Powered by FluxBB