# 2.1 Audio I/O theory

The microphone and DAC components we will be using rely on the I2S (Inter-IC Sound) bus specification for audio transfer. This is a 3-line serial bus consisting of:

1. A **data** line for two time-multiplexed channels (usually denoted as *left* and *right*).
2. A **word select** line for indicating which of the two channels is being transmitted/received.
3. A **clock** line for which each period will correspond to a unique bit of data.

More information about the I2S bus specification can be read [here](https://www.sparkfun.com/datasheets/BreakoutBoards/I2SBUS.pdf).

We first discuss the I2S protocol with respect to the [microphone](/dsp-labs/passthrough/audio-io/microphone.md) and then for the [DAC](/dsp-labs/passthrough/audio-io/dac.md). We recommend reading in this order as the microphone section is easier to grasp and will introduce common terminology used later on.

For the STM board that we are using, we will configure two I2S buses: one for input and the other for output. This configuration process will be covered in [Chapter 2.2](/dsp-labs/passthrough/updating_stm32_peripherals.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lcav.gitbook.io/dsp-labs/passthrough/audio-io.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
