USB Mic not displaying under sound input list

Bug #887922 reported by Walter Lapchynski on 2011-11-09
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mixxx
High
Bill Good

Bug Description

== APPLICATION VERSION ==
Mixxx 1.10.0 beta 1

== OPERATING SYSTEM ==
Lubuntu 11.10

== CPU ==
Intel Core Duo T2500 2.0GHz

== VIDEO ==
$ lspci | grep -i vga
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility X1400

== AUDIO ==
The culprit of this crime is a Samson Go Mic USB microphone:
http://www.samsontech.com/samson/products/microphones/usb-microphones/gomic/
The microphone has an headphone output, so the fact that it's listed in output is no surprise. Obviously, however, it should have an input. Even lsusb agrees its primary function is that of a microphone :D
$ lsusb | grep -i samson
Bus 002 Device 003: ID 17a0:0302 Samson Technologies Corp. GoMic compact condenser microphone

ALSA sees it as a playback device:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: system [iMic USB audio system], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: GoMic [Samson GoMic], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

ALSA sees it as a capture device, too:
$ arecord --list-devices
**** List of CAPTURE Hardware Devices ****
card 0: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: system [iMic USB audio system], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: GoMic [Samson GoMic], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

By the way, I use the iMic for headphones. Yes, it also has an 1/8" microphone jack. Haven't had good luck (audio quality-wise, for a good price) with such devices, thus the USB solution. NEVERMIND THE iMIC in other words. Sorry for the confusion ;)

== REPRODUCTION ==
Simple stuff here:
 1. Plug in mic.
 2. Load Mixxx.
 3. Open Options > Sound Hardware > Input > Microphone
 4. Go Mic does not appear.
 5. Open Options > Sound Hardware > Output and pick any of the options (e.g. Master)
 6. Go Mic does appear.
 7. Select Go Mic for output.
 8. Open Options > Sound Hardware > Input > Microphone
 9. Go Mic still does not appear.
10. Requery devices and nothing changes.
11. Try different sample rates, apply, and requery devices and nothing changes.
12. To be sure it is not a bug in PortAudio, use the mic in Audacity with no problems, so the problem does not lie there.

== IN CONCLUSION ==
Thank you, Mixxx Development Team, to finally implementing the talkover feature. I have been waiting desperately for it. Can't wait to put it to good use with my microphone!

Bill Good (bkgood) on 2011-11-09
Changed in mixxx:
assignee: nobody → Bill Good (bkgood)
importance: Undecided → High
RJ Ryan (rryan) on 2011-11-10
Changed in mixxx:
milestone: none → 1.10.0
Walter Lapchynski (wxl) wrote :

Same situation with iMac running OS X 10.6.8 on a 3.06 GHz Intel Core i3 (built in audio) and an ATI Radeon HD 4670. Obviously using Core Audio.

RJ Ryan (rryan) wrote :

Bill -- any idea what the problem could be here?

RJ Ryan (rryan) wrote :

Hey wxl23,

I noticed you commented in Bug #887917 about the iMic working with input and output enabled. Does that mean this problem is fixed?

RJ

RJ Ryan (rryan) wrote :

Oops -- nevermind. I just saw this report is not about the iMic.

RJ Ryan (rryan) wrote :

Could it be that the microphone is being presented as a stereo ALSA device? Bill, don't we explicitly filter for mono devices for the mic input?

Walter Lapchynski (wxl) wrote :

Well #1 the iMac ain't using ALSA ;)
#2 it seems to be mono if i understand alsamixer correctly (see attached) as for it to be stereo that "47" would be "47<>47" or something similar.

description: updated
RJ Ryan (rryan) wrote :

Hey Walter,

Does your system have pulseaudio installed? How are you running Mixxx, from the desktop icon or from the terminal?

Could you try running it like this:

$ pasuspender mixxx

I'm wondering if Pulseaudio is somehow locking your GoMic capture device. This doesn't make sense since you said it works in Audacity, but just to rule it out, could you please give it a try? :)

Bill Good (bkgood) wrote :

Would you mind compiling, running and pasting the output of http://portaudio.com/trac/browser/portaudio/trunk/examples/pa_devs.c (direct link to c file: http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c)?

