diff options
-rw-r--r-- | firmware/config-player.h | 3 | ||||
-rw-r--r-- | firmware/config-playerold.h | 3 | ||||
-rw-r--r-- | firmware/drivers/dac.c | 5 | ||||
-rw-r--r-- | firmware/drivers/dac.h | 6 | ||||
-rw-r--r-- | firmware/mpeg.c | 6 |
5 files changed, 21 insertions, 2 deletions
diff --git a/firmware/config-player.h b/firmware/config-player.h index 7726069f50..a1c5db9f9f 100644 --- a/firmware/config-player.h +++ b/firmware/config-player.h | |||
@@ -9,3 +9,6 @@ | |||
9 | 9 | ||
10 | /* Define this if you have a MAS3507D */ | 10 | /* Define this if you have a MAS3507D */ |
11 | #define HAVE_MAS3507D | 11 | #define HAVE_MAS3507D |
12 | |||
13 | /* Define this if you have a DAC3550A */ | ||
14 | #define HAVE_DAC3550A | ||
diff --git a/firmware/config-playerold.h b/firmware/config-playerold.h index 5fd936f698..2068c94db4 100644 --- a/firmware/config-playerold.h +++ b/firmware/config-playerold.h | |||
@@ -6,3 +6,6 @@ | |||
6 | 6 | ||
7 | /* Define this if you have a MAS3507D */ | 7 | /* Define this if you have a MAS3507D */ |
8 | #define HAVE_MAS3507D | 8 | #define HAVE_MAS3507D |
9 | |||
10 | /* Define this if you have a DAC3550A */ | ||
11 | #define HAVE_DAC3550A | ||
diff --git a/firmware/drivers/dac.c b/firmware/drivers/dac.c index 72d4c40cf7..c8a5414611 100644 --- a/firmware/drivers/dac.c +++ b/firmware/drivers/dac.c | |||
@@ -16,11 +16,14 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | ||
19 | #include "stdbool.h" | 20 | #include "stdbool.h" |
20 | #include "i2c.h" | 21 | #include "i2c.h" |
21 | #include "debug.h" | 22 | #include "debug.h" |
22 | #include "dac.h" | 23 | #include "dac.h" |
23 | 24 | ||
25 | #ifdef HAVE_DAC3550A | ||
26 | |||
24 | int dac_volume(unsigned int left, unsigned int right, bool deemph) | 27 | int dac_volume(unsigned int left, unsigned int right, bool deemph) |
25 | { | 28 | { |
26 | int ret = 0; | 29 | int ret = 0; |
@@ -89,3 +92,5 @@ void dac_init(void) | |||
89 | i2c_write(DAC_DEV_WRITE,buf,2); | 92 | i2c_write(DAC_DEV_WRITE,buf,2); |
90 | i2c_end(); | 93 | i2c_end(); |
91 | } | 94 | } |
95 | |||
96 | #endif | ||
diff --git a/firmware/drivers/dac.h b/firmware/drivers/dac.h index c0b2873fda..ef5e4e992d 100644 --- a/firmware/drivers/dac.h +++ b/firmware/drivers/dac.h | |||
@@ -19,6 +19,10 @@ | |||
19 | #ifndef _DAC_H_ | 19 | #ifndef _DAC_H_ |
20 | #define _DAC_H_ | 20 | #define _DAC_H_ |
21 | 21 | ||
22 | #include "config.h" | ||
23 | |||
24 | #ifdef HAVE_DAC3550A | ||
25 | |||
22 | /* | 26 | /* |
23 | DAC I2C defs | 27 | DAC I2C defs |
24 | */ | 28 | */ |
@@ -37,3 +41,5 @@ extern int dac_config(int value); | |||
37 | extern void dac_init(void); | 41 | extern void dac_init(void); |
38 | 42 | ||
39 | #endif | 43 | #endif |
44 | |||
45 | #endif | ||
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 92ef55983b..a8442f2e85 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -1512,8 +1512,6 @@ void mpeg_init(int volume, int bass, int treble, int balance, int loudness, int | |||
1512 | 1512 | ||
1513 | setup_sci0(); | 1513 | setup_sci0(); |
1514 | 1514 | ||
1515 | dac_init(); | ||
1516 | |||
1517 | #ifdef HAVE_MAS3587F | 1515 | #ifdef HAVE_MAS3587F |
1518 | mas_reset(); | 1516 | mas_reset(); |
1519 | 1517 | ||
@@ -1549,6 +1547,10 @@ void mpeg_init(int volume, int bass, int treble, int balance, int loudness, int | |||
1549 | val = 0x0c; | 1547 | val = 0x0c; |
1550 | mas_writemem(MAS_BANK_D0,0x7f6,&val,1); | 1548 | mas_writemem(MAS_BANK_D0,0x7f6,&val,1); |
1551 | #endif | 1549 | #endif |
1550 | |||
1551 | #ifdef HAVE_DAC3550A | ||
1552 | dac_init(); | ||
1553 | #endif | ||
1552 | 1554 | ||
1553 | #ifdef HAVE_MAS3507D | 1555 | #ifdef HAVE_MAS3507D |
1554 | PBDR &= ~0x20; | 1556 | PBDR &= ~0x20; |