Discussion:
WARNING: Latest Linphone on Arch breaks device access
Chris Brannon
2016-09-07 14:31:47 UTC
Permalink
If you use Linphone on Arch, beware. The latest release built 31 August
introduced what for me is a showstopper bug. I'm referring to
Linphone-3.10.2-1.
Hi Janina,
I think I might have a solution for you.
The only reason this will work is that you are using the headset for all
three functions: ringer, playback, and capture. If you needed something
fancier, this falls flat.
You can set a specific default card for a given application using the
ALSA_CARD environment variable.
For instance,
ALSA_CARD=Headset espeak 'Hello there.'
should cause espeak to speak the string through your headset.
So try setting ALSA_CARD when starting linphone.

Now there's another problem in that Linphone seems to want to use
pulseaudio for the default sound output. Can't help you with that one.
Maybe the config file would at least let you specify alsa rather than
pulse?

-- Chris
Janina Sajka
2016-09-07 20:19:09 UTC
Permalink
Haha! Chris Brannon, you rock! Mission accomplished

I now have in /etc/modprobe.d/alsa.conf the USB sound card device
ordering that makes the trick you suggested work like a charm:

ALSA_CARD=Headset linphonec; linphonec

brings up the SIP phone and works as expected. I think this will
seriously do until the real thing comes along! <satisfied grin>

Thanks again, Chris!

Janina
You've put me on the trail of docs I've looked for and failed to find
forever.
http://alsa.opensrc.org/MultipleCards
If I'm reading this correctly, I should be able to get the results I
need by specifying a vendor and product id to order my two usb cards
like I want them ordered.
Very cool. Hope it works!
Janina
It was a great suggestion, Chris. Unfortunately, it seems there's yet
another bug in how alsa handles usb devices.
I have 2 usb devices. No matter how I specify things, the card that gets
invoked is the first of those two.
Oh interesting. So it looks like there's a name clash.
Last time I dealt with multiple USB audio devices, they had unique
human-friendly IDs by default. My Logitech USB headset was called
Headset, and my FM transmitter was called RocketFM.
Apparently I was just lucky.
Not sure how much you know about alsa, so I'll also mention that
you can see the human friendly IDs by looking for the symlinks in
/proc/asound. They're also listed in the output of aplay -l, but it's
sort of non-intuitive what they are.
Now, if I were really clever, I suppose I'd know how to write udev rules
to insure that the Sennheiser gets a lower card ID than the C-Media
device.
Well if you send me the output of lsusb, I can probably write some udev rules
for you. Or alternatively have a look at http://alsa.opensrc.org/Udev for a
starting point.
-- Chris
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Janina Sajka, Phone: +1.443.300.2200
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
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Janina Sajka, Phone: +1.443.300.2200
sip:***@asterisk.rednote.net
Email: ***@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
Chris Brannon
2016-09-07 22:01:25 UTC
Permalink
Post by Janina Sajka
I now have in /etc/modprobe.d/alsa.conf the USB sound card device
Aha. I had forgotten about that.
Anyway, here are the udev rules to name your cards. Unless I messed up
somewhere, these should give you the names Sennheiser and CMedia.
It's overly commented, partly for my benefit, because I don't
write udev rules too often.
Here's a link. I think mailman scrubs attachments, and I don't want it
to be mangled by pasting it inline.
http://the-brannons.com/misc/90-usbaudio-rename.rules

-- Chris
Janina Sajka
2016-09-08 09:14:56 UTC
Permalink
Hi, Chris:

I will give your rules a spin and report back--but not today, just in
case there's a problem. I have calls today, but I'm clear of them at
day's end.

Thanks also for not pasting them inline. I had a profound experience of
executing a script that I recieved from a very brilliant engineer
colleague once.

As luck would have it, a mailman reformat of a line break ended up
executing:

rm -rf $HOME

I kid you not. This actually happened to me shortly after I lefft AFB. I
took it as spiritual encouragement to put the past behind me and not
worry about it anymore! It's funny now. At the time it was rather
devestating.

So, more news over the weekend, and thank you again for your stellar
assistance.

Janina
Post by Chris Brannon
Post by Janina Sajka
I now have in /etc/modprobe.d/alsa.conf the USB sound card device
Aha. I had forgotten about that.
Anyway, here are the udev rules to name your cards. Unless I messed up
somewhere, these should give you the names Sennheiser and CMedia.
It's overly commented, partly for my benefit, because I don't
write udev rules too often.
Here's a link. I think mailman scrubs attachments, and I don't want it
to be mangled by pasting it inline.
http://the-brannons.com/misc/90-usbaudio-rename.rules
-- Chris
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Janina Sajka, Phone: +1.443.300.2200
sip:***@asterisk.rednote.net
Email: ***@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
John Covici
2016-09-07 18:14:40 UTC
Permalink
I think you can use names instead of numbers, maybe a different
variable in your asoundrc.

On Wed, 07 Sep 2016 13:31:28 -0400,
It was a great suggestion, Chris. Unfortunately, it seems there's yet
another bug in how alsa handles usb devices.
I have 2 usb devices. No matter how I specify things, the card that gets
invoked is the first of those two.
Now, if I were really clever, I suppose I'd know how to write udev rules
to insure that the Sennheiser gets a lower card ID than the C-Media
device. This really should be an exact science, but my experience says
it's anything but.
Sigh.
Janina
Post by Chris Brannon
If you use Linphone on Arch, beware. The latest release built 31 August
introduced what for me is a showstopper bug. I'm referring to
Linphone-3.10.2-1.
Hi Janina,
I think I might have a solution for you.
The only reason this will work is that you are using the headset for all
three functions: ringer, playback, and capture. If you needed something
fancier, this falls flat.
You can set a specific default card for a given application using the
ALSA_CARD environment variable.
For instance,
ALSA_CARD=Headset espeak 'Hello there.'
should cause espeak to speak the string through your headset.
So try setting ALSA_CARD when starting linphone.
Now there's another problem in that Linphone seems to want to use
pulseaudio for the default sound output. Can't help you with that one.
Maybe the config file would at least let you specify alsa rather than
pulse?
-- Chris
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Janina Sajka, Phone: +1.443.300.2200
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
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Your life is like a penny. You're going to lose it. The question is:
How do
you spend it?

John Covici
***@ccs.covici.com
Janina Sajka
2016-09-07 18:53:41 UTC
Permalink
Tried that. No joy.

Actually, names are less reliable than the hw:X (or plughw:X)
designations.

Note this is a problem when there's more than one USB sound device. I've
not seen the problem apart from USB sound.
Post by John Covici
I think you can use names instead of numbers, maybe a different
variable in your asoundrc.
On Wed, 07 Sep 2016 13:31:28 -0400,
It was a great suggestion, Chris. Unfortunately, it seems there's yet
another bug in how alsa handles usb devices.
I have 2 usb devices. No matter how I specify things, the card that gets
invoked is the first of those two.
Now, if I were really clever, I suppose I'd know how to write udev rules
to insure that the Sennheiser gets a lower card ID than the C-Media
device. This really should be an exact science, but my experience says
it's anything but.
Sigh.
Janina
Post by Chris Brannon
If you use Linphone on Arch, beware. The latest release built 31 August
introduced what for me is a showstopper bug. I'm referring to
Linphone-3.10.2-1.
Hi Janina,
I think I might have a solution for you.
The only reason this will work is that you are using the headset for all
three functions: ringer, playback, and capture. If you needed something
fancier, this falls flat.
You can set a specific default card for a given application using the
ALSA_CARD environment variable.
For instance,
ALSA_CARD=Headset espeak 'Hello there.'
should cause espeak to speak the string through your headset.
So try setting ALSA_CARD when starting linphone.
Now there's another problem in that Linphone seems to want to use
pulseaudio for the default sound output. Can't help you with that one.
Maybe the config file would at least let you specify alsa rather than
pulse?
-- Chris
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Janina Sajka, Phone: +1.443.300.2200
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
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
How do
you spend it?
John Covici
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Janina Sajka, Phone: +1.443.300.2200
sip:***@asterisk.rednote.net
Email: ***@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
Janina Sajka
2016-09-07 19:00:12 UTC
Permalink
I'll study that doc, but I work best from cribbed examples. So, I'd like
to owe you a pizza and accept your most gracious offer!


Bus 002 Device 034: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

Bus 002 Device 033: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 002 Device 005: ID 0409:005a NEC Corp. HighSpeed Hub
Bus 002 Device 004: ID 045e:0047 Microsoft Corp. IntelliMouse Explorer 3.0
Bus 002 Device 003: ID 1395:3556 Sennheiser Communications USB Headset
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 04b8:0131 Seiko Epson Corp. GT-F720 [GT-S620/Perfection V30/V300 Photo]
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
It was a great suggestion, Chris. Unfortunately, it seems there's yet
another bug in how alsa handles usb devices.
I have 2 usb devices. No matter how I specify things, the card that gets
invoked is the first of those two.
Oh interesting. So it looks like there's a name clash.
Last time I dealt with multiple USB audio devices, they had unique
human-friendly IDs by default. My Logitech USB headset was called
Headset, and my FM transmitter was called RocketFM.
Apparently I was just lucky.
Not sure how much you know about alsa, so I'll also mention that
you can see the human friendly IDs by looking for the symlinks in
/proc/asound. They're also listed in the output of aplay -l, but it's
sort of non-intuitive what they are.
Now, if I were really clever, I suppose I'd know how to write udev rules
to insure that the Sennheiser gets a lower card ID than the C-Media
device.
Well if you send me the output of lsusb, I can probably write some udev rules
for you. Or alternatively have a look at http://alsa.opensrc.org/Udev for a
starting point.
-- Chris
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
--
Janina Sajka, Phone: +1.443.300.2200
sip:***@asterisk.rednote.net
Email: ***@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
Loading...