It should compile with gcc -lportaudio -o pa_devs pa_devs.c; you may need to install portaudio19-dev first.

It'll list all the devices portaudio is seeing and give various info about them, hopefully it'll give a hint as to why Mixxx isn't displaying your microphone. I know you mentioned Audacity doesn't have any issues with it, but I think Audacity bundles its own copy of portaudio in its packages so it's possible there's some difference (also, knowing the info we're getting from PortAudio will likely be useful to know).

I've tried running graphically and in the terminal to no avail.
pasuspender offered no help.

On 12/01/2011 04:07 PM, RJ Ryan wrote:
> Hey Walter,
>
> Does your system have pulseaudio installed? How are you running Mixxx,
> from the desktop icon or from the terminal?
>
> Could you try running it like this:
>
> $ pasuspender mixxx
>
> I'm wondering if Pulseaudio is somehow locking your GoMic capture
> device. This doesn't make sense since you said it works in Audacity, but
> just to rule it out, could you please give it a try? :)
>

Walter Lapchynski (wxl) wrote :
Download full text (4.2 KiB)

sadly, compilation failed:
$ wget
http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
--2011-12-01 20:41:08--
http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
Resolving portaudio.com... 209.235.192.160
Connecting to portaudio.com|209.235.192.160|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9015 (8.8K) [text/x-csrc]
Saving to: `pa_devs.c'

100%[=======================================>] 9,015 --.-K/s in
0.1s

2011-12-01 20:41:11 (89.0 KB/s) - `pa_devs.c' saved [9015/9015]

$ sudo apt-get install portaudio19-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libasound2-dev libportaudiocpp0
Suggested packages:
  libasound2-doc
