That’s possible by providing a varying voltage to the amplifier.
Voltage can be controlled digitally with different methods.
A common method is pulse width modulation, where a high voltage potential is hacked into smaller pieces, and smoothened afterwards. The longer the pulses the higher the resulting voltage.
Another method is using resistors to decrease the voltage. Resistors can be switched together, one by one.
Since a couple of years, the use of potentiometers to adjust the speaker volume has decreased. In laptops, an integrated circuit (IC) receives a digital value representing the loudness. In receivers, which still have potentiometers they use a DC to control the loudness. Traditionally, the potentiometers were in the in signal path of the pre-amplifier but that could cause some scratching noises after some time.
Edit: A common way to realise a digital potentiometer on a physical level is a resistor-ladder within the IC.
You can make a digital “potensiometer” by having a lot of resistors in parallel, and a way to open or close the paths (for example with a transistor). 5 identical resistors in parallel gets you 20% the amount of resistance. Block the path to one of them and you have 25%, block another and you have 33%, etc.
You can mix and match resistors and make a more complex circuit to get smaller steps, and there are integrated circuits that basically have everything needed to do this in one single chip.
They have electronic potentiometers.
Basically, a potentiometer is a variable resistor. An electronic potentiometer is a bank or resistors with switches, which can connect one or more resistors into the circuit to give the required resistance.
The switches can be transistors, as these can be switched on and off electronically quickly and easily with no degradation to the signal.
Typically, the whole combination of control circuitry, switches and resistors can be built into a single chip.
Latest Answers