usb_audio: Report callback errors to syslog.

That way they don't just get lost.
This commit is contained in:
Augustin Cavalier 2024-01-31 14:38:55 -05:00
parent f4e363ee29
commit b785b0cf1c
2 changed files with 7 additions and 3 deletions

View File

@ -324,9 +324,12 @@ void
Stream::_TransferCallback(void* cookie, status_t status, void* data,
size_t actualLength)
{
TRACE(DTA, "st:%#010x, data:%#010x, len:%d\n", status, data, actualLength);
Stream* stream = (Stream*)cookie;
TRACE(status == B_OK ? DTA : ERR,
"stream:%010x: status:%#010x, data:%#010x, len:%d\n",
stream->fStreamEndpoint, status, data, actualLength);
atomic_add(&stream->fInsideNotify, 1);
if (status == B_CANCELED || stream->fDevice->fRemoved || !stream->fIsRunning) {
TRACE(ERR, "Cancelled: c:%p st:%#010x, data:%#010x, len:%d\n",
@ -335,7 +338,9 @@ Stream::_TransferCallback(void* cookie, status_t status, void* data,
return;
}
#if 0
stream->_DumpDescriptors();
#endif
if (atomic_add(&stream->fProcessedBuffers, 1) > (int32)kSamplesBufferCount)
TRACE(ERR, "Processed buffers overflow:%d\n", stream->fProcessedBuffers);

View File

@ -45,7 +45,6 @@ protected:
Device* fDevice;
status_t fStatus;
uint8 fTerminalID;
usb_pipe fStreamEndpoint;
bool fIsRunning;