The following NEW packages will be installed:
  libasound2-dev libportaudiocpp0 portaudio19-dev
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 731 kB of archives.
After this operation, 2,761 kB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main libasound2-dev
i386 1.0.24.1-0ubuntu10 [586 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ oneiric/main libportaudiocpp0
i386 19+svn20110326-2 [19.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ oneiric/main portaudio19-dev
i386 19+svn20110326-2 [125 kB]
Fetched 731 kB in 2s (248 kB/s)
Selecting previously deselected package libasound2-dev.
(Reading database ... 199537 files and directories currently installed.)
Unpacking libasound2-dev (from
.../libasound2-dev_1.0.24.1-0ubuntu10_i386.deb) ...
Selecting previously deselected package libportaudiocpp0.
Unpacking libportaudiocpp0 (from
.../libportaudiocpp0_19+svn20110326-2_i386.deb) ...
Selecting previously deselected package portaudio19-dev.
Unpacking portaudio19-dev (from
.../portaudio19-dev_19+svn20110326-2_i386.deb) ...
Setting up libasound2-dev (1.0.24.1-0ubuntu10) ...
Setting up libportaudiocpp0 (19+svn20110326-2) ...
Setting up portaudio19-dev (19+svn20110326-2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
$ gcc -lportaudio -o pa_devs pa_devs.c
/tmp/cc4phk2B.o: In function `PrintSupportedStandardSampleRates':
pa_devs.c:(.text+0x35): undefined reference to `Pa_IsFormatSupported'
/tmp/cc4phk2B.o: In function `main':
pa_devs.c:(.text+0x103): undefined reference to `Pa_Initialize'
pa_devs.c:(.text+0x108): undefined reference to `Pa_GetVersionText'
pa_devs.c:(.text+0x10f): undefined reference to `Pa_GetVersion'
pa_devs.c:(.text+0x129): undefined reference to `Pa_GetDeviceCount'
pa_devs.c:(.text+0x15b): undefined reference to `Pa_Terminate'
pa_devs.c:(.text+0x1ad): undefined reference to `Pa_GetErrorText'
pa_devs.c:(.text+0x1ff): undefined reference to `Pa_GetDeviceInfo'
pa_devs.c:(.text+0x225): undefined reference to `Pa_GetDefaultInputDevice'
pa_devs.c:(.text+0x251): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x269): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x292): undefined reference to `Pa_GetDefaultOutputDevice'
pa_devs.c:(.text+0x2d9): undefined reference to `Pa_...

Read more...

RJ Ryan (rryan) wrote :
Download full text (4.9 KiB)

Hey Walter,

Did you install portaudio19-dev? If you have, then could you try opening
pa_devs.c and changing:

#include "portaudio.h"

to

#include <portaudio.h>

And give it another try?

On Thu, Dec 1, 2011 at 11:45 PM, Walter Lapchynski <
<email address hidden>> wrote:

> sadly, compilation failed:
> $ wget
> http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
> --2011-12-01 20:41:08--
> http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
> Resolving portaudio.com... 209.235.192.160
> Connecting to portaudio.com|209.235.192.160|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 9015 (8.8K) [text/x-csrc]
> Saving to: `pa_devs.c'
>
> 100%[=======================================>] 9,015 --.-K/s in
> 0.1s
>
> 2011-12-01 20:41:11 (89.0 KB/s) - `pa_devs.c' saved [9015/9015]
>
> $ sudo apt-get install portaudio19-dev
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following extra packages will be installed:
> libasound2-dev libportaudiocpp0
> Suggested packages:
> libasound2-doc
> The following NEW packages will be installed:
> libasound2-dev libportaudiocpp0 portaudio19-dev
> 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
> Need to get 731 kB of archives.
> After this operation, 2,761 kB of additional disk space will be used.
> Do you want to continue [Y/n]?
> Get:1 http://us.archive.ubuntu.com/ubuntu/ oneiric/main libasound2-dev
> i386 1.0.24.1-0ubuntu10 [586 kB]
> Get:2 http://us.archive.ubuntu.com/ubuntu/ oneiric/main libportaudiocpp0
> i386 19+svn20110326-2 [19.6 kB]
> Get:3 http://us.archive.ubuntu.com/ubuntu/ oneiric/main portaudio19-dev
> i386 19+svn20110326-2 [125 kB]
> Fetched 731 kB in 2s (248 kB/s)
> Selecting previously deselected package libasound2-dev.
> (Reading database ... 199537 files and directories currently installed.)
> Unpacking libasound2-dev (from
> .../libasound2-dev_1.0.24.1-0ubuntu10_i386.deb) ...
> Selecting previously deselected package libportaudiocpp0.
> Unpacking libportaudiocpp0 (from
> .../libportaudiocpp0_19+svn20110326-2_i386.deb) ...
> Selecting previously deselected package portaudio19-dev.
> Unpacking portaudio19-dev (from
> .../portaudio19-dev_19+svn20110326-2_i386.deb) ...
> Setting up libasound2-dev (1.0.24.1-0ubuntu10) ...
> Setting up libportaudiocpp0 (19+svn20110326-2) ...
> Setting up portaudio19-dev (19+svn20110326-2) ...
> Processing triggers for libc-bin ...
> ldconfig deferred processing now taking place
> $ gcc -lportaudio -o pa_devs pa_devs.c
> /tmp/cc4phk2B.o: In function `PrintSupportedStandardSampleRates':
> pa_devs.c:(.text+0x35): undefined reference to `Pa_IsFormatSupported'
> /tmp/cc4phk2B.o: In function `main':
> pa_devs.c:(.text+0x103): undefined reference to `Pa_Initialize'
> pa_devs.c:(.text+0x108): undefined reference to `Pa_GetVersionText'
> pa_devs.c:(.text+0x10f): undefined reference to `Pa_GetVersion'
> pa_devs.c:(.text+0x129): undefined reference to `Pa_GetDeviceCount'
> pa_devs.c:(.text+0x15b): undefined reference to `Pa_Terminate'
> pa_devs.c:(.text+0x1ad): undefined reference to `Pa_GetErrorText'
> pa_devs.c:(.text+0x1ff): und...

Read more...

Walter Lapchynski (wxl) wrote :
Download full text (7.0 KiB)

with portaudio19-dev 19+svn20110326-2:

wxl@foo:~/bin$ wget
http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
--2011-12-10 22:10:04--
http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
Resolving portaudio.com... 209.235.192.160
Connecting to portaudio.com|209.235.192.160|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9015 (8.8K) [text/x-csrc]
Saving to: `pa_devs.c'

100%[=======================================>] 9,015 --.-K/s in
0.1s

2011-12-10 22:10:07 (85.2 KB/s) - `pa_devs.c' saved [9015/9015]

wxl@foo:~/bin$ sed -i 's/"portaudio\.h"/<portaudio\.h>/' pa_devs.c
wxl@foo:~/bin$ gcc -lportaudio -o pa_devs pa_devs.c
/tmp/ccIyl92b.o: In function `PrintSupportedStandardSampleRates':
pa_devs.c:(.text+0x35): undefined reference to `Pa_IsFormatSupported'
/tmp/ccIyl92b.o: In function `main':
pa_devs.c:(.text+0x103): undefined reference to `Pa_Initialize'
pa_devs.c:(.text+0x108): undefined reference to `Pa_GetVersionText'
pa_devs.c:(.text+0x10f): undefined reference to `Pa_GetVersion'
pa_devs.c:(.text+0x129): undefined reference to `Pa_GetDeviceCount'
pa_devs.c:(.text+0x15b): undefined reference to `Pa_Terminate'
pa_devs.c:(.text+0x1ad): undefined reference to `Pa_GetErrorText'
pa_devs.c:(.text+0x1ff): undefined reference to `Pa_GetDeviceInfo'
pa_devs.c:(.text+0x225): undefined reference to `Pa_GetDefaultInputDevice'
pa_devs.c:(.text+0x251): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x269): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x292): undefined reference to `Pa_GetDefaultOutputDevice'
pa_devs.c:(.text+0x2d9): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x2f1): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x36a): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x533): undefined reference to `Pa_Terminate'
collect2: ld returned 1 exit status

On 12/10/2011 05:53 PM, RJ Ryan wrote:
> Hey Walter,
>
> Did you install portaudio19-dev? If you have, then could you try opening
> pa_devs.c and changing:
>
> #include "portaudio.h"
>
> to
>
> #include <portaudio.h>
>
> And give it another try?
>
> On Thu, Dec 1, 2011 at 11:45 PM, Walter Lapchynski <
> <email address hidden>> wrote:
>
>> sadly, compilation failed:
>> $ wget
>> http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
>> --2011-12-01 20:41:08--
>> http://portaudio.com/trac/export/1796/portaudio/trunk/examples/pa_devs.c
>> Resolving portaudio.com... 209.235.192.160
>> Connecting to portaudio.com|209.235.192.160|:80... connected.
>> HTTP request sent, awaiting response... 200 OK
>> Length: 9015 (8.8K) [text/x-csrc]
>> Saving to: `pa_devs.c'
>>
>> 100%[=======================================>] 9,015 --.-K/s in
>> 0.1s
>>
>> 2011-12-01 20:41:11 (89.0 KB/s) - `pa_devs.c' saved [9015/9015]
>>
>> $ sudo apt-get install portaudio19-dev
>> Reading package lists... Done
>> Building dependency tree
>> Reading state information... Done
>> The following extra packages will be installed:
>> libasound2-dev libportaudiocpp0
>> Suggested packages:
>> libasound2-doc
>> The following NEW packages will be installed:
>> libas...

Read more...

RJ Ryan (rryan) on 2011-12-25
Changed in mixxx:
milestone: 1.10.0 → 1.10.1
Walter Lapchynski (wxl) wrote :

anything else i can do to help with this?

jus (jus) on 2012-01-24
Changed in mixxx:
status: New → Confirmed
Chris (mtbman333) wrote :

Issue also affects Windows 7. It seems that Mixxx does not yet support USB microphones.

Walter Lapchynski (wxl) wrote :

What mic, Chris?

On 01/25/2012 04:38 AM, Chris wrote:
> Issue also affects Windows 7. It seems that Mixxx does not yet support
> USB microphones.
>

RJ Ryan (rryan) wrote :

The file is moved and is now at https://subversion.assembla.com/svn/portaudio/portaudio/trunk/examples/pa_devs.c

Can you try this:

gcc -I/usr/include/ -pthread -lportaudio -lasound -lm -lpthread -o pa_devs pa_devs.c

also, double checking that
#include "portaudio.h"
is turned into
#include <portaudio.h>

Bill -- I see this line in SoundManager in setupDevices:

if (device->getNumInputChannels() <= 1) //Ignore mono input and no-input devices

This means we're ignoring all mono devices? wxl and Chris -- do you know if your USB mics are mono or stereo?

Walter Lapchynski (wxl) wrote :

not getting very far with pa_devs.c:
----------------------------------------------------------------------------------------------------------------
wxl@foo:~/foo$ wget https://subversion.assembla.com/svn/portaudio/portaudio/trunk/examples/pa_devs.c
--2012-05-10 21:38:04-- https://subversion.assembla.com/svn/portaudio/portaudio/trunk/examples/pa_devs.c
Resolving subversion.assembla.com... 64.250.188.50
Connecting to subversion.assembla.com|64.250.188.50|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9360 (9.1K) [text/plain]
Saving to: `pa_devs.c'

100%[=======================================>] 9,360 --.-K/s in 0.001s

2012-05-10 21:38:05 (7.08 MB/s) - `pa_devs.c' saved [9360/9360]

wxl@foo:~/foo$ sed -i -e's/\"portaudio\.h\"/\<portaudio\.h\>/' pa_devs.c
wxl@foo:~/foo$ gcc -I/usr/include/ -pthread -lportaudio -lasound -lm -lpthread -o pa_devs pa_devs.c
/tmp/cc6CMi6Y.o: In function `PrintSupportedStandardSampleRates':
pa_devs.c:(.text+0x35): undefined reference to `Pa_IsFormatSupported'
/tmp/cc6CMi6Y.o: In function `main':
pa_devs.c:(.text+0x103): undefined reference to `Pa_Initialize'
pa_devs.c:(.text+0x108): undefined reference to `Pa_GetVersionText'
pa_devs.c:(.text+0x10f): undefined reference to `Pa_GetVersion'
pa_devs.c:(.text+0x129): undefined reference to `Pa_GetDeviceCount'
pa_devs.c:(.text+0x15b): undefined reference to `Pa_Terminate'
pa_devs.c:(.text+0x1ad): undefined reference to `Pa_GetErrorText'
pa_devs.c:(.text+0x1ff): undefined reference to `Pa_GetDeviceInfo'
pa_devs.c:(.text+0x225): undefined reference to `Pa_GetDefaultInputDevice'
pa_devs.c:(.text+0x251): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x269): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x292): undefined reference to `Pa_GetDefaultOutputDevice'
pa_devs.c:(.text+0x2d9): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x2f1): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x36a): undefined reference to `Pa_GetHostApiInfo'
pa_devs.c:(.text+0x533): undefined reference to `Pa_Terminate'
collect2: ld returned 1 exit status
wxl@foo:~/foo$
----------------------------------------------------------------------------------------------------------------

and by #7 above it's mono. so perhaps that's the source of the problem. is that filter necessary?

RJ Ryan (rryan) wrote :

wxl23 confirms this is a mono microphone.

When you get the chance to build from source, could you try this change:

open mixxx/src/soundmanager.cpp and on line 186 from:

if (device->getNumInputChannels() <= 1)

to:

if (device->getNumInputChannels() <= 0)

Walter Lapchynski (wxl) wrote :

first things first (this is partially a reminder to myself):
   wiki suggests libusb-dev, but libusb-1.0-0-dev is needed

also when doing a universal install:
   Install file: "Mixxx-Manual.pdf" as
"/usr/share/doc/mixxx/Mixxx-Manual.pdf"
   scons: *** [/usr/share/doc/mixxx/Mixxx-Manual.pdf]
/usr/share/doc/mixxx/Mixxx-Manual.pdf: No such file or directory
   scons: building terminated because of errors.
but it seems build was successful as can run from menu or command line
anywhere and it works fine.

now for the punchline:
it worked. :)

Bill Good (bkgood) wrote :

And fixed:
http://bazaar.launchpad.net/~mixxxdevelopers/mixxx/release-1.10.x/revision/3094
http://bazaar.launchpad.net/~mixxxdevelopers/mixxx/release-1.10.x/revision/3095

Thanks everyone for the help and patience, I stared at my preferences code forever looking for this but never thought to look to see if we were filtering devices in SoundManager.

Changed in mixxx:
status: Confirmed → Fix Committed
RJ Ryan (rryan) on 2012-06-30
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers