Re: [orca-list] ALSA Card Ordering [Was: I hate pulse]



Sure, Fernando! Here's my annotated current list:

Note that these are on a tower system at my office desk. All outputs are
routed into a Mackie 1202 audio mixer that physically sites on a shelf
right above my keyboard--where sighted folks would typically put a video
monitor. I have a pair of old Roland monitors on a level with my ears on
this same shelf. Behind me on the wall are a pair of old JBL Ion powered
speakers. The Mackie allows me to play output to either pair (or both),
or to a headset (see below).


$aplay -l |grep card

card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
Comment: This one is the builtin on the motherboard. It's for Speakup with espeakup TTS. It doesn't share
well, but I wouldn't particularly want it to share on this machine, as
that easily means getting non screen reader output mixed with my screen
reader's TTS. I don't use the hdmi, though I'm thinking of possibly
attaching an Amazon Firestick there.

card 1: Device [C-Media USB Audio Device], device 0: USB Audio [USB
Audio]
Comment: This one is a $15 USB device I picked up years ago. It's for Orca over Speech-Dispatcher also using
espeak, currently via libao. On my laptop I have Speakup and Orca
talking through the same device, but that hasn't worked for me on this
tower system--not for the many years I ran Fedora, or now under Arch.

card 2: Headset [Sennheiser USB Headset], device 0: USB Audio [USB
Audio]
Comment:This is a gamer headset I picked up some 6-7 years ago vor
around $160. It lives right by the Mackie where I can easily grab it and
put it on my head. It's for SIP voip telephone calls over either
freeswitch (currently broken) or linphonec (currently working). This
device is very important to my business life as it allows me to talk on
the phone but still have Speakup and/or Orca in my ears without the
screen reader bleeding into the phone call. Literally it's my business
telephone with a defined extension on my data center hosted Asterisk
PBX. It's microphone input is routed directly into the Sennheiser USB
dongle. Meanwhile, output from the USB dongle gets a pair of inputs on
the Mackie, while the headset's audio input cable is attached to the
headphone jack on the Mackie.

card 3: AV710 [Chaintech AV-710], device 0: ICE1724 [ICE1724]
card 3: AV710 [Chaintech AV-710], device 1: ICE1724 IEC958 [ICE1724
IEC958]
card 3: AV710 [Chaintech AV-710], device 2: ICE1724 Surrounds [ICE1724
Surround PCM]
Comment: This is a PCI card I picked up years ago for $25. I think it's
one of my best buys ever, as the chipset is top notch quality audio for
its time. It's my goto device anytime I simply need to play some audio.

card 4: DSP [Hammerfall DSP], device 0: RME Hammerfall DSP + Multiface
[RME Hammerfall DSP + Multiface]
Comment: This is the original RME Hammerfalls DAC unit which set me back
some $1,500 some 15 years ago. It's the device I use for editing audio
wether with sox or ecasound, or my old favorite wedit. It's also my midi
interface as I have an old 61-lkey keyboard controller behind my 104
typing keyboard for quick access to playing a few musical notes. It also
interfaces my Marantz casette deck--so many old cassettes still to rip!
And, it interfaces my Sony DAT deck. I've had various music making units
interfaced, currently a Roland XV5050, hopefully to be soon swapped out
for something that will keep audio in the digital domain. Probably this
device will get replaced someday in the future, as it tops out at 96Khz
sampling.

For a sample of what I do with this card, which is sometimes routed via
jackd, take a look at the sample 1 minute "sound montage" posted at:

https://WeThePeeple.org

Full disclosure here. What you hear at this link was story-boarded using
this device. All the sound samples were edited and basically laid out,
except the piano and the snare drum, using this device. In other words, I figured out my composition using 
this card. Final mixing, however, was done on
a Mac in a studio I work with in College Park. Basically, I took the
pieces of sound to their studio location on a USB stick with a printout of what I
wanted at what time offset and pan location for final assembly, as it
were.

This "sound montage" introduces a song I, and the other musicians I
worked with, expect to release soon, as soon as all the copyright
licenses are arranged properly.

I should add that I'm the keyboard gal on this song. I got files from
the studio reflecting recently recorded piano, bass drums, and then
vocals. There were several iterations. Against these i picked out what I
wanted to add using the Roland XV5050, practiced my parts until I was
ready to take my XV5050 to that studio and lay my own tracks that were
then considered and edited into the final mix we'll be releasing.

The montage I've published is based almost entirely on Creative Commons
licensed, so no copyright. The sole exception is the Moslem Meuzin,
where I've been unable to find actual ownership info, so am relying on
U.S. Fair Use as my defense, should I be challenged. But, now I digress
from explaining how I use my audio devices!

hth

Janina

Fernando Botelho writes:
Wow, now you just made me and a bunch of others very curious about what
anyone would do with 4 or 5 sound cards on a computer! :)


Best,


Fernando



On 11/21/2017 02:21 PM, Janina Sajka via orca-list wrote:
Thanks, Peter. I will play around with your suggestions sometime soon.
For now I just want to acknowledge your email and thank you for taking
the time to provide concrete suggestions.


Part of the problem with trying out new things on a machine with 4-5
audio cards, is that there's a reason for putting so many cards on one
system in the first place. They're doing very specific things for me,
and it's a bit hard to find the time to put all that at risk while
trying out something new. But, I will get there sometime before year's
end, and I will happily rely on your good advice when I do that.

Thanks again. To be continued!

Best,

Janina

Peter Vágner writes:
Hello Janina,

By default pulseaudio is configured through its main configuration file at
/etc/pulse/default.pa to dynamically load all the modules corresponding
with your hardware taking over all the available sound devices.
If you only would like to configure it to load concrete driver modules for
a few devices you would like it to hijack you can create your user specific
~/.config/pulse/default.pa commenting out parts which are controlling the
autodetection and manually loading those driver modules and those feature
specific modules you do care about.
The file /etc/pulse/default.pa contains usefull examples with some comments
alongside them so I think you will realize how the puzzle will stick
together when you combine it with the knowledge on alsa device ordering you
have explained to us a few months ago.
For example you might like to comment out this...
### 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
and you might like to uncomment and modify this instead
### Load audio drivers statically
### (it's probably better to not load these drivers manually, but instead
### use module-udev-detect -- see below -- for doing this automatically)
#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0
And depending on what you are trying to do you may also like to optionally
uncomment
#load-module module-null-sink
#load-module module-pipe-sink

By learning this and making pulse work for you, combining it with its
ability to be controlled via pacmd cli utility pulseaudio might become your
new Mackie if you will have problems finding a device featuring classic
radio style controls and knobs.
I am occassionally thinking about your sound setup as you have described it
a few months ago and this is definatelly one of the directions you should
try exploring.
I have always wanted to point it out gently so you might like to consider
something like this however I was not sure you will like it so depending on
my current mood I was putting it aside all the time.
Now you have shown your interest in this direction so I've changed my mind
a bit.
I don't have much more experiences with setting up a sound system, however
I do like pulseaudio so if you are happy to talk with someone else who is
thinking from the other end to yours please just ask. I think we may have
fun trying out new ways on how to make it work.

Greetings

Peter


2017-11-15 16:03 GMT+01:00 Janina Sajka via orca-list <orca-list gnome org>:

Chrys:

I've kept your message from August around because I've found it useful.
Thank you.

Quick question: Do you know of a cli way of telling pulse to ignore
certain cards and use certain others instead? For instance, how can I tell
pulse to
limit itself to cards 2 and 3, and leave 0, 1 and 4 alone?

Thanks,

Janina

chrys writes:
Howdy,

you can get all your soundcards with
pactl list short sinks
or more detailed with:
pacmd list-sinks

to set a new default device use:
pacmd set-default-sink <Index>
the index is the number on the beginning of the line of pactl list short
sinks

if the wrong soundcard is set you can run those commans via SSH.
it remembers the default but if you dont trust and want to be sure that a
special device is set you can place it as start script

i also wrote a small script and bound it to an bash and gnome shortcut to
cycle between all soundcards (maybe its useful for you or others)
---- script start ------
#!/bin/bash

sinks=(`pacmd list-sinks | sed -n -e
's/\**[[:space:]]index:[[:space:]]\([[:digit:]]\)/\1/p'`)
sinks_count=${#sinks[@]}
active_sink_index=`pacmd list-sinks | sed -n -e
's/\*[[:space:]]index:[[:space:]]\([[:digit:]]\)/\1/p'`
newSink=${sinks[0]}
ord=0

while [ $ord -lt $sinks_count ];
do
     echo ${sinks[$ord]}
     if [ ${sinks[$ord]} -gt $active_sink_index ] ; then
         newSink=${sinks[$ord]}
         break
     fi
     let ord++
done

# move current running streams to the new device
pactl list short sink-inputs|while read stream; do
     streamId=$(echo $stream|cut '-d ' -f1)
     echo "moving stream $streamId"
     pactl move-sink-input "$streamId" "$newSink"
done
pacmd set-default-sink "$newSink"
--- script end----

Am 20.08.2017 um 18:01 schrieb John G. Heim:
Well, it's kind of hard to reconfigure pulse when you have no sound.
Again, at least 3 times in the past year or 2, I've lost sound, had to
use ssh to get into my computer, and remove the ~/.config/pulse/
folder.
I didn't make up the solution, I found it on this list. So I am not the
only one. It's a problem. Lets not act like it's not.


I don't know, I speculated pulse's problems were due to it not being
possible to guarantee the order in which hardware devices are
discovered. Maybe that's wrong but it's not really to the point.
Somebody says pulse has a prioritizing algorithm which seems reasonable
to me. But that algorithm probably at least somewhat depends on the
order in which ards are discovered. I don't know how it could be
otherwise and there certainly seems to be amount of randomness in it.




On 08/19/2017 01:39 PM, chrys wrote:
Howdy,

sorry but that is just bullshit lol. Also PA does not choose an
random sound card. it uses that one that you defined as default.
You also can set output devices and prioritys by scripting or
configuration like in alsa... so that argument is just wrong.
  cheers chrys
Am 19.08.2017 um 20:24 schrieb Janina Sajka via orca-list:
Micha:

For me this is yet another reason to stay away from pulse. The last
thing I need with 5 sound cards is having some bot deciding which
ones
should do what, and in what order. I have no use for machines that
ignore my specified configurations to make up their own.


In other words, this is just another way for things to break.

Janina

Michał Zegan writes:
actually from what i know, pulseaudio does not go by ordering,
but it
prioritizes cards based on type like internal card vs usb card vs
whatever... etc

W dniu 19.08.2017 o 19:56, Janina Sajka via orca-list pisze:
Hi, John:

I noted one comment in your post re pulseaudio that I want to
respond
to.

John G Heim writes:
... you can never guarantee that hardware
devices are discovered in the same order. ...
No, but you can control the card order they're assigned, e.g.
via
/etc/modprobe.d/alsa.conf using vid= and pid= params for
multiple USB
sound cards.

The best on line summary of available approaches I've
found to date is
at:

http://alsa.opensrc.org/MultipleCards

I'm currently working through the above as I have a nagging
problem
every time I'm forced to reboot, e.g. after installing a new
Linux
kernel.

My problem is that my hda device isn't always
discovered. This morning I
ran a system update and had to reboot some 30 times
before my Intel-810
hda device was discovered. I've looked in the logs. The
problem is the
system is literally not seeing the device on most boots, yet
once
loaded, it runs perfectly for days and weeks.

According to the above referenced article, there are
approaches I might
try to resolve my problem without rebooting. And, it seems my
current
ordering config code could be updated, too.

Nevertheless, I offer my current code because it does
work to reliably
order my 5 sound devices. The always come up in the
order defined below.
My only issue is whether, or not card 0 has been found, else
the
remaining devices are shifted by 1--which doesn't help
my situation as I
need the headset to match my configured FreeSwitch
config, just as one
example.

<begin config file code>
alias snd-card-0 snd-hd-intel
options snd-card-0 index=0
options snd-hda-intel id=PCH index=0
alias snd-card-1 headset
options snd-card-1 index=1
options snd-usb-audio index=1 vid=0x1395 pid=0x3556
alias snd-card-2 cmedia
options snd-card-2 index=2
options snd-usb-audio index=2 vid=0x0d8c pid=0x000c
alias snd-card-3 ice
options snd-card-3 index=3
options snd-ice1724 index=3
alias snd-card-4 hdsp
options snd-card-4 index=4
options snd-hdsp index=4
<end config file code>

_______________________________________________
orca-list mailing list
orca-list gnome org
https://mail.gnome.org/mailman/listinfo/orca-list
Orca wiki: https://wiki.gnome.org/Projects/Orca
Orca documentation: https://help.gnome.org/users/orca/stable/
GNOME Universal Access guide:
https://help.gnome.org/users/gnome-help/stable/a11y.html
Log bugs and feature requests at http://bugzilla.gnome.org



_______________________________________________
orca-list mailing list
orca-list gnome org
https://mail.gnome.org/mailman/listinfo/orca-list
Orca wiki: https://wiki.gnome.org/Projects/Orca
Orca documentation: https://help.gnome.org/users/orca/stable/
GNOME Universal Access guide:
https://help.gnome.org/users/gnome-help/stable/a11y.html
Log bugs and feature requests at http://bugzilla.gnome.org
_______________________________________________
orca-list mailing list
orca-list gnome org
https://mail.gnome.org/mailman/listinfo/orca-list
Orca wiki: https://wiki.gnome.org/Projects/Orca
Orca documentation: https://help.gnome.org/users/orca/stable/
GNOME Universal Access guide: https://help.gnome.org/users/
gnome-help/stable/a11y.html
Log bugs and feature requests at http://bugzilla.gnome.org
--

Janina Sajka,   Phone:  +1.443.300.2200
                         sip:janina asterisk rednote net
                 Email:  janina rednote net

Linux Foundation Fellow
Executive Chair, Accessibility Workgroup:       http://a11y.org

The World Wide Web Consortium (W3C), Web Accessibility Initiative (WAI)
Chair, Accessible Platform Architectures        http://www.w3.org/wai/apa

_______________________________________________
orca-list mailing list
orca-list gnome org
https://mail.gnome.org/mailman/listinfo/orca-list
Orca wiki: https://wiki.gnome.org/Projects/Orca
Orca documentation: https://help.gnome.org/users/orca/stable/
GNOME Universal Access guide: https://help.gnome.org/users/
gnome-help/stable/a11y.html
Log bugs and feature requests at http://bugzilla.gnome.org


-- 

Janina Sajka,   Phone:  +1.443.300.2200
                        sip:janina asterisk rednote net
                Email:  janina rednote net

Linux Foundation Fellow
Executive Chair, Accessibility Workgroup:       http://a11y.org

The World Wide Web Consortium (W3C), Web Accessibility Initiative (WAI)
Chair, Accessible Platform Architectures        http://www.w3.org/wai/apa



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]