wait_for_bits
if (!wait_for_bits<8>(controller, HDAC_CORB_CONTROL, ~0, false)
|| !wait_for_bits<8>(controller, HDAC_RIRB_CONTROL, ~0, false)) {
if (!wait_for_bits<32>(controller, HDAC_GLOBAL_CONTROL,
if (!wait_for_bits<32>(controller, HDAC_GLOBAL_CONTROL,
if (!wait_for_bits<16>(controller, HDAC_CORB_READ_POS, CORB_READ_POS_RESET,
if (!wait_for_bits<16>(controller, HDAC_CORB_READ_POS, CORB_READ_POS_RESET,
if (!wait_for_bits<8>(stream, HDAC_STREAM_CONTROL0, CONTROL0_RUN, true)) {
if (!wait_for_bits<8>(stream, HDAC_STREAM_CONTROL0, CONTROL0_RUN, false)) {
if (!wait_for_bits<8>(stream, HDAC_STREAM_CONTROL0, CONTROL0_RESET, true)) {
if (!wait_for_bits<8>(stream, HDAC_STREAM_CONTROL0, CONTROL0_RESET, false))