Configure ALSA to handle a USB sound card

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

 



Hello,

I intend to use the snd-usb-audio module with a Yamaha MOX6/8 built-in 
USB audio card. It's USB 2.0, 24 bit/44.1 Khz, multi-channel (4 audio 
channels) and multi-port (5 midi ports).

I would be glad if only get it works as 2 audio channels (full-duplex) 
and 1 midi port.
Is it possible?

The interface with 2 audio channels configuration:
$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 064e:a219 Suyin Corp. 1.3M WebCam (notebook 
emachines E730, Acer sub-brand)
Bus 002 Device 004: ID 0499:1503 Yamaha Corp.

$ lsusb -t
2-1.2:1.0: No such file or directory
2-1.2:1.1: No such file or directory
2-1.2:1.2: No such file or directory
2-1.2:1.3: No such file or directory
2-1.2:1.4: No such file or directory
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/2p, 480M
     |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/8p, 480M
         |__ Port 2: Dev 4, If 0, Class=vend., Driver=, 12M
         |__ Port 2: Dev 4, If 1, Class=vend., Driver=, 12M
         |__ Port 2: Dev 4, If 2, Class=vend., Driver=, 12M
         |__ Port 2: Dev 4, If 3, Class=vend., Driver=, 12M
         |__ Port 2: Dev 4, If 4, Class=HID, Driver=, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/2p, 480M
     |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M
         |__ Port 1: Dev 3, If 0, Class='bInterfaceClass 0x0e not yet 
handled', Driver=uvcvideo, 480M
         |__ Port 1: Dev 3, If 1, Class='bInterfaceClass 0x0e not yet 
handled', Driver=uvcvideo, 480M

$ lsusb -v
[...]
Bus 002 Device 004: ID 0499:1503 Yamaha Corp.
Device Descriptor:
   bLength                18
   bDescriptorType         1
   bcdUSB               2.00
   bDeviceClass          239 Miscellaneous Device
   bDeviceSubClass         2 ?
   bDeviceProtocol         1 Interface Association
   bMaxPacketSize0         8
   idVendor           0x0499 Yamaha Corp.
   idProduct          0x1503
   bcdDevice            1.00
   iManufacturer           1
   iProduct                2
   iSerial                 0
   bNumConfigurations      1
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
     wTotalLength          308
     bNumInterfaces          5
     bConfigurationValue     1
     iConfiguration          0
     bmAttributes         0xc0
       Self Powered
     MaxPower                2mA
     Interface Association:
       bLength                 8
       bDescriptorType        11
       bFirstInterface         0
       bInterfaceCount         4
       bFunctionClass        255 Vendor Specific Class
       bFunctionSubClass       0
       bFunctionProtocol       0
       iFunction               0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        0
       bAlternateSetting       0
       bNumEndpoints           0
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass      1
       bInterfaceProtocol      0
       iInterface              0
       ** UNRECOGNIZED:  0a 24 01 00 01 34 00 02 01 02
       ** UNRECOGNIZED:  0c 24 02 01 01 01 00 02 03 00 00 00
       ** UNRECOGNIZED:  09 24 03 02 01 03 00 01 00
       ** UNRECOGNIZED:  0c 24 02 03 03 06 00 02 03 00 00 00
       ** UNRECOGNIZED:  09 24 03 04 01 01 00 03 00
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        1
       bAlternateSetting       0
       bNumEndpoints           0
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass      2
       bInterfaceProtocol      0
       iInterface              0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        1
       bAlternateSetting       1
       bNumEndpoints           1
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass      2
       bInterfaceProtocol      0
       iInterface              0
       ** UNRECOGNIZED:  07 24 01 01 01 01 00
       ** UNRECOGNIZED:  0b 24 02 01 02 03 18 01 44 ac 00
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x01  EP 1 OUT
         bmAttributes            5
           Transfer Type            Isochronous
           Synch Type               Asynchronous
           Usage Type               Data
         wMaxPacketSize     0x0120  1x 288 bytes
         bInterval               1
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        2
       bAlternateSetting       0
       bNumEndpoints           0
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass      2
       bInterfaceProtocol      0
       iInterface              0
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        2
       bAlternateSetting       1
       bNumEndpoints           1
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass      2
       bInterfaceProtocol      0
       iInterface              0
       ** UNRECOGNIZED:  07 24 01 04 01 01 00
       ** UNRECOGNIZED:  0b 24 02 01 02 03 18 01 44 ac 00
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x82  EP 2 IN
         bmAttributes            5
           Transfer Type            Isochronous
           Synch Type               Asynchronous
           Usage Type               Data
         wMaxPacketSize     0x0120  1x 288 bytes
         bInterval               1
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        3
       bAlternateSetting       0
       bNumEndpoints           2
       bInterfaceClass       255 Vendor Specific Class
       bInterfaceSubClass      3
       bInterfaceProtocol      0
       iInterface              0
       ** UNRECOGNIZED:  07 24 01 00 01 60 00
       ** UNRECOGNIZED:  06 24 02 01 01 00
       ** UNRECOGNIZED:  06 24 02 01 02 00
       ** UNRECOGNIZED:  06 24 02 01 03 00
       ** UNRECOGNIZED:  06 24 02 01 04 00
       ** UNRECOGNIZED:  06 24 02 01 05 00
       ** UNRECOGNIZED:  09 24 03 01 06 01 01 01 00
       ** UNRECOGNIZED:  09 24 03 01 07 01 01 01 00
       ** UNRECOGNIZED:  09 24 03 01 08 01 01 01 00
       ** UNRECOGNIZED:  09 24 03 01 09 01 01 01 00
       ** UNRECOGNIZED:  09 24 03 01 0a 01 01 01 00
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x03  EP 3 OUT
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0020  1x 32 bytes
         bInterval               1
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x84  EP 4 IN
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x84  EP 4 IN
         bmAttributes            2
           Transfer Type            Bulk
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0020  1x 32 bytes
         bInterval               1
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        4
       bAlternateSetting       0
       bNumEndpoints           1
       bInterfaceClass         3 Human Interface Device
       bInterfaceSubClass      0 No Subclass
       bInterfaceProtocol      1 Keyboard
       iInterface              0
         HID Device Descriptor:
           bLength                 9
           bDescriptorType        33
           bcdHID               1.00
           bCountryCode            0 Not supported
           bNumDescriptors         1
           bDescriptorType        34 Report
           wDescriptorLength      45
          Report Descriptors:
            ** UNAVAILABLE **
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x85  EP 5 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               None
           Usage Type               Data
         wMaxPacketSize     0x0008  1x 8 bytes
         bInterval              16

The modules loaded when I plug the USB cord:
$ dmesg
...
[ 2455.275205] usb 2-1.2: new full speed USB device number 4 using ehci_hcd
[ 2455.387555] input: Yamaha Corporation Yamaha MOX6/MOX8 as 
/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.4/input/input13
[ 2455.387726] generic-usb 0003:0499:1503.0002: input,hidraw0: USB HID 
v1.00 Keyboard [Yamaha Corporation Yamaha MOX6/MOX8] on 
usb-0000:00:1d.0-1.2/input4

$ diff before_plug.txt after_plug.txt
1a2,3
 > usbhid                 47198  0
 > hid                    95463  1 usbhid

I reported a bug cause I think this isn't the expected module for a USB 
audio card:
https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/905552

If I remove the module:
$ sudo modprobe -r usbhid

and I load the module snd-usb-audio:
$ sudo modprobe snd-usb-audio index=1 vid=0x0499 pid=0x1503

it doesn't get error:
$ dmesg
...
[ 2002.376457] usbcore: deregistering interface driver usbhid
[ 2399.992913] usbcore: registered new interface driver snd-usb-audio

and new modules are loaded:
$ diff lsmod_before_load_snd-usb-audio.txt 
lsmod_after_load_snd-usb-audio.txt
1a2,3
 > snd_usb_audio         118064  0
 > snd_usbmidi_lib        25371  1 snd_usb_audio
12,13c14,15
< snd_hwdep              13668  1 snd_hda_codec
< snd_pcm                96714  3 
snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
---
 > snd_hwdep              13668  2 snd_usb_audio,snd_hda_codec
 > snd_pcm                96714  4 
snd_usb_audio,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
19c21
< snd_rawmidi            30547  1 snd_seq_midi
---
 > snd_rawmidi            30547  2 snd_usbmidi_lib,snd_seq_midi
32c34
< snd                    68266  14 
snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
---
 > snd                    68266  16 
snd_usb_audio,snd_usbmidi_lib,snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device

but udev doesn't create /dev/snd.

At this point I don't know what can I do. So any help would be appreciated.

Thanks in advance.

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user


[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux