mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-29 08:29:53 +02:00
add disable sound amp while sound not playback.
This will save power of amp. Signed-off-by: Jiejing.Zhang <kzjeef@gmail.com>
This commit is contained in:
parent
6aec1a06bf
commit
96b315a920
@ -31,9 +31,13 @@
|
||||
#define QI_LB60_AMP_GPIO JZ_GPIO_PORTD(4)
|
||||
|
||||
static int qi_lb60_spk_event(struct snd_soc_dapm_widget *widget,
|
||||
struct snd_kcontrol *ctrl, int event)
|
||||
struct snd_kcontrol *ctrl, int event)
|
||||
{
|
||||
int on = !SND_SOC_DAPM_EVENT_OFF(event);
|
||||
int on = 0;
|
||||
if (event & SND_SOC_DAPM_POST_PMU)
|
||||
on = 1;
|
||||
else if (event & SND_SOC_DAPM_PRE_PMD)
|
||||
on = 0;
|
||||
|
||||
gpio_set_value(QI_LB60_SND_GPIO, on);
|
||||
gpio_set_value(QI_LB60_AMP_GPIO, on);
|
||||
|
Loading…
Reference in New Issue
Block a user