Message ID | 545A93E3.7020906@ladisch.de (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Takashi Iwai |
Headers | show |
Clemens, Here's what I get with the new (and old) patch(es): [ 2.869556] usb 3-3.2: new high-speed USB device number 6 using xhci_hcd [ 2.970810] usb 3-3.2: New USB device found, idVendor=0499, idProduct=150e [ 2.970813] usb 3-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 2.970814] usb 3-3.2: Product: Steinberg UR44 [ 2.970815] usb 3-3.2: Manufacturer: Yamaha Corporation [ 2.973563] snd-usb-audio 3-3.2:1.0: checking PCM interface [ 2.973565] snd-usb-audio 3-3.2:1.0: quirk return code: -19 [ 2.973566] snd-usb-audio 3-3.2:1.0: probe failed [ 2.973574] snd-usb-audio: probe of 3-3.2:1.0 failed with error -5 [ 2.974003] snd-usb-audio 3-3.2:1.1: checking PCM interface [ 2.974005] snd-usb-audio 3-3.2:1.1: altsets found [ 2.974007] snd-usb-audio 3-3.2:1.1: endpoint found [ 2.974008] snd-usb-audio 3-3.2:1.1: iso found [ 2.974010] snd-usb-audio 3-3.2:1.1: descriptors found [ 2.976115] snd-usb-audio 3-3.2:1.1: first interface successful [ 2.976117] usb 3-3.2:1.0: checking PCM interface [ 2.976117] usb 3-3.2:1.2: checking PCM interface [ 2.976118] usb 3-3.2:1.2: altsets found [ 2.976119] usb 3-3.2:1.2: endpoint found [ 2.976120] usb 3-3.2:1.2: iso found [ 2.976120] usb 3-3.2:1.2: descriptors found [ 2.976641] usb 3-3.2: current rate 192000 is different from the runtime rate 48000 [ 2.978137] snd-usb-audio 3-3.2:1.2: interface 2 successful [ 2.978140] usb 3-3.2:1.3: checking PCM interface [ 2.978148] snd-usb-audio 3-3.2:1.3: interface 3 successful [ 2.978150] usb 3-3.2:1.4: checking PCM interface [ 2.978155] snd-usb-audio 3-3.2:1.4: interface 4 successful [ 2.978157] snd-usb-audio 3-3.2:1.4: create_autodetect_quirks successful [ 2.978158] snd-usb-audio 3-3.2:1.1: quirk return code: 0 [ 2.978159] snd-usb-audio 3-3.2:1.1: probe step 2 [ 2.978334] snd-usb-audio 3-3.2:1.1: probe failed [ 2.978439] snd-usb-audio: probe of 3-3.2:1.1 failed with error -5 [ 2.981241] systemd-udevd[510]: error opening ATTR{/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3/3-3.2/3-3.2:1.1/sound/ card3/controlC3/../uevent} for writing: No such file or directory [ 2.981342] systemd-udevd[511]: Failed to apply ACL on /dev/snd/pcmC3D0p: No such file or directory [ 2.981361] systemd-udevd[510]: Failed to apply ACL on /dev/snd/controlC3: No such file or directory [ 2.981420] systemd-udevd[547]: Failed to apply ACL on /dev/snd/midiC3D0: No such file or directory [ 2.981560] systemd-udevd[546]: Failed to apply ACL on /dev/snd/pcmC3D0c: No such file or directory thanks for looking into this, Cyrus On 11/05/2014 01:17 PM, Clemens Ladisch wrote: > Cyrus Harmon wrote: >> [ 2.964094] snd-usb-audio 3-3.2:1.0: checking PCM interface >> [ 2.964104] snd-usb-audio: probe of 3-3.2:1.0 failed with error -5 >> [ 2.966339] snd-usb-audio 3-3.2:1.1: checking PCM interface >> [ 2.966341] snd-usb-audio 3-3.2:1.1: altsets found >> [ 2.966342] snd-usb-audio 3-3.2:1.1: endpoint found >> [ 2.966343] snd-usb-audio 3-3.2:1.1: iso found >> [ 2.966344] snd-usb-audio 3-3.2:1.1: descriptors found >> [ 2.968544] usb 3-3.2:1.0: checking PCM interface >> [ 2.968546] usb 3-3.2:1.2: checking PCM interface >> [ 2.968547] usb 3-3.2:1.2: altsets found >> [ 2.968547] usb 3-3.2:1.2: endpoint found >> [ 2.968548] usb 3-3.2:1.2: iso found >> [ 2.968549] usb 3-3.2:1.2: descriptors found >> [ 2.970657] usb 3-3.2:1.3: checking PCM interface >> [ 2.970666] usb 3-3.2:1.4: checking PCM interface >> [ 2.970930] snd-usb-audio: probe of 3-3.2:1.1 failed with error -5 > Strange; in theory, this cannot happen. > > Please add this patch and try again. > > > Regards, > Clemens > > > --- a/sound/usb/card.c > +++ b/sound/usb/card.c > @@ -536,7 +536,9 @@ snd_usb_audio_probe(struct usb_device *dev, > err = 1; /* continue */ > if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) { > /* need some special handlings */ > - if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0) > + err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk); > + dev_info(&intf->dev, "quirk return code: %d\n", err); > + if (err < 0) > goto __error; > } > > @@ -547,11 +549,13 @@ snd_usb_audio_probe(struct usb_device *dev, > goto __error; > } > } > + dev_info(&intf->dev, "probe step 2\n"); > > /* we are allowed to call snd_card_register() many times */ > if (snd_card_register(chip->card) < 0) { > goto __error; > } > + dev_info(&intf->dev, "probe step 3\n"); > > usb_chip[chip->index] = chip; > chip->num_interfaces++; > @@ -560,6 +564,7 @@ snd_usb_audio_probe(struct usb_device *dev, > return chip; > > __error: > + dev_info(&intf->dev, "probe failed\n"); > if (chip) { > if (!chip->num_interfaces) > snd_card_free(chip->card); > --- a/sound/usb/quirks.c > +++ b/sound/usb/quirks.c > @@ -367,6 +367,7 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip, > err = create_autodetect_quirk(chip, iface, driver); > if (err < 0) > return err; > + dev_info(&iface->dev, "first interface successful\n"); > > /* > * ALSA PCM playback/capture devices cannot be registered in two steps, > @@ -385,9 +386,13 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip, > > err = create_autodetect_quirk(chip, iface, driver); > if (err >= 0) > + { > usb_driver_claim_interface(driver, iface, (void *)-1L); > + dev_info(&iface->dev, "interface %d successful\n", ifnum); > + } > } > > + dev_info(&iface->dev, "create_autodetect_quirks successful\n"); > return 0; > } >
On a somewhat related note, is there a way to apply changes to things in, say, sound/usb and compile/install those changes without a few kernel rebuild/install? Or, even better, without a reboot? Would certainly shorting the debug cycle time for me. In this case I'm interested in finding out what quirk->type is when it gets to snd_usb_create_quirk as it looks like the function in the quirk_funcs table that gets called here produces the first suspect error. Adding a dev_info, followed by a kernel rebuild, reinstall, reboot (and the fact that my broken nvidia drivers require reinstalling the video driver every time I install a new kernel) makes for a tedious process! thanks! Cyrus On 11/05/2014 01:17 PM, Clemens Ladisch wrote: > Cyrus Harmon wrote: >> [ 2.964094] snd-usb-audio 3-3.2:1.0: checking PCM interface >> [ 2.964104] snd-usb-audio: probe of 3-3.2:1.0 failed with error -5 >> [ 2.966339] snd-usb-audio 3-3.2:1.1: checking PCM interface >> [ 2.966341] snd-usb-audio 3-3.2:1.1: altsets found >> [ 2.966342] snd-usb-audio 3-3.2:1.1: endpoint found >> [ 2.966343] snd-usb-audio 3-3.2:1.1: iso found >> [ 2.966344] snd-usb-audio 3-3.2:1.1: descriptors found >> [ 2.968544] usb 3-3.2:1.0: checking PCM interface >> [ 2.968546] usb 3-3.2:1.2: checking PCM interface >> [ 2.968547] usb 3-3.2:1.2: altsets found >> [ 2.968547] usb 3-3.2:1.2: endpoint found >> [ 2.968548] usb 3-3.2:1.2: iso found >> [ 2.968549] usb 3-3.2:1.2: descriptors found >> [ 2.970657] usb 3-3.2:1.3: checking PCM interface >> [ 2.970666] usb 3-3.2:1.4: checking PCM interface >> [ 2.970930] snd-usb-audio: probe of 3-3.2:1.1 failed with error -5 > Strange; in theory, this cannot happen. > > Please add this patch and try again. > > > Regards, > Clemens > > > --- a/sound/usb/card.c > +++ b/sound/usb/card.c > @@ -536,7 +536,9 @@ snd_usb_audio_probe(struct usb_device *dev, > err = 1; /* continue */ > if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) { > /* need some special handlings */ > - if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0) > + err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk); > + dev_info(&intf->dev, "quirk return code: %d\n", err); > + if (err < 0) > goto __error; > } > > @@ -547,11 +549,13 @@ snd_usb_audio_probe(struct usb_device *dev, > goto __error; > } > } > + dev_info(&intf->dev, "probe step 2\n"); > > /* we are allowed to call snd_card_register() many times */ > if (snd_card_register(chip->card) < 0) { > goto __error; > } > + dev_info(&intf->dev, "probe step 3\n"); > > usb_chip[chip->index] = chip; > chip->num_interfaces++; > @@ -560,6 +564,7 @@ snd_usb_audio_probe(struct usb_device *dev, > return chip; > > __error: > + dev_info(&intf->dev, "probe failed\n"); > if (chip) { > if (!chip->num_interfaces) > snd_card_free(chip->card); > --- a/sound/usb/quirks.c > +++ b/sound/usb/quirks.c > @@ -367,6 +367,7 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip, > err = create_autodetect_quirk(chip, iface, driver); > if (err < 0) > return err; > + dev_info(&iface->dev, "first interface successful\n"); > > /* > * ALSA PCM playback/capture devices cannot be registered in two steps, > @@ -385,9 +386,13 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip, > > err = create_autodetect_quirk(chip, iface, driver); > if (err >= 0) > + { > usb_driver_claim_interface(driver, iface, (void *)-1L); > + dev_info(&iface->dev, "interface %d successful\n", ifnum); > + } > } > > + dev_info(&iface->dev, "create_autodetect_quirks successful\n"); > return 0; > } >
At Thu, 06 Nov 2014 08:05:43 -0800, Cyrus Harmon wrote: > > > On a somewhat related note, is there a way to apply changes to things > in, say, sound/usb and compile/install those changes without a few > kernel rebuild/install? Or, even better, without a reboot? Would > certainly shorting the debug cycle time for me. In this case I'm > interested in finding out what quirk->type is when it gets to > snd_usb_create_quirk as it looks like the function in the quirk_funcs > table that gets called here produces the first suspect error. Adding a > dev_info, followed by a kernel rebuild, reinstall, reboot (and the fact > that my broken nvidia drivers require reinstalling the video driver > every time I install a new kernel) makes for a tedious process! It's a standard procedure, something like... % mkdir /somewhere % cd /somewhere % cp -a /there/linux/sound . % patch -p1 < your-usb.patch % make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb % su # make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb modules_install # modprobe -r snd-usb-audio # modprobe snd-usb-audio Takashi
That's what I was looking for! Thanks! On 11/06/2014 08:49 AM, Takashi Iwai wrote: > At Thu, 06 Nov 2014 08:05:43 -0800, > Cyrus Harmon wrote: >> >> On a somewhat related note, is there a way to apply changes to things >> in, say, sound/usb and compile/install those changes without a few >> kernel rebuild/install? Or, even better, without a reboot? Would >> certainly shorting the debug cycle time for me. In this case I'm >> interested in finding out what quirk->type is when it gets to >> snd_usb_create_quirk as it looks like the function in the quirk_funcs >> table that gets called here produces the first suspect error. Adding a >> dev_info, followed by a kernel rebuild, reinstall, reboot (and the fact >> that my broken nvidia drivers require reinstalling the video driver >> every time I install a new kernel) makes for a tedious process! > It's a standard procedure, something like... > > % mkdir /somewhere > % cd /somewhere > % cp -a /there/linux/sound . > % patch -p1 < your-usb.patch > % make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb > % su > # make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb modules_install > # modprobe -r snd-usb-audio > # modprobe snd-usb-audio > > > Takashi
Cyrus Harmon wrote: > I'm interested in finding out what quirk->type is when it gets to > snd_usb_create_quirk as it looks like the function in the quirk_funcs > table that gets called here produces the first suspect error. >>> [ 2.964094] snd-usb-audio 3-3.2:1.0: checking PCM interface >>> [ 2.964104] snd-usb-audio: probe of 3-3.2:1.0 failed with error -5 The first error is harmless (the control interface is not a PCM interface). >>> ... >>> [ 2.970930] snd-usb-audio: probe of 3-3.2:1.1 failed with error -5 The second error happens during snd_card_register(). In other words, there's probably something about the PCM device that makes snd_pcm_dev_register() unhappy. Regards, Clemens
Cyrus, There's an automated patcher for the UR22 on Ubuntu @ Steinberg forums - maybe you can adapt it for your purposes. http://pastebin.com/awiG30Eh http://www.steinberg.net/forums/viewtopic.php?t=62290 ~Vlad On Thu, 2014-11-06 at 08:54 -0800, Cyrus Harmon wrote: > That's what I was looking for! > > Thanks! > > On 11/06/2014 08:49 AM, Takashi Iwai wrote: > > At Thu, 06 Nov 2014 08:05:43 -0800, > > Cyrus Harmon wrote: > >> > >> On a somewhat related note, is there a way to apply changes to things > >> in, say, sound/usb and compile/install those changes without a few > >> kernel rebuild/install? Or, even better, without a reboot? Would > >> certainly shorting the debug cycle time for me. In this case I'm > >> interested in finding out what quirk->type is when it gets to > >> snd_usb_create_quirk as it looks like the function in the quirk_funcs > >> table that gets called here produces the first suspect error. Adding a > >> dev_info, followed by a kernel rebuild, reinstall, reboot (and the fact > >> that my broken nvidia drivers require reinstalling the video driver > >> every time I install a new kernel) makes for a tedious process! > > It's a standard procedure, something like... > > > > % mkdir /somewhere > > % cd /somewhere > > % cp -a /there/linux/sound . > > % patch -p1 < your-usb.patch > > % make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb > > % su > > # make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb modules_install > > # modprobe -r snd-usb-audio > > # modprobe snd-usb-audio > > > > > > Takashi > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Cyrus, There's an automated patcher for the UR22 on Ubuntu @ Steinberg forums - maybe you can adapt it for your purposes. http://pastebin.com/awiG30Eh http://www.steinberg.net/forums/viewtopic.php?t=62290 ~Vlad On Thu, 2014-11-06 at 08:54 -0800, Cyrus Harmon wrote: > That's what I was looking for! > > Thanks! > > On 11/06/2014 08:49 AM, Takashi Iwai wrote: > > At Thu, 06 Nov 2014 08:05:43 -0800, > > Cyrus Harmon wrote: > >> > >> On a somewhat related note, is there a way to apply changes to things > >> in, say, sound/usb and compile/install those changes without a few > >> kernel rebuild/install? Or, even better, without a reboot? Would > >> certainly shorting the debug cycle time for me. In this case I'm > >> interested in finding out what quirk->type is when it gets to > >> snd_usb_create_quirk as it looks like the function in the quirk_funcs > >> table that gets called here produces the first suspect error. Adding a > >> dev_info, followed by a kernel rebuild, reinstall, reboot (and the fact > >> that my broken nvidia drivers require reinstalling the video driver > >> every time I install a new kernel) makes for a tedious process! > > It's a standard procedure, something like... > > > > % mkdir /somewhere > > % cd /somewhere > > % cp -a /there/linux/sound . > > % patch -p1 < your-usb.patch > > % make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb > > % su > > # make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb modules_install > > # modprobe -r snd-usb-audio > > # modprobe snd-usb-audio > > > > > > Takashi > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Dear Takashi, Sorry for the delay in getting back to this. Your instructions seem close, but I've run into the following issues: 1. the module is installed in /lib/modules/`uname -r`/extra instead of kernel/sound/usb 2. I can get around that with: sudo insmod /lib/modules/`uname -r`/extra/snd-usbmidi-lib.ko sudo insmod /lib/modules/`uname -r`/extra/snd-usb-audio.ko but there's probably a better way. 3. I can't do the same tricks with snd-pcm as I get the following error: sly@madbox:/lib/modules/3.19.0-rc7-local$ sudo modprobe -r snd-pcm modprobe: FATAL: Module snd_pcm is in use. Is there a way to disable snd_pcm and reload the module? Barring that, I at least want to be able to install the new snd_pcm and reboot, without having to rebuild the whole kernel, so solving problem 1 would presumably help for that. Thanks for your help! Cyrus On 11/06/2014 08:49 AM, Takashi Iwai wrote: > At Thu, 06 Nov 2014 08:05:43 -0800 Cyrus Harmon wrote: >> On a somewhat related note, is there a way to apply changes to things >> in, say, sound/usb and compile/install those changes without a few >> kernel rebuild/install? Or, even better, without a reboot? Would >> certainly shorting the debug cycle time for me. In this case I'm >> interested in finding out what quirk->type is when it gets to >> snd_usb_create_quirk as it looks like the function in the quirk_funcs >> table that gets called here produces the first suspect error. Adding >> a dev_info, followed by a kernel rebuild, reinstall, reboot (and the >> fact that my broken nvidia drivers require reinstalling the video >> driver every time I install a new kernel) makes for a tedious process! > It's a standard procedure, something like... % mkdir /somewhere % cd > /somewhere % cp -a /there/linux/sound . % patch -p1 < your-usb.patch % > make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb % su # make -C > /lib/modules/`uname -r`/build M=$PWD/sound/usb modules_install # > modprobe -r snd-usb-audio # modprobe snd-usb-audio Takashi
At Mon, 2 Feb 2015 22:56:31 -0800, Cyrus Harmon wrote: > > > Dear Takashi, > > Sorry for the delay in getting back to this. Your instructions seem > close, but I've run into the following issues: > > 1. the module is installed in /lib/modules/`uname -r`/extra instead of > kernel/sound/usb > > 2. I can get around that with: > > sudo insmod /lib/modules/`uname -r`/extra/snd-usbmidi-lib.ko > sudo insmod /lib/modules/`uname -r`/extra/snd-usb-audio.ko > > but there's probably a better way. modprobe will load from extra directory before others automatically. > 3. I can't do the same tricks with snd-pcm as I get the following error: > > sly@madbox:/lib/modules/3.19.0-rc7-local$ sudo modprobe -r snd-pcm > modprobe: FATAL: Module snd_pcm is in use. > > Is there a way to disable snd_pcm and reload the module? Unload the module referring to snd-pcm, in your case, snd-usb-audio at first. Takashi > Barring that, I > at least want to be able to install the new snd_pcm and reboot, without > having to rebuild the whole kernel, so solving problem 1 would > presumably help for that. > > Thanks for your help! > > Cyrus > > On 11/06/2014 08:49 AM, Takashi Iwai wrote: > > At Thu, 06 Nov 2014 08:05:43 -0800 Cyrus Harmon wrote: > >> On a somewhat related note, is there a way to apply changes to things > >> in, say, sound/usb and compile/install those changes without a few > >> kernel rebuild/install? Or, even better, without a reboot? Would > >> certainly shorting the debug cycle time for me. In this case I'm > >> interested in finding out what quirk->type is when it gets to > >> snd_usb_create_quirk as it looks like the function in the quirk_funcs > >> table that gets called here produces the first suspect error. Adding > >> a dev_info, followed by a kernel rebuild, reinstall, reboot (and the > >> fact that my broken nvidia drivers require reinstalling the video > >> driver every time I install a new kernel) makes for a tedious process! > > It's a standard procedure, something like... % mkdir /somewhere % cd > > /somewhere % cp -a /there/linux/sound . % patch -p1 < your-usb.patch % > > make -C /lib/modules/`uname -r`/build M=$PWD/sound/usb % su # make -C > > /lib/modules/`uname -r`/build M=$PWD/sound/usb modules_install # > > modprobe -r snd-usb-audio # modprobe snd-usb-audio Takashi >
--- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -536,7 +536,9 @@ snd_usb_audio_probe(struct usb_device *dev, err = 1; /* continue */ if (quirk && quirk->ifnum != QUIRK_NO_INTERFACE) { /* need some special handlings */ - if ((err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk)) < 0) + err = snd_usb_create_quirk(chip, intf, &usb_audio_driver, quirk); + dev_info(&intf->dev, "quirk return code: %d\n", err); + if (err < 0) goto __error; } @@ -547,11 +549,13 @@ snd_usb_audio_probe(struct usb_device *dev, goto __error; } } + dev_info(&intf->dev, "probe step 2\n"); /* we are allowed to call snd_card_register() many times */ if (snd_card_register(chip->card) < 0) { goto __error; } + dev_info(&intf->dev, "probe step 3\n"); usb_chip[chip->index] = chip; chip->num_interfaces++; @@ -560,6 +564,7 @@ snd_usb_audio_probe(struct usb_device *dev, return chip; __error: + dev_info(&intf->dev, "probe failed\n"); if (chip) { if (!chip->num_interfaces) snd_card_free(chip->card); --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -367,6 +367,7 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip, err = create_autodetect_quirk(chip, iface, driver); if (err < 0) return err; + dev_info(&iface->dev, "first interface successful\n"); /* * ALSA PCM playback/capture devices cannot be registered in two steps, @@ -385,9 +386,13 @@ static int create_autodetect_quirks(struct snd_usb_audio *chip, err = create_autodetect_quirk(chip, iface, driver); if (err >= 0) + { usb_driver_claim_interface(driver, iface, (void *)-1L); + dev_info(&iface->dev, "interface %d successful\n", ifnum); + } } + dev_info(&iface->dev, "create_autodetect_quirks successful\n"); return 0; }