LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   My USB headphones not recognised in Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/my-usb-headphones-not-recognised-in-ubuntu-759084/)

ikon1 10-01-2009 05:22 PM

My USB headphones not recognised in Ubuntu
 
Hi everyone,

I have an Acer laptop, some time ago the headphone jack broke so I purchased a USB headphone set. The manufacturer is Yoga and the model is EM-178. I think the USB plug itself has a C Media chip inside. I was using Vista originally.

Anyway I recently converted to Ubuntu 9.4 and unfortunately I can't get ubuntu to recognise this device. There is no automounting, it does not even appear in lsusb. I've plugged in other usb devices with no problem, it's just this one I have the problem with.

Sound from the laptop speakers is fine. I have tried looking at sound>preferences but since it doesn't even recognise the usb is there then I can't select it.

I'm currently using OSS for the sound system, but it didn't work with ALSA either.

I've searched numerous forums and google searches on this, tried a few different things and nothing's worked.

Any help on this would be very much appreciated.

somedude 10-01-2009 05:38 PM

If lsusb doesn't show the device, you may want to look at the system logs for error messages.
Try this: open a console, plug in the device, give it a few seconds and listen to the hard disk for activity and then type dmesg in the console. You should see some kernel messages relevant to the usb device. That may help pinpoint the problem.

ikon1 10-01-2009 05:44 PM

Thanks for that. Just tried dmesg. Here's the relevant piece of info:

[ 2458.860093] usb 2-4: new full speed USB device using ohci_hcd and address 3
[ 2459.112626] usb 2-4: configuration #1 chosen from 1 choice
[ 2459.114360] Reinsert of an audioctl device 4/0 - USB sound device
[ 2459.199251] Reinsert of an audio streaming device 4/1 - USB sound device

So it *does* know it's there!

But how do I get it to work???

somedude 10-01-2009 05:54 PM

I'm sure I won't be able to help you get this working, but I will try to suggest a couple of things.
It looks like the device is recognized, so you may want to try lspci to see if the audio devices show up. In which case you will need to find drivers specifically for it.
Second thing is - look through dmesg to check for other clues - the message says 'reinserted' so it 'saw' it before.
Try
dmesg | grep usb

ikon1 10-02-2009 03:11 AM

Thanks somedude. I will try this. I think I might have to resign myself to finding a new pair of headphones that are compatible with linux. However I've not yet found a model that specifically mentions this, most of them mention windows/mac only.

tredegar 10-02-2009 04:58 AM

"USB headphones" are probably no different from "USB Speakers"
See here for how I got some USB speakers working.
I expect you can do something similar.

ikon1 10-02-2009 05:08 AM

Thanks a lot. I will try this tonight. Actually, I was thinking of buying some usb speakers, then simply plugging in a pair of headphones in the relevant speaker socket. It's a real shame these usb audio devices don't work straight away as they do in Windows. I'm really happy with ubuntu except with this problem.

tredegar 10-02-2009 06:22 AM

Quote:

I will try this tonight.
OK, and please let us know how you get on.

ikon1 10-02-2009 05:26 PM

OK I tried the script and despite the logic of it my headphones still don't work. After trying tredegar's suggestion I tried somedude's dmesg and this is what came up:

[ 0.561682] usbcore: registered new interface driver usbfs
[ 0.561697] usbcore: registered new interface driver hub
[ 0.561721] usbcore: registered new device driver usb
[ 4.368081] usb usb1: configuration #1 chosen from 1 choice
[ 4.426052] usb usb2: configuration #1 chosen from 1 choice
[ 4.426240] usbcore: registered new interface driver libusual
[ 4.426270] usbcore: registered new interface driver usbserial
[ 4.426296] usbcore: registered new interface driver usbserial_generic
[ 4.426298] usbserial: USB Serial Driver core
[ 5.000042] usb 2-4: new full speed USB device using ohci_hcd and address 2
[ 5.218016] usb 2-4: configuration #1 chosen from 1 choice
[ 13.893438] usbcore: registered new interface driver snd-usb-audio
[ 1150.557640] usb 2-4: USB disconnect, address 2
[ 1173.084042] usb 2-4: new full speed USB device using ohci_hcd and address 3
[ 1173.314335] usb 2-4: configuration #1 chosen from 1 choice

No obvious errors??

Maybe Acer laptops are just not meant to use linux.

tredegar 10-03-2009 03:41 AM

