summaryrefslogtreecommitdiff
path: root/firmware/drivers/audio/rocker_codec.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/audio/rocker_codec.c')
-rw-r--r--firmware/drivers/audio/rocker_codec.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/firmware/drivers/audio/rocker_codec.c b/firmware/drivers/audio/rocker_codec.c
index e5573df843..e34cb87e9b 100644
--- a/firmware/drivers/audio/rocker_codec.c
+++ b/firmware/drivers/audio/rocker_codec.c
@@ -32,6 +32,8 @@ static int fd_hw;
32static long int vol_l_hw = 255; 32static long int vol_l_hw = 255;
33static long int vol_r_hw = 255; 33static long int vol_r_hw = 255;
34 34
35static int muted = -1;
36
35static void hw_open(void) 37static void hw_open(void)
36{ 38{
37 fd_hw = open("/dev/snd/controlC0", O_RDWR); 39 fd_hw = open("/dev/snd/controlC0", O_RDWR);
@@ -46,6 +48,11 @@ static void hw_close(void)
46 48
47void audiohw_mute(int mute) 49void audiohw_mute(int mute)
48{ 50{
51 if (muted == mute)
52 return;
53
54 muted = mute;
55
49 if(mute) 56 if(mute)
50 { 57 {
51 long int ps0 = 0; 58 long int ps0 = 0;
@@ -67,10 +74,7 @@ void audiohw_preinit(void)
67 74
68void audiohw_postinit(void) 75void audiohw_postinit(void)
69{ 76{
70 long int hp = 2; 77 logf("hw postinit");
71
72 /* Output port switch set to Headphones */
73 //alsa_controls_set_ints("Output Port Switch", 1, &hp); // Unmute happens on PCM start
74} 78}
75 79
76void audiohw_close(void) 80void audiohw_close(void)