diff mbox

how to ask you to write a new ALSA driver

Message ID 20150522111040.e517d4743fb51514762f1e61@ao2.it (mailing list archive)
State Rejected
Headers show

Commit Message

Antonio Ospite May 22, 2015, 9:10 a.m. UTC
On Thu, 21 May 2015 12:28:00 +0200
jean-noël chardron <rondrach@gmail.com> wrote:

> hello,
> 
> Last week I got a Komplet Audio 6 from Native intruments.
> The driver exist in ALSA driver for this king of interface audio
> (snd-usb-audio) (thanks for the team who write this) but for the model
> where Id Vendor is 0x17cc and Id product is 0x1000.
> 
> The KA6 that I got has not the same ID product (0x1001) therefore I don't
> have any device capture even with the driver snd-usb-audio.
> 
> The challenge is to write the modification for this new model.
> Who could do that ?

You can try yourself.

If you know or suspect that your device is similar to the supported ones
look where the 0x17cc vendor id is used and try to follow the existing
code, and try to come up with the _minimum_ amount of changes required to
make the device work.

For instance, after a "git grep 0x17cc -- sound/" I came up with this
diff:



However without knowing the device I am not sure if the second change is
strictly necessary, or if the two are even enough.

So please try to apply one of them at the time, recompile, test, and let
us know.

> If necessary I could send log, compile kernel source and so on.
> thanks,

Keep logs before and after changes you make so that you can compare the
result of the changes.

Ciao,
   Antonio

Comments

jean-noël chardron May 22, 2015, 10:04 a.m. UTC | #1
Thank you for your answer,


2015-05-22 11:10 GMT+02:00 Antonio Ospite <ao2@ao2.it>:

> On Thu, 21 May 2015 12:28:00 +0200
> jean-noël chardron <rondrach@gmail.com> wrote:
>
> > hello,
> >
> > Last week I got a Komplet Audio 6 from Native intruments.
> > The driver exist in ALSA driver for this king of interface audio
> > (snd-usb-audio) (thanks for the team who write this) but for the model
> > where Id Vendor is 0x17cc and Id product is 0x1000.
> >
> > The KA6 that I got has not the same ID product (0x1001) therefore I don't
> > have any device capture even with the driver snd-usb-audio.
> >
> > The challenge is to write the modification for this new model.
> > Who could do that ?
>
> You can try yourself.
>
hum, it's indeed beyond my knowledge


>
> If you know or suspect that your device is similar to the supported ones
> look where the 0x17cc vendor id is used and try to follow the existing
> code, and try to come up with the _minimum_ amount of changes required to
> make the device work.
>
> For instance, after a "git grep 0x17cc -- sound/" I came up with this
> diff:
>
> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
> index 2f6d3e9..d254b14 100644
> --- a/sound/usb/quirks-table.h
> +++ b/sound/usb/quirks-table.h
> @@ -2740,6 +2740,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
>         .idProduct = 0x1000,
>  },
>  {
> +       /* Komplete Audio 6 */
> +       .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
> +       .idVendor = 0x17cc,
> +       .idProduct = 0x1001,
> +},
> +{
>         /* Traktor Audio 6 */
>         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
>         .idVendor = 0x17cc,
> diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
> index 7c5a701..2f9ee824 100644
> --- a/sound/usb/quirks.c
> +++ b/sound/usb/quirks.c
> @@ -1007,6 +1007,7 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
>                 return snd_usb_accessmusic_boot_quirk(dev);
>
>         case USB_ID(0x17cc, 0x1000): /* Komplete Audio 6 */
> +       case USB_ID(0x17cc, 0x1001): /* Komplete Audio 6 */
>         case USB_ID(0x17cc, 0x1010): /* Traktor Audio 6 */
>         case USB_ID(0x17cc, 0x1020): /* Traktor Audio 10 */
>                 return snd_usb_nativeinstruments_boot_quirk(dev);
>




> However without knowing the device I am not sure if the second change is
> strictly necessary, or if the two are even enough.
>
> So please try to apply one of them at the time, recompile, test, and let
> us know.
>
> I have tried that you write in first  with no luck.
I edit the files :

edit :quirks.c and | or quirks-table.h -> result
edit :   yes        and      yes       -> err = -11 in snd-usb-audio
edit :   no                  yes       -> driver not loading
edit :   yes                 no        -> err =-22
edit :   no                  no        -> driver load but no device capture



> > If necessary I could send log, compile kernel source and so on.
> > thanks,
>
> Keep logs before and after changes you make so that you can compare the
> result of the changes.
>
> Ciao,
>    Antonio
>
> --
> Antonio Ospite
> http://ao2.it
>
> A: Because it messes up the order in which people normally read text.
>    See http://en.wikipedia.org/wiki/Posting_style
> Q: Why is top-posting such a bad thing?
>
jean-noël chardron May 22, 2015, 10:26 a.m. UTC | #2
2015-05-22 12:04 GMT+02:00 jean-noël chardron <rondrach@gmail.com>:

> Thank you for your answer,
>
>
> 2015-05-22 11:10 GMT+02:00 Antonio Ospite <ao2@ao2.it>:
>
>> On Thu, 21 May 2015 12:28:00 +0200
>> jean-noël chardron <rondrach@gmail.com> wrote:
>>
>> > hello,
>> >
>> > Last week I got a Komplet Audio 6 from Native intruments.
>> > The driver exist in ALSA driver for this king of interface audio
>> > (snd-usb-audio) (thanks for the team who write this) but for the model
>> > where Id Vendor is 0x17cc and Id product is 0x1000.
>> >
>> > The KA6 that I got has not the same ID product (0x1001) therefore I
>> don't
>> > have any device capture even with the driver snd-usb-audio.
>> >
>> > The challenge is to write the modification for this new model.
>> > Who could do that ?
>>
>> You can try yourself.
>>
> hum, it's indeed beyond my knowledge
>
>
>>
>> If you know or suspect that your device is similar to the supported ones
>> look where the 0x17cc vendor id is used and try to follow the existing
>> code, and try to come up with the _minimum_ amount of changes required to
>> make the device work.
>>
>> For instance, after a "git grep 0x17cc -- sound/" I came up with this
>> diff:
>>
>> diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
>> index 2f6d3e9..d254b14 100644
>> --- a/sound/usb/quirks-table.h
>> +++ b/sound/usb/quirks-table.h
>> @@ -2740,6 +2740,12 @@ YAMAHA_DEVICE(0x7010, "UB99"),
>>         .idProduct = 0x1000,
>>  },
>>  {
>> +       /* Komplete Audio 6 */
>> +       .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
>> +       .idVendor = 0x17cc,
>> +       .idProduct = 0x1001,
>> +},
>> +{
>>         /* Traktor Audio 6 */
>>         .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
>>         .idVendor = 0x17cc,
>> diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
>> index 7c5a701..2f9ee824 100644
>> --- a/sound/usb/quirks.c
>> +++ b/sound/usb/quirks.c
>> @@ -1007,6 +1007,7 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev,
>>                 return snd_usb_accessmusic_boot_quirk(dev);
>>
>>         case USB_ID(0x17cc, 0x1000): /* Komplete Audio 6 */
>> +       case USB_ID(0x17cc, 0x1001): /* Komplete Audio 6 */
>>         case USB_ID(0x17cc, 0x1010): /* Traktor Audio 6 */
>>         case USB_ID(0x17cc, 0x1020): /* Traktor Audio 10 */
>>                 return snd_usb_nativeinstruments_boot_quirk(dev);
>>
>
>
>
>
>> However without knowing the device I am not sure if the second change is
>> strictly necessary, or if the two are even enough.
>>
>> So please try to apply one of them at the time, recompile, test, and let
>> us know.
>>
>> I have tried that you write in first  with no luck.
> I edit the files :
>
> edit :quirks.c and | or quirks-table.h -> result
> edit :   yes        and      yes       -> err = -11 in snd-usb-audio
> edit :   no                  yes       -> driver not loading
> edit :   yes                 no        -> err =-22
> edit :   no                  no        -> driver load but no device capture
>
>
>
>> > If necessary I could send log, compile kernel source and so on.
>> > thanks,
>>
>> Keep logs before and after changes you make so that you can compare the
>> result of the changes.
>>
>> Ciao,
>>    Antonio
>>
>> --
>> Antonio Ospite
>> http://ao2.it
>>
>> A: Because it messes up the order in which people normally read text.
>>    See http://en.wikipedia.org/wiki/Posting_style
>> Q: Why is top-posting such a bad thing?
>>
>
>
I forget : too, I have tried to edit the file  in sound/usb/caiaq/device.c
to active the snd-usb-caiaq driver and add the KA6  device with no more
luck.
diff device.h.old device.h
20a21
> #define USB_PID_KA6 0x1001

diff device.c.old device.c~
54a55
>  "{Native Instruments,Komplete Audio 6 v2},"
148a150,154
> },
> {
> .match_flags =  USB_DEVICE_ID_MATCH_DEVICE,
> .idVendor =     USB_VID_NATIVEINSTRUMENTS,
> .idProduct =    USB_PID_KA6


many errors in logs with error -5 and complaint about "can't set alt
interface"
diff mbox

Patch

diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 2f6d3e9..d254b14 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -2740,6 +2740,12 @@  YAMAHA_DEVICE(0x7010, "UB99"),
        .idProduct = 0x1000,
 },
 {
+       /* Komplete Audio 6 */
+       .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
+       .idVendor = 0x17cc,
+       .idProduct = 0x1001,
+},
+{
        /* Traktor Audio 6 */
        .match_flags = USB_DEVICE_ID_MATCH_DEVICE,
        .idVendor = 0x17cc,
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 7c5a701..2f9ee824 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1007,6 +1007,7 @@  int snd_usb_apply_boot_quirk(struct usb_device *dev,
                return snd_usb_accessmusic_boot_quirk(dev);

        case USB_ID(0x17cc, 0x1000): /* Komplete Audio 6 */
+       case USB_ID(0x17cc, 0x1001): /* Komplete Audio 6 */
        case USB_ID(0x17cc, 0x1010): /* Traktor Audio 6 */
        case USB_ID(0x17cc, 0x1020): /* Traktor Audio 10 */
                return snd_usb_nativeinstruments_boot_quirk(dev);