You are not logged in.
Hello,
I have two main cards on my system - "Nvidia HDA" & "Scarlett 2i4". I want to use first one for Skype and Desktop and later for recording realtime in JACK-based applications. The configuration on my PC is as follows:
[ziga@ziga-pc ~]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708S Analog [VT1708S Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 2: VT1708S Alt Analog [VT1708S Alt Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: VT1708S Digital [VT1708S Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: USB [Scarlett 2i4 USB], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
Currently I am in a phase of setting up pulseaudio server and I have to first edit /etc/pulse/default.pa. I did following changes to this document:
1st) I comented out this section, because I want to manually load modules etc...
### Automatically load driver modules depending on the hardware available
#.ifexists module-udev-detect.so
#load-module module-udev-detect
#.else
### Use the static hardware detection module (for systems that lack udev support)
#load-module module-detect
#.endif
2nd) I comented out JACK section for now - will deal with it later...
### Automatically connect sink and source if JACK server is present
#.ifexists module-jackdbus-detect.so
#.nofail
#load-module module-jackdbus-detect channels=2
#.fail
#.endif
3rd) I commented out Bluetooth section as I don't need it.
### Automatically load driver modules for Bluetooth hardware
#.ifexists module-bluetooth-policy.so
#load-module module-bluetooth-policy
#.endif
#
#.ifexists module-bluetooth-discover.so
#load-module module-bluetooth-discover
#.endif
4th) I added some lines at the end of the file to set up my cards. Firstly you will see that I loaded sinks and sources for both cards ("Nvidia HDA" & "Scarlett 2i4") and secondly I tried to make them default by using command set-default-sink & set-default-source. These commands are completely ignored and do nothing at all even after restarting pulseaudio server. I checked this in KMix where there are allways the same devices no matter what I put in after set-default-sink or set-default-source. How is this possible? Are there any other ways to check which sink source is set as default?
#LOAD SINKS
load-module module-alsa-sink device=hw:2
load-module module-alsa-sink device=hw:0
#LOAD SOURCES
load-module module-alsa-source device=hw:0
load-module module-alsa-source device=hw:2
#SET DEFAULT SINK/SOURCE
set-default-sink 1
set-default-source 1
I posted below outputs from three comands (pacmd list-cards, pacmd list-sinks, pacmd list-sources) if this is of any help (weird thing here is that I get no cards listed when using first command):
[ziga@ziga-pc ~]$ pacmd list-cards
0 card(s) available.
[ziga@ziga-pc ~]$ pacmd list-sinks
2 sink(s) available.
* index: 1
name: <alsa_output.hw_2>
driver: <module-alsa-sink.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME
state: SUSPENDED
suspend cause: IDLE
priority: 9040
volume: front-left: 68878 / 105% / 1.30 dB, front-right: 68878 / 105% / 1.30 dB, rear-left: 68878 / 105% / 1.30 dB, rear-right: 68878 / 105% / 1.30 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 1
sample spec: s32le 4ch 44100Hz
channel map: front-left,front-right,rear-left,rear-right
Surround 4.0
used by: 0
linked by: 0
fixed latency: 99.95 ms
module: 20
properties:
alsa.resolution_bits = "32"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "Scarlett 2i4 USB"
alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2"
udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB"
device.bus = "usb"
device.vendor.id = "1235"
device.vendor.name = "Novation EMS"
device.product.id = "800a"
device.product.name = "Scarlett 2i4 USB"
device.serial = "Focusrite_Scarlett_2i4_USB"
device.string = "hw:2"
device.buffering.buffer_size = "70528"
device.buffering.fragment_size = "17632"
device.access_mode = "mmap"
device.description = "Scarlett 2i4 USB"
device.icon_name = "audio-card-usb"
index: 2
name: <alsa_output.hw_0>
driver: <module-alsa-sink.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9950
volume: front-left: 28348 / 43% / -21.84 dB, front-left-of-center: 28348 / 43% / -21.84 dB, front-center: 28348 / 43% / -21.84 dB, front-right: 28348 / 43% / -21.84 dB, front-right-of-center: 28348 / 43% / -21.84 dB, rear-center: 28348 / 43% / -21.84 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 2
sample spec: s16le 6ch 44100Hz
channel map: front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
module: 21
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "VT1708S Analog"
alsa.id = "VT1708S Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 22"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:05.0"
sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "03f0"
device.product.name = "MCP61 High Definition Audio"
device.form_factor = "internal"
device.string = "hw:0"
device.buffering.buffer_size = "1058304"
device.buffering.fragment_size = "529152"
device.access_mode = "mmap+timer"
device.description = "Built-in Audio"
device.icon_name = "audio-card-pci"
[ziga@ziga-pc ~]$ pacmd list-sources
4 source(s) available.
* index: 1
name: <alsa_output.hw_2.monitor>
driver: <module-alsa-sink.c>
flags: DECIBEL_VOLUME LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1000
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, rear-left: 65536 / 100% / 0.00 dB, rear-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s32le 4ch 44100Hz
channel map: front-left,front-right,rear-left,rear-right
Surround 4.0
used by: 0
linked by: 0
fixed latency: 99.95 ms
monitor_of: 1
module: 20
properties:
device.description = "Monitor of Scarlett 2i4 USB"
device.class = "monitor"
device.icon_name = "audio-input-microphone"
index: 2
name: <alsa_output.hw_0.monitor>
driver: <module-alsa-sink.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1000
volume: front-left: 65536 / 100% / 0.00 dB, front-left-of-center: 65536 / 100% / 0.00 dB, front-center: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, front-right-of-center: 65536 / 100% / 0.00 dB, rear-center: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s16le 6ch 44100Hz
channel map: front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
monitor_of: 2
module: 21
properties:
device.description = "Monitor of Built-in Audio"
device.class = "monitor"
device.icon_name = "audio-input-microphone"
index: 3
name: <alsa_input.hw_0>
driver: <module-alsa-source.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9950
volume: front-left: 99957 / 153% / 11.00 dB, front-right: 99957 / 153% / 11.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s16le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
module: 22
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "VT1708S Analog"
alsa.id = "VT1708S Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 22"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:05.0"
sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "03f0"
device.product.name = "MCP61 High Definition Audio"
device.form_factor = "internal"
device.string = "hw:0"
device.buffering.buffer_size = "352768"
device.buffering.fragment_size = "176384"
device.access_mode = "mmap+timer"
device.description = "Built-in Audio"
device.icon_name = "audio-input-microphone-pci"
index: 4
name: <alsa_input.hw_2>
driver: <module-alsa-source.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9040
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s32le 2ch 44100Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
fixed latency: 99.95 ms
module: 23
properties:
alsa.resolution_bits = "32"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "Scarlett 2i4 USB"
alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2"
udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB"
device.bus = "usb"
device.vendor.id = "1235"
device.vendor.name = "Novation EMS"
device.product.id = "800a"
device.product.name = "Scarlett 2i4 USB"
device.serial = "Focusrite_Scarlett_2i4_USB"
device.string = "hw:2"
device.buffering.buffer_size = "35264"
device.buffering.fragment_size = "8816"
device.access_mode = "mmap"
device.description = "Scarlett 2i4 USB"
device.icon_name = "audio-input-microphone-usb"
[ziga@ziga-pc ~]$
Last edited by 71GA (2014-05-21 15:00:02)
C, ARM, ARM assembly, HTML, CSS, JS, Linux
Offline
Hello,
1st) I comented out this section, because I want to manually load modules etc...
### Automatically load driver modules depending on the hardware available #.ifexists module-udev-detect.so #load-module module-udev-detect #.else ### Use the static hardware detection module (for systems that lack udev support) #load-module module-detect #.endif
This smells like a load of potential trouble, but if your current setup works except for the default-sinks I'm not gonna complain
4th) I added some lines at the end of the file to set up my cards. Firstly you will see that I loaded sinks and sources for both cards ("Nvidia HDA" & "Scarlett 2i4") and secondly I tried to make them default by using command set-default-sink & set-default-source. These commands are completely ignored and do nothing at all even after restarting pulseaudio server. I checked this in KMix where there are allways the same devices no matter what I put in after set-default-sink or set-default-source. How is this possible? Are there any other ways to check which sink source is set as default?
Kmix doesn't care about your pulsedevice, it shows all of them that pulse tells it are available and the master of the one you set in its setting, it doesn't know which one of these is your default that's handled by pulse, so you can't deduce anything from it, however...
[ziga@ziga-pc ~]$ pacmd list-cards 0 card(s) available.
See 1st), pretty sure that's a direct consequence of not letting it detect the cards and you never actually load any cards you simply set sinks (a big difference, you can have an arbitrary amount of sinks (simultaneous outputs e.g.), while cards are limited by the physically available ones) .
[ziga@ziga-pc ~]$ pacmd list-sinks 2 sink(s) available. * index: 1 name: <alsa_output.hw_2> driver: <module-alsa-sink.c> flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME state: SUSPENDED suspend cause: IDLE priority: 9040 volume: front-left: 68878 / 105% / 1.30 dB, front-right: 68878 / 105% / 1.30 dB, rear-left: 68878 / 105% / 1.30 dB, rear-right: 68878 / 105% / 1.30 dB balance 0.00 base volume: 65536 / 100% / 0.00 dB volume steps: 65537 muted: no current latency: 0.00 ms max request: 0 KiB max rewind: 0 KiB monitor source: 1 sample spec: s32le 4ch 44100Hz channel map: front-left,front-right,rear-left,rear-right Surround 4.0 used by: 0 linked by: 0 fixed latency: 99.95 ms module: 20 properties: alsa.resolution_bits = "32" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "USB Audio" alsa.id = "USB Audio" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "0" alsa.card = "2" alsa.card_name = "Scarlett 2i4 USB" alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed" alsa.driver_name = "snd_usb_audio" device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0" sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2" udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB" device.bus = "usb" device.vendor.id = "1235" device.vendor.name = "Novation EMS" device.product.id = "800a" device.product.name = "Scarlett 2i4 USB" device.serial = "Focusrite_Scarlett_2i4_USB" device.string = "hw:2" device.buffering.buffer_size = "70528" device.buffering.fragment_size = "17632" device.access_mode = "mmap" device.description = "Scarlett 2i4 USB" device.icon_name = "audio-card-usb" index: 2 name: <alsa_output.hw_0> driver: <module-alsa-sink.c> flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY state: SUSPENDED suspend cause: IDLE priority: 9950 volume: front-left: 28348 / 43% / -21.84 dB, front-left-of-center: 28348 / 43% / -21.84 dB, front-center: 28348 / 43% / -21.84 dB, front-right: 28348 / 43% / -21.84 dB, front-right-of-center: 28348 / 43% / -21.84 dB, rear-center: 28348 / 43% / -21.84 dB balance 0.00 base volume: 65536 / 100% / 0.00 dB volume steps: 65537 muted: no current latency: 0.00 ms max request: 0 KiB max rewind: 0 KiB monitor source: 2 sample spec: s16le 6ch 44100Hz channel map: front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center used by: 0 linked by: 0 configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms module: 21 properties: alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "VT1708S Analog" alsa.id = "VT1708S Analog" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "0" alsa.card = "0" alsa.card_name = "HDA NVidia" alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 22" alsa.driver_name = "snd_hda_intel" device.bus_path = "pci-0000:00:05.0" sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0" device.bus = "pci" device.vendor.id = "10de" device.vendor.name = "NVIDIA Corporation" device.product.id = "03f0" device.product.name = "MCP61 High Definition Audio" device.form_factor = "internal" device.string = "hw:0" device.buffering.buffer_size = "1058304" device.buffering.fragment_size = "529152" device.access_mode = "mmap+timer" device.description = "Built-in Audio" device.icon_name = "audio-card-pci" [ziga@ziga-pc ~]$ pacmd list-sources 4 source(s) available. * index: 1 name: <alsa_output.hw_2.monitor> driver: <module-alsa-sink.c> flags: DECIBEL_VOLUME LATENCY state: SUSPENDED suspend cause: IDLE priority: 1000 volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, rear-left: 65536 / 100% / 0.00 dB, rear-right: 65536 / 100% / 0.00 dB balance 0.00 base volume: 65536 / 100% / 0.00 dB volume steps: 65537 muted: no current latency: 0.00 ms max rewind: 0 KiB sample spec: s32le 4ch 44100Hz channel map: front-left,front-right,rear-left,rear-right Surround 4.0 used by: 0 linked by: 0 fixed latency: 99.95 ms monitor_of: 1 module: 20 properties: device.description = "Monitor of Scarlett 2i4 USB" device.class = "monitor" device.icon_name = "audio-input-microphone" index: 2 name: <alsa_output.hw_0.monitor> driver: <module-alsa-sink.c> flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: SUSPENDED suspend cause: IDLE priority: 1000 volume: front-left: 65536 / 100% / 0.00 dB, front-left-of-center: 65536 / 100% / 0.00 dB, front-center: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, front-right-of-center: 65536 / 100% / 0.00 dB, rear-center: 65536 / 100% / 0.00 dB balance 0.00 base volume: 65536 / 100% / 0.00 dB volume steps: 65537 muted: no current latency: 0.00 ms max rewind: 0 KiB sample spec: s16le 6ch 44100Hz channel map: front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center used by: 0 linked by: 0 configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms monitor_of: 2 module: 21 properties: device.description = "Monitor of Built-in Audio" device.class = "monitor" device.icon_name = "audio-input-microphone" index: 3 name: <alsa_input.hw_0> driver: <module-alsa-source.c> flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY state: SUSPENDED suspend cause: IDLE priority: 9950 volume: front-left: 99957 / 153% / 11.00 dB, front-right: 99957 / 153% / 11.00 dB balance 0.00 base volume: 65536 / 100% / 0.00 dB volume steps: 65537 muted: no current latency: 0.00 ms max rewind: 0 KiB sample spec: s16le 2ch 44100Hz channel map: front-left,front-right Stereo used by: 0 linked by: 0 configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms module: 22 properties: alsa.resolution_bits = "16" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "VT1708S Analog" alsa.id = "VT1708S Analog" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "0" alsa.card = "0" alsa.card_name = "HDA NVidia" alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 22" alsa.driver_name = "snd_hda_intel" device.bus_path = "pci-0000:00:05.0" sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0" device.bus = "pci" device.vendor.id = "10de" device.vendor.name = "NVIDIA Corporation" device.product.id = "03f0" device.product.name = "MCP61 High Definition Audio" device.form_factor = "internal" device.string = "hw:0" device.buffering.buffer_size = "352768" device.buffering.fragment_size = "176384" device.access_mode = "mmap+timer" device.description = "Built-in Audio" device.icon_name = "audio-input-microphone-pci" index: 4 name: <alsa_input.hw_2> driver: <module-alsa-source.c> flags: HARDWARE DECIBEL_VOLUME LATENCY state: SUSPENDED suspend cause: IDLE priority: 9040 volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB balance 0.00 base volume: 65536 / 100% / 0.00 dB volume steps: 65537 muted: no current latency: 0.00 ms max rewind: 0 KiB sample spec: s32le 2ch 44100Hz channel map: front-left,front-right Stereo used by: 0 linked by: 0 fixed latency: 99.95 ms module: 23 properties: alsa.resolution_bits = "32" device.api = "alsa" device.class = "sound" alsa.class = "generic" alsa.subclass = "generic-mix" alsa.name = "USB Audio" alsa.id = "USB Audio" alsa.subdevice = "0" alsa.subdevice_name = "subdevice #0" alsa.device = "0" alsa.card = "2" alsa.card_name = "Scarlett 2i4 USB" alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed" alsa.driver_name = "snd_usb_audio" device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0" sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2" udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB" device.bus = "usb" device.vendor.id = "1235" device.vendor.name = "Novation EMS" device.product.id = "800a" device.product.name = "Scarlett 2i4 USB" device.serial = "Focusrite_Scarlett_2i4_USB" device.string = "hw:2" device.buffering.buffer_size = "35264" device.buffering.fragment_size = "8816" device.access_mode = "mmap" device.description = "Scarlett 2i4 USB" device.icon_name = "audio-input-microphone-usb" [ziga@ziga-pc ~]$
Do you notice the asterix at the start of each index 1? It tells you which device is set as default, so everything is working correctly (even though you probably want 4 on those sources, a safer way is to use the name which should be same across sinks/sources as opposed to the index), have you made sure to use a never before seen stream or delete the saved settings while testing? More information here: https://wiki.archlinux.org/index.php/Pu … _respected
Last edited by V1del (2014-05-18 14:36:40)
Offline
Kmix doesn't care about your pulsedevice...
So from now on I will decide by asterixes just like you pointed out.
[ziga@ziga-pc ~]$ pacmd list-cards 0 card(s) available.
See 1st), pretty sure that's a direct consequence of not letting it detect the cards and you never actually load any cards...
thought that the lines below load cards... I guess I was wrong. Thank you for pointing this out.
#LOAD SINKS
load-module module-alsa-sink device=hw:2
load-module module-alsa-sink device=hw:0
#LOAD SOURCES
load-module module-alsa-source device=hw:0
load-module module-alsa-source device=hw:2
So how do I load cards then? I would like to see them listed after using "pacmd list-cards".
...a safer way is to use the name which should be same across sinks/sources as opposed to the index...
Regarding this I had a lot of troubles already because indexes sometimes get mixed in pulseaudio. But not in alsa! That is why I already set my "/etc/asound.conf" to look like (i wrote it entirely from information acquired from command "aplay -l"):
pcm.scarlett-2i4 {
type hw
card 2
device 0
}
ctl.scarlett-2i4 {
type hw
card 2
device 0
}
pcm.nvidia-HDA {
type hw
card 0
device 0
}
ctl.nvidia-HDA {
type hw
card 0
device 0
}
Afterwards I Set sinks and sources like below and my index swapping problem is gone:
#LOAD SINKS
load-module module-alsa-sink device=nvidia-HDA
load-module module-alsa-sink device=scarlett-2i4
#LOAD SOURCES
load-module module-alsa-source device=nvidia-HDA
load-module module-alsa-source device=scarlett-2i4
At the moment pulseaudio server starts and loads sinks/sources which I can see in pavucontrol. But pavucontrol doesn't show a menu to swap between "front/rear microphone" for "nvidia-HDA". Maybee this is because "pacmd list-cards" doesn't list any cards... Do you know maybe how to set front mic in "/etc/pulse/default.pa"?
have you made sure to use a never before seen stream or delete the saved settings while testing? More information here: https://wiki.archlinux.org/index.php/Pu … _respected
I normaly only kill pulseaudio using "pulseaudio -k", then I edit "/etc/pulse/default.pa" and afterwards turn pulseaudio back on using "pulseaudio &". Thats all.
C, ARM, ARM assembly, HTML, CSS, JS, Linux
Offline
I get the feeling that you're overengineering this, why would you create that kind of an ALSA conf when the whole point of PulseAudio is to be able to automatically detect and properly configure your soundcards without having to fiddle with the intricancies of ALSA? I don't know the pecularities of using Jack with Pulse, but from what I gather this should be working rather seamlessly by now, see Pulse with Jack: The new new way, there's no reason to configure you cards manually with ALSA.
So how do I load cards then? I would like to see them listed after using "pacmd list-cards".
Aside from reactivating udev detection I have no idea, pulse-cli-syntax manpage tells me of
set-card-profile index|name profile-name
Change the profile of a card.
set-sink-port|set-source-port index|name port-name
Change the profile of a sink (resp. source).
PROPERTY LISTS
update-sink-proplist|update-source-proplist index|name properties
Update the properties of a sink (resp. source) specified by name or index. The property is specified as e.g. device.description="My
Preferred Name"
update-sink-input-proplist|update-source-output-proplist index properties
Update the properties of a sink input (resp. source output) specified by index. The properties are specified as above.
which may be interesting.
Regarding this I had a lot of troubles already because indexes sometimes get mixed in pulseaudio. But not in alsa! That is why I already set my "/etc/asound.conf" to look like (i wrote it entirely from information acquired from command "aplay -l"):
But the indexes don't really matter, the way pulse works is you set a default device (by name or in pavucontrol) and all audio streams route to that when they first appear, if you now want to switch a certain stream to a specific card, you use a GUI or
move-sink-input
to move it to another sink, which will be remembered for that specific stream.
I normaly only kill pulseaudio using "pulseaudio -k", then I edit "/etc/pulse/default.pa" and afterwards turn pulseaudio back on using "pulseaudio &". Thats all.
Yeah as said, pulse remembers which sink a stream was on, so if you simply kill it, then change the value but play back the same stream, it will come from your initial device, unless you disable sink restore as shown in the wiki
Offline
Thanky ou for your repiles. I got frustrated because even with me setting the ALSA through "/etc/asound.conf" manually indexes got mixed up! So the lesson here is: "Never use indexes to adress hardware whether setting up ALSA or. pulseaudio. Because indexes always get mixed up and you end up in trouble. Always aderess hardware by it's name instead." I think philosophy of using indexes is only for usage with pacmd command when pulseaudio server is already up and running. Thats a relief because we can write down an index (1, 2, 3...) faster than device names which can be quite long. This was a solution to my problem. First I wrote "/etc/asound.conf" like this:
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}
This was just to make sure that every input output and controling interfaces were passed on from alsa to pulseaudio. Then I opened "/etc/pulse/default.pa" and reverted it back to default configuration. I only commented out bluetooth section, JACK section and most importantly made sure that auto-loading of modules was enabled (line load-module module-udev-detect does the trick). After this I saved the file and started pulseaudio server using command pulseaudio &. Server started and now I could use the command pacmd list-cards to list my cards first:
[ziga@ziga-pc ~]$ pacmd list-cards
4 card(s) available.
index: 0
name: <alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB>
driver: <module-alsa-card.c>
owner module: 21
properties:
alsa.card = "2"
alsa.card_name = "Scarlett 2i4 USB"
alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2"
udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB"
device.bus = "usb"
device.vendor.id = "1235"
device.vendor.name = "Novation EMS"
device.product.id = "800a"
device.product.name = "Scarlett 2i4 USB"
device.serial = "Focusrite_Scarlett_2i4_USB"
device.string = "2"
device.description = "Scarlett 2i4 USB"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
profiles:
input:analog-stereo: Analog Stereo Input (priority 10, available: unknown)
input:iec958-stereo: Digital Stereo (IEC958) Input (priority 5, available: unknown)
output:analog-surround-40: Analog Surround 4.0 Output (priority 700, available: unknown)
output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 710, available: unknown)
output:analog-surround-40+input:iec958-stereo: Analog Surround 4.0 Output + Digital Stereo (IEC958) Input (priority 705, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <output:analog-surround-40+input:analog-stereo>
sinks:
alsa_output.usb-Focusrite_Scarlett_2i4_USB-00-USB.analog-surround-40/#3: Scarlett 2i4 USB Analog Surround 4.0
sources:
alsa_output.usb-Focusrite_Scarlett_2i4_USB-00-USB.analog-surround-40.monitor/#5: Monitor of Scarlett 2i4 USB Analog Surround 4.0
alsa_input.usb-Focusrite_Scarlett_2i4_USB-00-USB.analog-stereo/#6: Scarlett 2i4 USB Analog Stereo
ports:
analog-input: Analog Input (priority 10000, latency offset 40000 usec, available: unknown)
properties:
iec958-stereo-input: Digital Input (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
properties:
analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
properties:
index: 1
name: <alsa_card.usb-046d_081d_B79494D0-00-U0x46d0x81d>
driver: <module-alsa-card.c>
owner module: 22
properties:
alsa.card = "3"
alsa.card_name = "USB Device 0x46d:0x81d"
alsa.long_card_name = "USB Device 0x46d:0x81d at usb-0000:00:02.1-2, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:02.1-usb-0:2:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-2/1-2:1.0/sound/card3"
udev.id = "usb-046d_081d_B79494D0-00-U0x46d0x81d"
device.bus = "usb"
device.vendor.id = "046d"
device.vendor.name = "Logitech, Inc."
device.product.id = "081d"
device.product.name = "HD Webcam C510"
device.serial = "046d_081d_B79494D0"
device.form_factor = "webcam"
device.string = "3"
device.description = "HD Webcam C510"
module-udev-detect.discovered = "1"
device.icon_name = "camera-web-usb"
profiles:
input:analog-mono: Analog Mono Input (priority 1, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <off>
ports:
analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "audio-input-microphone"
index: 2
name: <alsa_card.pci-0000_00_05.0>
driver: <module-alsa-card.c>
owner module: 23
properties:
alsa.card = "0"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 23"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:05.0"
sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "03f0"
device.product.name = "MCP61 High Definition Audio"
device.form_factor = "internal"
device.string = "0"
device.description = "Built-in Audio"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
input:analog-stereo: Analog Stereo Input (priority 10, available: unknown)
output:analog-stereo: Analog Stereo Output (priority 1000, available: unknown)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 1010, available: unknown)
output:analog-surround-40: Analog Surround 4.0 Output (priority 700, available: unknown)
output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 710, available: unknown)
output:analog-surround-41: Analog Surround 4.1 Output (priority 800, available: unknown)
output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 810, available: unknown)
output:analog-surround-50: Analog Surround 5.0 Output (priority 700, available: unknown)
output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 710, available: unknown)
output:analog-surround-51: Analog Surround 5.1 Output (priority 3800, available: unknown)
output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 3810, available: unknown)
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 400, available: unknown)
output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 410, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <output:analog-surround-51+input:analog-stereo>
sinks:
alsa_output.pci-0000_00_05.0.analog-surround-51/#2: Built-in Audio Analog Surround 5.1
sources:
alsa_output.pci-0000_00_05.0.analog-surround-51.monitor/#3: Monitor of Built-in Audio Analog Surround 5.1
alsa_input.pci-0000_00_05.0.analog-stereo/#4: Built-in Audio Analog Stereo
ports:
analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-input-microphone"
analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
properties:
device.icon_name = "audio-input-microphone"
analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: yes)
properties:
analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
properties:
analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
properties:
analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-headphones"
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: unknown)
properties:
device.icon_name = "video-display"
index: 3
name: <alsa_card.pci-0000_02_00.1>
driver: <module-alsa-card.c>
owner module: 24
properties:
alsa.card = "1"
alsa.card_name = "HDA ATI HDMI"
alsa.long_card_name = "HDA ATI HDMI at 0xdffec000 irq 43"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:02:00.1"
sysfs.path = "/devices/pci0000:00/0000:00:09.0/0000:02:00.1/sound/card1"
device.bus = "pci"
device.vendor.id = "1002"
device.vendor.name = "Advanced Micro Devices, Inc. [AMD/ATI]"
device.product.id = "aa30"
device.product.name = "Radeon HD 4850 512MB GDDR3 PCI-E Dual Slot Fansink"
device.string = "1"
device.description = "Radeon HD 4850 512MB GDDR3 PCI-E Dual Slot Fansink"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
profiles:
output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 400, available: unknown)
off: Off (priority 0, available: unknown)
active profile: <off>
ports:
hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
properties:
device.icon_name = "video-display"
I noticed that every card posesses an index which will change at every boot and isn't a reliable beacon to adress sound cards. But right after every index there are rows like this (I have 4 cards and have therefore 4 rows):
name: <alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB>
name: <alsa_card.usb-046d_081d_B79494D0-00-U0x46d0x81d>
name: <alsa_card.pci-0000_00_05.0>
name: <alsa_card.pci-0000_02_00.1>
This are the names we can use to adress the soundcards because these remain constant during reboots etc. But to initialize a card we not only need their names but we allso need their supported modes which we can allso get from the first code snippet I posted. For example my card named "alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB" has multiple supported modes (what is after an ":" is only a description of modes):
input:analog-stereo
input:iec958-stereo
output:analog-surround-40
output:analog-surround-40+input:analog-stereo
output:analog-surround-40+input:iec958-stereo
off
I won't list modes for other cards. You can check them yourself in the first code snippet. So now I reopened "/etc/pulse/default.pa" and added lines to initialize cards. To initialize cards I needed to know card names and their supported modes (we can only use 1 mode for a card at the time). I added these few lines (Instead of indexes I used names this time):
set-card-profile alsa_card.pci-0000_00_05.0 output:analog-surround-51+input:analog-stereo
set-card-profile alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB output:analog-surround-40+input:analog-stereo
set-card-profile alsa_card.usb-046d_081d_B79494D0-00-U0x46d0x81d off
set-card-profile alsa_card.pci-0000_02_00.1 off
You can see that I turned off HDMI and a webcam which I don't want to use. Ok so now we only need to choose the default "sink" and "source" which will be set up at the boot. But first we need to start the pulseaudio server so we can use command pacmd list-sinks and pacmd list-sources which will tell us what are our sinks and sources. Again we are interested only in names and not indexes.
My sinks:
[ziga@ziga-pc ~]$ pacmd list-sinks
2 sink(s) available.
* index: 2
name: <alsa_output.pci-0000_00_05.0.analog-surround-51>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9959
volume: front-left: 29033 / 44% / -21.22 dB, front-right: 29033 / 44% / -21.22 dB, rear-left: 29033 / 44% / -21.22 dB, rear-right: 29033 / 44% / -21.22 dB, front-center: 29033 / 44% / -21.22 dB, lfe: 29033 / 44% / -21.22 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 3
sample spec: s16le 6ch 48000Hz
channel map: front-left,front-right,rear-left,rear-right,front-center,lfe
Surround 5.1
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1837.33 ms
card: 2 <alsa_card.pci-0000_00_05.0>
module: 23
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "VT1708S Analog"
alsa.id = "VT1708S Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 23"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:05.0"
sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "03f0"
device.product.name = "MCP61 High Definition Audio"
device.form_factor = "internal"
device.string = "surround51:0"
device.buffering.buffer_size = "1058304"
device.buffering.fragment_size = "529152"
device.access_mode = "mmap+timer"
device.profile.name = "analog-surround-51"
device.profile.description = "Analog Surround 5.1"
device.description = "Built-in Audio Analog Surround 5.1"
alsa.mixer_name = "VIA VT1708S"
alsa.components = "HDA:11060397,1043840c,00100000"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
properties:
analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: yes)
properties:
active port: <analog-output>
index: 3
name: <alsa_output.usb-Focusrite_Scarlett_2i4_USB-00-USB.analog-surround-40>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME
state: SUSPENDED
suspend cause: IDLE
priority: 9049
volume: front-left: 38340 / 59% / -13.97 dB, front-right: 38340 / 59% / -13.97 dB, rear-left: 38340 / 59% / -13.97 dB, rear-right: 38340 / 59% / -13.97 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 5
sample spec: s32le 4ch 48000Hz
channel map: front-left,front-right,rear-left,rear-right
Surround 4.0
used by: 0
linked by: 0
fixed latency: 99.95 ms
card: 0 <alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB>
module: 21
properties:
alsa.resolution_bits = "32"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "Scarlett 2i4 USB"
alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2"
udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB"
device.bus = "usb"
device.vendor.id = "1235"
device.vendor.name = "Novation EMS"
device.product.id = "800a"
device.product.name = "Scarlett 2i4 USB"
device.serial = "Focusrite_Scarlett_2i4_USB"
device.string = "surround40:2"
device.buffering.buffer_size = "70528"
device.buffering.fragment_size = "17632"
device.access_mode = "mmap"
device.profile.name = "analog-surround-40"
device.profile.description = "Analog Surround 4.0"
device.description = "Scarlett 2i4 USB Analog Surround 4.0"
alsa.mixer_name = "USB Mixer"
alsa.components = "USB1235:800a"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
ports:
analog-output: Analog Output (priority 9900, latency offset 0 usec, available: unknown)
properties:
active port: <analog-output>
My sources:
[ziga@ziga-pc ~]$ pacmd list-sources
4 source(s) available.
index: 3
name: <alsa_output.pci-0000_00_05.0.analog-surround-51.monitor>
driver: <module-alsa-card.c>
flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1950
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, rear-left: 65536 / 100% / 0.00 dB, rear-right: 65536 / 100% / 0.00 dB, front-center: 65536 / 100% / 0.00 dB, lfe: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s16le 6ch 48000Hz
channel map: front-left,front-right,rear-left,rear-right,front-center,lfe
Surround 5.1
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1837.33 ms
monitor_of: 2
card: 2 <alsa_card.pci-0000_00_05.0>
module: 23
properties:
device.description = "Monitor of Built-in Audio Analog Surround 5.1"
device.class = "monitor"
alsa.card = "0"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 23"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:05.0"
sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "03f0"
device.product.name = "MCP61 High Definition Audio"
device.form_factor = "internal"
device.string = "0"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
* index: 4
name: <alsa_input.pci-0000_00_05.0.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9959
volume: front-left: 20137 / 31% / -30.75 dB, front-right: 20137 / 31% / -30.75 dB
balance 0.00
base volume: 6368 / 10% / -60.75 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0.00 ms; range is 0.50 .. 1837.33 ms
card: 2 <alsa_card.pci-0000_00_05.0>
module: 23
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "VT1708S Analog"
alsa.id = "VT1708S Analog"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "HDA NVidia"
alsa.long_card_name = "HDA NVidia at 0xdfdf4000 irq 23"
alsa.driver_name = "snd_hda_intel"
device.bus_path = "pci-0000:00:05.0"
sysfs.path = "/devices/pci0000:00/0000:00:05.0/sound/card0"
device.bus = "pci"
device.vendor.id = "10de"
device.vendor.name = "NVIDIA Corporation"
device.product.id = "03f0"
device.product.name = "MCP61 High Definition Audio"
device.form_factor = "internal"
device.string = "front:0"
device.buffering.buffer_size = "352768"
device.buffering.fragment_size = "176384"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Built-in Audio Analog Stereo"
alsa.mixer_name = "VIA VT1708S"
alsa.components = "HDA:11060397,1043840c,00100000"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
properties:
device.icon_name = "audio-input-microphone"
analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
properties:
device.icon_name = "audio-input-microphone"
analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: yes)
properties:
active port: <analog-input-front-mic>
index: 5
name: <alsa_output.usb-Focusrite_Scarlett_2i4_USB-00-USB.analog-surround-40.monitor>
driver: <module-alsa-card.c>
flags: DECIBEL_VOLUME LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 1040
volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB, rear-left: 65536 / 100% / 0.00 dB, rear-right: 65536 / 100% / 0.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s32le 4ch 48000Hz
channel map: front-left,front-right,rear-left,rear-right
Surround 4.0
used by: 0
linked by: 0
fixed latency: 99.95 ms
monitor_of: 3
card: 0 <alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB>
module: 21
properties:
device.description = "Monitor of Scarlett 2i4 USB Analog Surround 4.0"
device.class = "monitor"
alsa.card = "2"
alsa.card_name = "Scarlett 2i4 USB"
alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2"
udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB"
device.bus = "usb"
device.vendor.id = "1235"
device.vendor.name = "Novation EMS"
device.product.id = "800a"
device.product.name = "Scarlett 2i4 USB"
device.serial = "Focusrite_Scarlett_2i4_USB"
device.string = "2"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
index: 6
name: <alsa_input.usb-Focusrite_Scarlett_2i4_USB-00-USB.analog-stereo>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9049
volume: front-left: 99957 / 153% / 11.00 dB, front-right: 99957 / 153% / 11.00 dB
balance 0.00
base volume: 65536 / 100% / 0.00 dB
volume steps: 65537
muted: no
current latency: 0.00 ms
max rewind: 0 KiB
sample spec: s32le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
fixed latency: 99.95 ms
card: 0 <alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB>
module: 21
properties:
alsa.resolution_bits = "32"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = "USB Audio"
alsa.id = "USB Audio"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "2"
alsa.card_name = "Scarlett 2i4 USB"
alsa.long_card_name = "Focusrite Scarlett 2i4 USB at usb-0000:00:02.1-1, high speed"
alsa.driver_name = "snd_usb_audio"
device.bus_path = "pci-0000:00:02.1-usb-0:1:1.0"
sysfs.path = "/devices/pci0000:00/0000:00:02.1/usb1/1-1/1-1:1.0/sound/card2"
udev.id = "usb-Focusrite_Scarlett_2i4_USB-00-USB"
device.bus = "usb"
device.vendor.id = "1235"
device.vendor.name = "Novation EMS"
device.product.id = "800a"
device.product.name = "Scarlett 2i4 USB"
device.serial = "Focusrite_Scarlett_2i4_USB"
device.string = "front:2"
device.buffering.buffer_size = "35264"
device.buffering.fragment_size = "8816"
device.access_mode = "mmap"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "Scarlett 2i4 USB Analog Stereo"
alsa.mixer_name = "USB Mixer"
alsa.components = "USB1235:800a"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-usb"
ports:
analog-input: Analog Input (priority 10000, latency offset 40000 usec, available: unknown)
properties:
active port: <analog-input>
Well for my "sink" I want to use 5.1 Nvidia card offcourse and for "source" a professional audio interface Scarlett 2i4. So from the two snippets above I again read the names of the desired "sinks" and "sources" and add these two lines in "/etc/pulse/default.pa":
set-default-sink alsa_output.pci-0000_00_05.0.analog-surround-51
set-default-source alsa_input.usb-Focusrite_Scarlett_2i4_USB-00-USB.analog-stereo
I restart pulseaudio and everything is working as it should. The only two things which bothers me is that my Nvidia 5.1 card has three microphone inputs and at every boot pulseaudio sets rear as the default. But I want to set the front one as default. How do I do it? Then there is another buggy thing with Skype which always uses Scarlett 2i4 sink instead of the Nvidia 5.1 sink which is set as default. Weird! This is why I have to turn off Scarlet 2i4 using pacmd set-card-profile alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB off while pulseaudio server is up and running or doing it in pavucontrol. This is how I force Skype to use the leftovers but I end up with a microphone of lesser quality. After I am finished with Skype I restore the profile for Scarlet 2i4 with pacmd set-card-profile alsa_card.usb-Focusrite_Scarlett_2i4_USB-00-USB output:analog-surround-40+input:analog-stereo and life goes on. Nevertheless this is still bugging me.
I hope my response will help anyone.
ADD:
I forgot to mention that at the beginning you have to disable pulseaudio from autospawning. You can do this in "nano /etc/pulse/client.conf" by adding a line autospawn = no.
I found out later that I can set the front mic as default by using command "pacmd list-sources" and locate ports. Then assign port "analog-input-front-mic" to my "source" named "alsa_input.pci-0000_00_05.0.analog-stereo" by adding a line "set-source-port alsa_input.pci-0000_00_05.0.analog-stereo" in "/etc/pulse/default.pa".
And about Skype... This program is completely ignoring the default settings set in pulseaudio. But this is no problem because we can start it using command "PULSE_SINK=alsa_output.pci-0000_00_05.0.analog-surround-51 PULSE_SOURCE=alsa_input.pci-0000_00_05.0.analog-stereo skype" in terminal.
Last edited by 71GA (2014-05-26 14:43:58)
C, ARM, ARM assembly, HTML, CSS, JS, Linux
Offline