This January, the European Commission implemented legislation to limit the power consumption in line-powered products when they are deemed in "standby" and "Off" mode.
Traditionally, home audio products were guilty of wasting a lot of power. My teen years were spent hearing my parents tell me constantly that "The TV is still burning power with the screen in standby!! Turn it off at the socket!" Thankfully, British power sockets have individual switches at the wall. But that's another blog post entirely ;).
The latest EcoDesign legislation in Europe has demanded that products consume less than 500 mW in standby. That sounds easier than it is, as most off-the-shelf external power adaptors can burn 300 mW when idling, leaving the system with 200 mW. Add to that the idle power consumption of audio amplifiers, and you’re soon in trouble.
Smart folks out there have used DSP's and other processors to detect when audio sources have been removed, and can put the product in standby-mode. This can be done either in the DSP, or in an analog circuit along with some assistance from the system microcontroller. This is a great way to make the product "go to sleep," but in many cases, the challenge may be "waking up." Once your DSP has been powered down, you no longer have the ability to monitor and "wake up."
Multiple other solutions are possible, including some that integrate comparators with peak hold circuits to detect a threshold. These are typically rather large, and require pretty accurate resistors to set accurate threshold points above your noise floor to guarantee error-free signal detection.
The types of signals that we need to detect have changed, as well. Traditionally, we only worried about the analog signal. Now that we have data coming from wireless modules, HDMI and S/PDIF, we need some intelligence on how we detect. By using "lock" as a trigger to have a quick look (Figure 1) to see if the audio data pin in the I2S stream is toggling high and low, you can "see" if there really is quality data, or if it’s just a string of zeroes.
Figure 1: Use “lock” as a trigger to see if the audio data pin in the I2S stream is toggling high & low.
TI has a number of solutions integrated into its products that can do this, such as the PCM9211 digital audio interface transceiver, but if you want to implement them discretely, here are some tips (and please use TI silicon).
ANALOG: Use the system MCU's spare ADC, precondition the input with an analog peak hold circuit and wake up the MCU every second or so, do an ADC conversion, then go back to sleep.
WIRELESS MODULE: Leave the wireless module in pairing mode, and look for the "Lock" signal. Danger: Some devices can lock, but receive zero data. Consider treating it like an I2S source, see below.
S/PDIF Receiver: Leave the S/PDIF device on (it’s a low power consumer), look for the "Lock" signal. Danger: Some devices can lock, but receive zero data. Consider treating it like an I2S source, detailed below.
I2S Source: Look for data toggling on the data pins. Ideally you'd process this data with a DSP to check the amplitude, and if it's relevant data... but toggling SDIN data is a sign that there's activity. You may choose to wake the DSP once you detect LOCK and DATA.