Quote:

OK I tried the script and despite the logic of it my headphones still don't work.
What "script"? If you used mine, it will not work as it is, because it was written for Bose USB speakers, not your headphones.

Your headphones are being recognised, but not used.

Please plug in your headphones, wait for them to be recognised, then tell us the output of
cat /proc/asound/cards

ikon1 10-03-2009 04:41 AM

0 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xc0000000 irq 17
1 [Audio ]: USB-Audio - USB Audio
C-Media INC. USB Audio at usb-0000:00:0b.0-4, full speed


I changed 'Bose' to USB-Audio using Treadegar's solution for USB speakers.

tredegar 10-03-2009 05:38 AM

OK, that's good.
Now let's try the next bit one step at a time:
As root, make a backup of the original alsa.conf file:
Code:

cp /usr/share/alsa/alsa.conf  /usr/share/alsa/alsa.conf.original
As root, edit the file /usr/share/alsa/alsa.conf and find this bit:
Code:

# defaults

defaults.ctl.card 0
defaults.pcm.card 0

Change the 0's to 1's
Save the file
Still as root, do
Code:

/etc/init.d/alsa-utils restart
Turn up your volume.
Open your mixer panel, and make sure nothing is muted, or turned down.
Are the headphones working?

ikon1 10-03-2009 07:28 AM

I put the code in, changed 0's to 1's and saved. In the mixer it is recognising the USB device, the volumes are all up. Unfortunately, the sound is still coming from the speakers, not the headphones. I've selected Usb in sound>preferences but still no joy.

Addison0 10-03-2009 07:48 AM

Don't you need any software for USB Headphone?

tredegar 10-03-2009 08:26 AM

Quote:

Unfortunately, the sound is still coming from the speakers, not the headphones.
This is very strange.
Did you restart alsa-utils ? Otherwise those changes to the conf file will not be recognised.

Are you using pulseaudio or something strange?

What exactly are your USB headphones - the output of lsusb should tell us, though you said in your first post that they weren't detected, maybe not by name, but the USB IDs should be listed. Please post them.

Quote:

Don't you need any software for USB Headphone?
If they're detected by the kernel, they should "just work" without any additional software.

ikon1 10-03-2009 12:27 PM

When I first started this thread the headphones were not appearing in lsusb. But then after the dmesg suggested by somedude they started appearing:

lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0d8c:0001 C-Media Electronics, Inc. Audio Device
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Yes I did alsa restart. In sound>preferences I've tried setting everything to alsa and also setting everything to C-media usb audio but unfortunately still no joy. I don't have pulse audio. The headphones were a cheap pair bought from Maplins, Yoga EM-178. They are 'call-centre' style with a mic as well. The headset is a standard pair with a jack, which you then plug through a usb dongle.

Thanks for your ongoing help with this.

tredegar 10-03-2009 01:59 PM

The following things puzzle me:

1] When you modified alsa.conf to use your USB device instead of the 0 [NVidia ]: HDA-Intel - HDA NVidia0 [NVidia ]: HDA-Intel - HDA NVidia and restarted alsa, nothing should have come out of your speakers (which are connected to your on-board sound device), only your headphones. Maybe you need to double-check this all again?

2] There's little on the www about your device: Bus 002 Device 002: ID 0d8c:0001 C-Media Electronics, Inc. Audio Device, which either means it "just works" or there aren't many people using it.

3] Do your headphones work with anything else (eg any music player) ?

4] I hope you don't still have my script (even modified) running from rc.local, because if that is failing somehow it may be restoring your original setup for sound device 0 at the next boot.

So, trim things back to the bare minimum, and change one thing at a time. Test. Re-test.

HTH

ikon1 10-06-2009 04:23 PM

Thanks to everyone who helped with this. I am now pleased to report that this problem is now solved! This link in an ubuntu forum helped:

http://ubuntuforums.org/showthread.php?t=1130384



Basically I wasn't using PulseAudio properly and was missing a few essential plugins.

tredegar 10-06-2009 04:36 PM

Quote:

Basically I wasn't using PulseAudio properly and was missing a few essential plugins.
Ah!

I did ask in post #15 if you were using PulseAudio. In post #16 you said "I don't have pulse".

But now it's Yes. Please make up your mind before you post in future.

Anyway - Problem solved. Well done.

ikon1 10-07-2009 03:27 AM

Well I didn't have pulse audio when I wrote that, or at least it wasn't installed properly with all the plugins. Only yesterday had the pulseaudio shortcut appeared in the tool bar.

Your posts did help: over the weekend I managed to get the testing 'beep' through the headphones for the first time after re-typing the codes in terminal, then after a bit more tweaking I got them to work with media players. But I still had a problem with Flash sound. Then I saw the post I linked above, installed all the plugins he recommended, and managed to get pulseaudio to switch to the usb. :)

SF1979 10-31-2012 07:38 PM

Bump!
 
Hello, I would like to ask whether anyone can think of a similar approach for a more recent Yoga 5.1 USB Audio Connector.

As with the last person, it also seems to be a C-Media card. I am running standard 64 12.04 Ubuntu.

Code:

cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xf7600000 irq 53
 1 [Device        ]: USB-Audio - USB Sound Device
                      C-Media INC. USB Sound Device at usb-0000:00:1a.0-1.2, full speed

The last person said that it eventually started to work for him. I am not sure how that happened, but it has not worked for me, and there seems to be a few differences to alsa but I really do not know enough to act upon that.

Added on edit: I can go into alsamixer and switch between devices from and to my USB device. Here the USB device only has two control bars: "PCM" and "Loudness". I can change "PCM", but "Loudness" is locked on 0. I don't know if that's relevant (I am afraid I don't really understand alsa) but a zero hanging over "Loudness" seemed worth mentioning.

Also, referring to a comment to the previous poster, I still get volume through speakers despite having switched to 1 on conf file and despite alsamixer opening onto the USB mixer on default - so the music still plays through the speakers and changing PCM has no effect upon that either way.

Further edit: Referring to edit above, I can stop the speakers by altering: defaults.pcm.device to 1. But this does not make the USB play.

If anyone has any help I would be very grateful.

Thank you very much in advance.

tredegar 11-01-2012 02:33 PM

Hello SF1979,

I don't spend as much time here on LQ as I used to, and I was about to recommend that you start a new thread rather than resurrect this old one (long threads don't tend to get read by people who have not subscribed to them).

I did a quick search (ubuntu c-media electronics inc. audio adapter) and would suggest that you try the suggestions in this link

Follow the recommendations in that post, and you should be good to go.

Please let us (though probably only me, see above) know how you get on.

SF1979 11-01-2012 03:52 PM

Hello tredegar,

Thank you for your help.

I tried the additional suggestion on that forum regarding altering:
Code:

options snd-usb-audio index=-2
in:
Code:

/etc/modprobe.d/alsa-base.conf
I tried a few different values as per suggestions by posters there, but it did not work.
In particular, my alsamixer has a PCM adjuster and a Loudness adjuster, with no bar and values 00.

One thing perhaps, I can only reload/restart by using:
Code:

sudo /sbin/alsa force-reload
or:
Code:

sudo /sbin/alsa reload
rather than:
Code:

/etc/init.d/alsa-utils restart
and so on, as these do not work for me.

Thanks a million!

tredegar 11-02-2012 05:04 PM

Quote:

One thing perhaps, I can only reload/restart by using:
Code:

sudo /sbin/alsa force-reload

or:
Code:

sudo /sbin/alsa reload

rather than:
Code:

/etc/init.d/alsa-utils restart

and so on, as these do not work for me.

alsa
does not seem to feature in recent ubuntu distributions - it's all pulseaudio now, and I do not pretend to understand that, but it seems to work, for me, for now.

Ubuntu seem to be moving to a systemd way of booting, rather than the traditional "system V" /etc/init.d/* scripts way of doing things so /etc/init.d/alsa-utils restart will no longer work.

One of the reasons LQ does not like to resurrect old threads (like this one) is that linux is dynamic, and changes all the time.

This thread is three years old and linux has moved on, fast.

So, please, be bold, and start a new thread here on LQ with your problem. I expect it will be answered by someone more up to date than I am.

Best wishes,
t.

SF1979 11-02-2012 09:16 PM

Hello Tredegar,

I will look into pulseaudio. And thank you for the explanation regarding systemd, and I kind of see your point on linux' development already from a very brief read up.

I had started a new thread, shortly before you got back to me, but I hedged it very much in terms of this one (which as you say was not wise).

I will give pulseaudio a quick go, and then post up an account of my steps, etc., when I almost inevitably get stuck!

Thanks again, and much appreciated,

SF


All times are GMT -5. The time now is 08:16 PM.