aboutsummaryrefslogtreecommitdiffstats
path: root/src/anetz/anetz.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-03-05 08:02:13 +0100
committerAndreas Eversberg <jolly@eversberg.eu>2016-03-13 09:12:14 +0100
commit9b8e3592643029412b38dbe5bfae4c73f0199a66 (patch)
tree1acdb14dd70d20b5e1a542497947bb0171f6c553 /src/anetz/anetz.c
parent01a29ccfaa603d8d9ece3494220d50d7086496a7 (diff)
anetz/bnetz: Remove redundant code to enter idle state
Diffstat (limited to 'src/anetz/anetz.c')
-rw-r--r--src/anetz/anetz.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/anetz/anetz.c b/src/anetz/anetz.c
index a68faa9..44d2935 100644
--- a/src/anetz/anetz.c
+++ b/src/anetz/anetz.c
@@ -131,6 +131,7 @@ int anetz_init(void)
}
static void anetz_timeout(struct timer *timer);
+static void anetz_go_idle(anetz_t *anetz);
/* Create transceiver instance and link to a list. */
int anetz_create(const char *sounddev, int samplerate, int kanal, int loopback, double loss_volume)
@@ -165,12 +166,11 @@ int anetz_create(const char *sounddev, int samplerate, int kanal, int loopback,
goto error;
}
- /* go into idle state */
- PDEBUG(DANETZ, DEBUG_INFO, "Entering IDLE state, sending 2280 Hz tone.\n");
- anetz->state = ANETZ_FREI;
- anetz->dsp_mode = DSP_MODE_TONE;
timer_init(&anetz->timer, anetz_timeout, anetz);
+ /* go into idle state */
+ anetz_go_idle(anetz);
+
return 0;
error: