1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2006 by Michal Sevakis
11 * Based on the work of Thom Johansen
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
25 #ifdef HAVE_SPDIF_POWER
26 #define IF_SPDIF_POWER_(...) __VA_ARGS__
28 #define IF_SPDIF_POWER_(...)
31 /* Initialize the S/PDIF driver */
32 void spdif_init(void);
33 /* Return the S/PDIF frequency in herz - unrounded */
34 unsigned long spdif_measure_frequency(void);
36 /* Set the S/PDIF audio feed - Use AUDIO_SRC_* values -
37 will be off if not powered or !on */
38 void spdif_set_output_source(int source
IF_SPDIF_POWER_(, bool on
));
39 /* Return the last set S/PDIF audio source - literally the last value passed
40 to spdif_set_monitor regardless of power state */
41 int spdif_get_output_source(bool *src_on
);
42 #endif /* HAVE_SPDIF_OUT */