Re: [coreaudio] Problem with USB input drivers?
Re: [coreaudio] Problem with USB input drivers?
- Subject: Re: [coreaudio] Problem with USB input drivers?
- From: "Michael C. Thornburgh" <email@hidden>
- Date: Tue, 14 May 2002 08:24:13 -0700 (PDT)
>
> >I came across the following problem with the iMic on a Titanium PB 667
>
> >and MacOS 10.1.4. When I start to record at 11.025 kHz, 16Bit, mono, the
>
> >whole system crashes severely.
i believe this is the same problem in AppleUSBAudio.kext that
is addressed by a patch i submitted a few months ago; i found
it when recording non-16-bit samples (which requires a _different_
patch, reference to follow) but it seems to be timing/buffer size
related, so different sampling rates can cause it too. the patch
submission is at
http://lists.apple.com/mhonarc/publicsource-modifications/msg00070.html
from its notes:
in AppleUSBAudioEngine::readHandler(), it is possible for
"dest" to get out-of-sync with "self->bufferOffset" if
pFrames[frameIndex].frActCount == numBytesToEnd _and_ you're not done
with the frameIndex loop. i have only seen this panic manifest when
using 20(24) bit samples. this is probably an interaction with timing,
sample size, and buffer end vs page end.
to be able to record non-16-bit samples, you need this other patch:
http://lists.apple.com/mhonarc/publicsource-modifications/msg00067.html
from its notes:
usb audio input assumes 16-bit samples. setting a usb audio
device to any other mode will give corrupted samples (best case) or lead
to a panic (8 bit samples, worst case).
>
Start iTunes and play a CD over an USB device, then start Daisy, play an
>
audio file over the same output and change the physical format to a lower
>
sample rate while still playing...
i submitted a bug on this a while ago too, and then did a little
more research. i then submitted the following clarification;
unfortunately, my IOKit-fu isn't strong enough, and i haven't
pursued this more to find a fix:
occasionally, when switching from 44100 2ch to 8000Hz 1ch,
i would get a panic in IOAudioEngine::performErase(). this
appears to be caused by status->fEraseHeadSampleFrame
pointing to beyond the number of frames in the sample or
mix buffers (the actual panic occuring when performErase()
tries to bzero the sample buffer). it would seem that,
when the format is changed and, therefore, buffers are
reallocated, some of these pointers aren't reset. however,
something even kookier is going on, because when i put in
a little patch to detect when fEraseHeadSampleFrame was
out-of-bounds and set it to something safe (like 0),
the system would just Utterly Freeze instead of panicking
in the same circumstance.
for this last one, i've just taken a "don't do that" approach
to not panicking my system. :)
if anyone would like a patched AppleUSBAudio.kext that addresses
the first two issues in this message, but can't compile/patch
it from the Darwin source, let me know and i'll make a binary
available for download.
-mike
>
From: Stephan <email@hidden>
>
To: <email@hidden>
>
Subject: Re: [coreaudio] Problem with USB input drivers?
>
Date: Tue, 14 May 2002 12:20:19 +0200
>
>
> My hunch would be that, because of the lack of separate drivers for
>
> the iMic, the panics occur in the USB Audio driver.
>
>
Here's another one to produce a kernel panic with the USB Class Driver:
>
>
Start iTunes and play a CD over an USB device, then start Daisy, play an
>
audio file over the same output and change the physical format to a lower
>
sample rate while still playing...
>
>
Stephan
>
>
----- Original Message -----
>
From: "robert" <email@hidden>
>
To: <email@hidden>
>
Sent: Tuesday, May 14, 2002 11:17 AM
>
Subject: Re: [coreaudio] Problem with USB input drivers?
>
>
>
> >I came across the following problem with the iMic on a Titanium PB 667
>
> >and MacOS 10.1.4. When I start to record at 11.025 kHz, 16Bit, mono, the
>
> >whole system crashes severely.
>
>
>
> You're not the first experiencing kernel panics using the iMic. If I
>
> remember correctly, there have been more postings to this list about it,
>
> and I for one have also had to deal with sudden panics whilst recording
>
> using an iMic on a tiBook.
>
>
>
> My hunch would be that, because of the lack of separate drivers for
>
> the iMic, the panics occur in the USB Audio driver. However, I haven't
>
> investigated the matter any further, so the only advice I can give you is
>
> to file a bugreport at bugreporter.apple.com.
>
>
>
> Good luck!
>
>
>
> robert
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.