Re: [Bugme-new] [Bug 15580] New: ehci_hcd has to be reloaded after disconnect/connect cycle of USB audio card

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

 



On Tue, 23 Mar 2010, Pedro Ribeiro wrote:

> Just to clear things up (hopefully) the behaviour described above is
> only for the first time, when I boot the system. Once I load the
> modules in the order specified above, I always get the interference
> even if I unload them all and reload them NOT in that order - what I
> mean is once the damage is done, its irreversible - I can't use both
> at the same time.

This is very puzzling, and I don't see any reason for the behavior
you're describing.  The only thing I can think of is that somehow the
audio card gets into a bad state which persists until it is reset.

You can test this by using the attached usbreset program.  Start by 
triggering the interference, and then stop using both cards (don't 
stream any TV and don't stream any audio).  In fact, to be safe, you 
should unload both drivers.

While the cards are idle, use the program to reset the audio card
(you'll have to run it as root).  You just tell it the name of the USB
device to reset.  For example, according to your dmesg log the audio
card was device 3 on bus 1, so you would do:

	sudo ./usbreset /dev/bus/usb/001/003

Then reload the audio driver, try streaming some normal ALSA audio,
and see if the interference has gone away.

Alan Stern
/* usbreset -- send a USB port reset to a USB device */
/* To build:  gcc -o usbreset usbreset.c */

#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>

#include <linux/usbdevice_fs.h>


int main(int argc, char **argv)
{
	const char *filename;
	int fd;
	int rc;

	if (argc != 2) {
		fprintf(stderr, "Usage: usbreset device-filename\n");
		return 1;
	}
	filename = argv[1];

	fd = open(filename, O_WRONLY);
	if (fd < 0) {
		perror("Error opening output file");
		return 1;
	}

	printf("Resetting USB device %s\n", filename);
	rc = ioctl(fd, USBDEVFS_RESET, 0);
	if (rc < 0) {
		perror("Error in ioctl");
		return 1;
	}
	printf("Reset successful\n");

	close(fd);
	return 0;
}

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux