summaryrefslogtreecommitdiff
path: root/firmware/drivers/audio
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2007-06-13 06:33:40 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2007-06-13 06:33:40 +0000
commitd1178d2d769fd52dbd9e872ff7cb5a7a4d2b234c (patch)
tree8a743d9e5b4265e61e044658947d43a13f9fdc7e /firmware/drivers/audio
parent2f1a262a60a8c4bd6cce861dd407945aa440cdfe (diff)
* changed pararmeter of audiohw_mute from int to bool
* unification of init and close NOTE: audiohw_init is a void function now, because it never (can) fail okay from JdGordon@irc git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13622 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/audio')
-rw-r--r--firmware/drivers/audio/as3514.c6
-rw-r--r--firmware/drivers/audio/tlv320.c6
-rw-r--r--firmware/drivers/audio/uda1380.c17
-rw-r--r--firmware/drivers/audio/wm8731l.c2
-rw-r--r--firmware/drivers/audio/wm8751.c2
-rw-r--r--firmware/drivers/audio/wm8758.c2
-rw-r--r--firmware/drivers/audio/wm8975.c2
7 files changed, 14 insertions, 23 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index a0a84e51c9..4e69462508 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -130,7 +130,7 @@ void audiohw_reset(void);
/*
* Initialise the PP I2C and I2S.
*/
-int audiohw_init(void)
+void audiohw_init(void)
{
unsigned int i;
@@ -188,8 +188,6 @@ int audiohw_init(void)
{
as3514.regs[i] = i2c_readbyte(AS3514_I2C_ADDR, i);
}
-
- return 0;
}
void audiohw_postinit(void)
@@ -267,7 +265,7 @@ int audiohw_set_lineout_vol(int vol_l, int vol_r)
return 0;
}
-void audiohw_mute(int mute)
+void audiohw_mute(bool mute)
{
if (mute) {
as3514_write_or(HPH_OUT_L, (1 << 7));
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c
index 2e43baaf8f..7da26502a4 100644
--- a/firmware/drivers/audio/tlv320.c
+++ b/firmware/drivers/audio/tlv320.c
@@ -218,11 +218,7 @@ void audiohw_set_recvol(int left, int right, int type)
}
}
-/**
- * Mute (mute=1) or enable sound (mute=0)
- *
- */
-void audiohw_mute(int mute)
+void audiohw_mute(bool mute)
{
unsigned value_dap = tlv320_regs[REG_DAP];
unsigned value_l, value_r;
diff --git a/firmware/drivers/audio/uda1380.c b/firmware/drivers/audio/uda1380.c
index ab0ff81352..1b3d5a065d 100644
--- a/firmware/drivers/audio/uda1380.c
+++ b/firmware/drivers/audio/uda1380.c
@@ -159,11 +159,7 @@ void audiohw_set_treble(int value)
| TREBLEL(value) | TREBLER(value));
}
-/**
- * Mute (mute=1) or enable sound (mute=0)
- *
- */
-void audiohw_mute(int mute)
+void audiohw_mute(bool mute)
{
unsigned int value = uda1380_regs[REG_MUTE];
@@ -260,17 +256,18 @@ void audiohw_set_frequency(unsigned fsel)
}
/* Initialize UDA1380 codec with default register values (uda1380_defaults) */
-int audiohw_init(void)
+void audiohw_init(void)
{
recgain_mic = 0;
recgain_line = 0;
audiohw_reset();
-
- if (audiohw_set_regs() == -1)
- return -1;
- return 0;
+ if (audiohw_set_regs() == -1)
+ {
+ /* this shoud never (!) happen. */
+ logf("uda1380: audiohw_init failed")
+ }
}
void audiohw_postinit(void)
diff --git a/firmware/drivers/audio/wm8731l.c b/firmware/drivers/audio/wm8731l.c
index c87c7d0125..94efc535e2 100644
--- a/firmware/drivers/audio/wm8731l.c
+++ b/firmware/drivers/audio/wm8731l.c
@@ -82,7 +82,7 @@ int tenthdb2mixer(int db)
return -db * 2 / 5;
}
-void audiohw_mute(int mute)
+void audiohw_mute(bool mute)
{
if (mute)
{
diff --git a/firmware/drivers/audio/wm8751.c b/firmware/drivers/audio/wm8751.c
index 346b4239a4..056b5d6628 100644
--- a/firmware/drivers/audio/wm8751.c
+++ b/firmware/drivers/audio/wm8751.c
@@ -168,7 +168,7 @@ void audiohw_set_treble(int value)
TREBCTRL_TREB(tone_tenthdb2hw(value)));
}
-void audiohw_mute(int mute)
+void audiohw_mute(bool mute)
{
/* Mute: Set DACMU = 1 to soft-mute the audio DACs. */
/* Unmute: Set DACMU = 0 to soft-un-mute the audio DACs. */
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c
index bf3ec4c1de..0c1611890f 100644
--- a/firmware/drivers/audio/wm8758.c
+++ b/firmware/drivers/audio/wm8758.c
@@ -151,7 +151,7 @@ void audiohw_set_treble(int value)
(void)value;
}
-void audiohw_mute(int mute)
+void audiohw_mute(bool mute)
{
if (mute)
{
diff --git a/firmware/drivers/audio/wm8975.c b/firmware/drivers/audio/wm8975.c
index 5f90ff0a38..d1d46334e4 100644
--- a/firmware/drivers/audio/wm8975.c
+++ b/firmware/drivers/audio/wm8975.c
@@ -190,7 +190,7 @@ void audiohw_set_treble(int value)
}
}
-void audiohw_mute(int mute)
+void audiohw_mute(bool mute)
{
if (mute)
{