SH-201

OSS specific Linux discussion (x86/amd64)

Moderators: cesium, dev, kodachi, hannu

SH-201

Postby hiro » Tue Sep 14, 2010 6:52 pm

I'm trying to get the Roland SH-201 working on OSS.
I've added the device id to .device and this to the oss_usb.c known_devices array :
{0x582, 0xad, "Roland SH-201"}

$ sudo ossdetect -v
Detected Intel High Definition Audio (ICH7)
Detected Roland SH-201
USB support available in the system, adding USB driver
Detected Generic USB audio/MIDI device (BETA)


But no device files are created when I modprobe oss_usb.
What tricks are required to make it work on OSS?

In the alsa kernel there is this quirks entry:
Code: Select all
/* Roland SH-201 */
+       USB_DEVICE(0x0582, 0x00ad),
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               .vendor_name = "Roland",
+               .product_name = "SH-201",
+               .ifnum = QUIRK_ANY_INTERFACE,
+               .type = QUIRK_COMPOSITE,
+               .data = (const struct snd_usb_audio_quirk[]) {
+                       {
+                               .ifnum = 0,
+                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
+                       },
+                       {
+                               .ifnum = 1,
+                               .type = QUIRK_AUDIO_STANDARD_INTERFACE
+                       },
+                       {
+                               .ifnum = 2,
+                               .type = QUIRK_MIDI_FIXED_ENDPOINT,
+                               .data = & (const struct snd_usb_midi_endpoint_info) {
+                                       .out_cables = 0x0001,
+                                       .in_cables  = 0x0001
+                               }
+                       },
+                       {
+                               .ifnum = -1
+                       }
+               }
+       }
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: SH-201

Postby cesium » Wed Sep 15, 2010 1:13 am

If you're modprob'ing it manually, you need to run "sudo ossdetect -d" afterwards ("ossdetect -d -v" will be verbose) to create the device files. "sudo ossdevlinks -v" will create the /dev/dspN links.
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: SH-201

Postby hiro » Wed Sep 15, 2010 3:25 am

I alraedy have. Got no errors, but no device either...
I also tried setting usb_trace=3; modprobe -v oss_usb; ossdetect -dv for debugging, but to no avail.
What am I doing wrong, how can I debug this?
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: SH-201

Postby cesium » Wed Sep 15, 2010 11:22 pm

If you've set usb_trace, there should be some output in 'dmesg' after loading oss_usb... Can you paste it?
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: SH-201

Postby hiro » Thu Sep 16, 2010 11:42 am

It doesn't seem to work, the only thing showing up is this:

usbcore: registered new interface driver oss_usb
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: SH-201

Postby hiro » Thu Sep 16, 2010 11:46 am

Is there something comparableto alsa's audioquirks on oss? What about altsettings, what's that for?
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: SH-201

Postby cesium » Thu Sep 16, 2010 4:46 pm

Does it show in ossinfo? If not, then you may have made a mistake when adding the id... Or maybe the ALSA usb module is still loaded and is hogging the device?

Yes, oss_usb does have an audioquirk section in the source, but AFAIK, the ALSA quirks are only related to USB MIDI (which oss_usb doesn't do anyway).
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: SH-201

Postby hiro » Fri Sep 17, 2010 12:51 pm

No, it doesn't show in ossinfo.
I think it doesn't find the audio capabilities. I'm quite sure the alsa quirk included something specifying the audio input and output jacks, so how can I use audioquirks (I haven't found this in the source)?

I think I have to tell it, that there is a generic audio output on the first subdevice, and an input on the second...
Can I do this?
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: SH-201

Postby cladisch » Wed Sep 22, 2010 12:35 pm

The ALSA quirks are used to point the driver at interfaces that do not have correct bInterface(Sub)Class values in their descriptors.

The oss_usb driver always checks the bInterface(Sub)Class values, even for devices added to oss_usb.c.
The known_devices array can change the behaviour only for devices that are already recognized as audio devices.
cladisch
Member
 
Posts: 30
Joined: Mon Apr 07, 2008 8:14 am
Location: Earth

Re: SH-201

Postby hiro » Wed Sep 22, 2010 12:58 pm

So there is no mechanism in oss to make it work with such devices?
At which point could I start hacking? Now without being able to debug properly don't know how far the device is initialized.

Thanks
hiro
Member
 
Posts: 28
Joined: Tue Sep 14, 2010 6:38 pm

Re: SH-201

Postby cesium » Thu Sep 23, 2010 12:34 am

oss_usb is at kernel/drv/oss_usb directory, and it uses usb wrappers (setup/Linux/oss/build/usb_wrapper.inc IIRC). That said, I'd have thought that setting usb_trace (and possible detect_trace in ossconf?) would have shown something in dmesg... You may wish to add "cmn_err (CE_CONT, "blah\n")" etc. lines to get to check where it goes...
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am


Return to Linux

Who is online

Users browsing this forum: No registered users and 1 guest

cron