HDA: Adjust printing of stream status in stream_handle_interrupt.

Just print the whole status in the "stream buffer not completed",
that way we won't have multiple lines printed when errors occur here.

See #19196.
This commit is contained in:
Augustin Cavalier 2024-10-21 13:24:08 -04:00
parent 21a284b61b
commit 09abc534f3

View File

@ -272,6 +272,12 @@ stream_handle_interrupt(hda_controller* controller, hda_stream* stream,
stream->Write8(HDAC_STREAM_STATUS, status);
if ((status & STATUS_BUFFER_COMPLETED) == 0) {
dprintf("hda: stream buffer not completed (id: %" B_PRIu32 ", "
"status 0x%" B_PRIx32 ")\n", stream->id, status);
return false;
}
if ((status & STATUS_FIFO_ERROR) != 0)
dprintf("hda: stream fifo error (id:%" B_PRIu32 ")\n", stream->id);
if ((status & STATUS_DESCRIPTOR_ERROR) != 0) {
@ -279,12 +285,6 @@ stream_handle_interrupt(hda_controller* controller, hda_stream* stream,
stream->id);
}
if ((status & STATUS_BUFFER_COMPLETED) == 0) {
dprintf("hda: stream buffer not completed (id:%" B_PRIu32 ")\n",
stream->id);
return false;
}
// Normally we should use the DMA position for the stream. Apparently there
// are broken chipsets, which don't support it correctly. If we detect this,
// we switch to using the LPIB instead. The link position is ahead of the