A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita
audio
rust
zig
deno
mpris
rockbox
mpd
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Michal Sevakis
11 * Based on the work of Thom Johansen
12 *
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.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22#ifndef SPDIF_H
23#define SPDIF_H
24
25#ifdef HAVE_SPDIF_POWER
26#define IF_SPDIF_POWER_(...) __VA_ARGS__
27#else
28#define IF_SPDIF_POWER_(...)
29#endif
30
31/* Initialize the S/PDIF driver */
32void spdif_init(void);
33/* Return the S/PDIF frequency in herz - unrounded */
34unsigned long spdif_measure_frequency(void);
35#ifdef HAVE_SPDIF_OUT
36/* Set the S/PDIF audio feed - Use AUDIO_SRC_* values -
37 will be off if not powered or !on */
38void 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 */
41int spdif_get_output_source(bool *src_on);
42#endif /* HAVE_SPDIF_OUT */
43
44#endif /* SPDIF_H */