2015-04-29 15:00:04 +00:00
|
|
|
/*
|
|
|
|
* \brief Audio library interface
|
|
|
|
* \author Josef Soentgen
|
|
|
|
* \date 2014-12-27
|
|
|
|
*
|
|
|
|
* This header declares the private Audio namespace. It contains
|
|
|
|
* functions called by the driver frontend that are implemented
|
|
|
|
* by the driver library.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2016-2017 Genode Labs GmbH
|
2015-04-29 15:00:04 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2015-04-29 15:00:04 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _AUDIO__AUDIO_H_
|
|
|
|
#define _AUDIO__AUDIO_H_
|
|
|
|
|
2016-04-24 08:56:31 +00:00
|
|
|
/* Genode includes */
|
|
|
|
#include <base/env.h>
|
|
|
|
#include <util/xml_node.h>
|
|
|
|
|
2015-04-29 15:00:04 +00:00
|
|
|
|
|
|
|
/*****************************
|
|
|
|
** private Audio namespace **
|
|
|
|
*****************************/
|
|
|
|
|
2015-05-15 20:22:46 +00:00
|
|
|
namespace Audio_out {
|
2015-04-29 15:00:04 +00:00
|
|
|
|
|
|
|
enum Channel_number { LEFT, RIGHT, MAX_CHANNELS, INVALID = MAX_CHANNELS };
|
2015-05-15 20:22:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
namespace Audio_in {
|
|
|
|
|
|
|
|
enum Channel_number { LEFT, MAX_CHANNELS, INVALID = MAX_CHANNELS };
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
namespace Audio {
|
2015-04-29 15:00:04 +00:00
|
|
|
|
2017-01-03 10:24:16 +00:00
|
|
|
void update_config(Genode::Env &, Genode::Xml_node);
|
2016-04-24 08:56:31 +00:00
|
|
|
|
|
|
|
void init_driver(Genode::Env &, Genode::Allocator &, Genode::Xml_node);
|
2015-04-29 15:00:04 +00:00
|
|
|
|
|
|
|
bool driver_active();
|
|
|
|
|
2015-05-15 20:22:46 +00:00
|
|
|
void play_sigh(Genode::Signal_context_capability cap);
|
|
|
|
|
|
|
|
void record_sigh(Genode::Signal_context_capability cap);
|
2015-04-29 15:00:04 +00:00
|
|
|
|
|
|
|
int play(short *data, Genode::size_t size);
|
2015-05-15 20:22:46 +00:00
|
|
|
|
|
|
|
int record(short *data, Genode::size_t size);
|
2015-04-29 15:00:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _AUDIO__AUDIO_H_ */
|