Felix Homann wrote:
Am 07.07.2010 14:44, schrieb Clemens Ladisch:
(I have the suspicion that we don't actually need a AUDIO_FIXED_ENDPOINT quirk for these devices.)
Something must be in this AUDIO_FIXED_ENDPOINT quirk, since the device now works properly and stable @44.1/88.2 kHz. I don't know the exact reason, since I really don't understand all this stuff.
There must be some difference, and I'd really like to know what it is. Please load the driver with the patch below, with and without the AUDIO_FIXED_ENDPOINT patch, and show what it prints to the system log.
Regards, Clemens
--- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -196,6 +196,7 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof hwc_debug("All rates were zero. Skipping format!\n"); return -1; } + print_hex_dump_bytes("rates ", DUMP_PREFIX_OFFSET, fp->rates, sizeof(int) * nr_rates); } else { /* continuous rates */ fp->rates = SNDRV_PCM_RATE_CONTINUOUS; @@ -480,6 +481,7 @@ int snd_usb_parse_audio_format(struct snd_usb_audio *chip, struct audioformat *f fp->fmt_type = fmt->bFormatType; if (err < 0) return err; + print_hex_dump_bytes("format ", DUMP_PREFIX_OFFSET, fp, sizeof(*fp)); #if 1 /* FIXME: temporary hack for extigy/audigy 2 nx/zs */ /* extigy apparently supports sample rates other than 48k diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 9a9da09..6be2bfc 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -142,6 +142,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, } memcpy(rate_table, fp->rate_table, sizeof(int) * fp->nr_rates); fp->rate_table = rate_table; + print_hex_dump_bytes("rates ", DUMP_PREFIX_OFFSET, fp->rate_table, sizeof(int) * fp->nr_rates); }
stream = (fp->endpoint & USB_DIR_IN) @@ -161,6 +162,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, alts = &iface->altsetting[fp->altset_idx]; fp->datainterval = snd_usb_parse_datainterval(chip, alts); fp->maxpacksize = le16_to_cpu(get_endpoint(alts, 0)->wMaxPacketSize); + print_hex_dump_bytes("format ", DUMP_PREFIX_OFFSET, fp, sizeof(*fp)); usb_set_interface(chip->dev, fp->iface, 0); snd_usb_init_pitch(chip, fp->iface, alts, fp); snd_usb_init_sample_rate(chip, fp->iface, alts, fp, fp->rate_max);