I2S DAC/Clocks and mute/04. XSMT: a mute that ramps
Clocks and mute · 04 of 9

XSMT: a mute that ramps

XSMT is the PCM5102A's soft-mute pin, and the board already pulls it HIGH through 10 kΩ, so with nothing connected the DAC plays. Wire it to a GPIO only if the sketch should mute: LOW ramps the sound down instead of cutting it, and HIGH ramps it back up. When the clocks stop, the chip goes quiet by itself.

Pulled up on the board

The XSMT pin goes straight to the chip, and a 10 kΩ resistor on the board connects it to 3V3. Nothing connected reads HIGH, and HIGH means play. A wire from a GPIO overrides the resistor whenever the GPIO drives it.

So XSMT is optional. Three wires and power are a working TK103.

LOW is a fade, not a switch

A mute that ramps
not started
What happens
XSMT
-
Pulled up by
10 kΩ
Power-down after
1 s of no clocks
Run it to see the whole sequence. Each step is one stretch of time; the last one is the state the chip settles in.

Driving XSMT LOW does not cut the output. The chip turns the level down in steps until it reaches silence, and driving it HIGH again turns it back up the same way. TI calls this soft mute and soft un-mute. Because the sound never jumps, there is no click at either end.

Muted while the clocks start

A sketch that owns XSMT can use it to start in silence. The TK101 book's live-monitor sketch mutes before it starts the DAC, and un-mutes once the clocks run:

pinMode(PIN_XSMT, OUTPUT);
digitalWrite(PIN_XSMT, LOW);          // muted while the clocks start
// ... begin() the microphone and the DAC ...
delay(50);
digitalWrite(PIN_XSMT, HIGH);         // un-mute: the DAC ramps up

The two sketches in this book set XSMT HIGH at the top of setup() and leave it there. With the wire off, the pull-up does the same.

When the sketch stops sending

The chip watches its clocks. If they stop or go wrong, it mutes by itself, without a pop, and turns its output stage off. If BCK and LRCK stay low for more than a second, it powers down. When the clocks come back it starts again on its own: there is nothing to reset and no pin to toggle.

When it does not work

Do I have to connect XSMT?

No. The board's 10 kΩ pull-up holds it HIGH, which means play, and leaving it unconnected is a normal way to use the TK103. Both sketches in this book drive it HIGH, so they work the same with the wire off.

Silent since I connected XSMT.

Something is holding it LOW. A sketch that sets the pin as an OUTPUT and never writes HIGH leaves it LOW, and so does a wire to GND by mistake. Write HIGH after the I2S output has started, or take the wire off.

Should I tie XSMT to 3V3 myself?

There is no need. The 10 kΩ on the board already connects it to 3V3. A wire straight to 3V3 adds nothing, and it takes away the sketch's way to mute.

I hear a pop when the sketch starts.

Hold XSMT LOW while the I2S output starts and set it HIGH once the clocks are running, the way the TK101 book's live-monitor sketch does. The chip then fades the sound in.

Where this goes next

What comes out of the jack, and the filter in front of it.

Line level

Edit this page — content/books/i2s-dac/xsmt-a-mute-that-ramps.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

I2S DAC

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum