mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-15 05:38:18 +00:00
dde_bsd: add audio drivers ported from OpenBSD
These audio drivers enable support for Intel HD Audio (Azalia) and Ensoniq AudioPCI (ES1370) compatible soundcards. They are ported from OpenBSD 5.7. Fixes #1498.
This commit is contained in:
51
repos/dde_bsd/src/lib/audio/bsd.h
Normal file
51
repos/dde_bsd/src/lib/audio/bsd.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* \brief Audio driver BSD API emulation
|
||||
* \author Josef Soentgen
|
||||
* \date 2014-11-16
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2014-2015 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _BSD_H_
|
||||
#define _BSD_H_
|
||||
|
||||
/* Genode includes */
|
||||
#include <base/cache.h>
|
||||
#include <irq_session/capability.h>
|
||||
#include <os/server.h>
|
||||
|
||||
/* local includes */
|
||||
#include <scheduler.h>
|
||||
|
||||
namespace Bsd {
|
||||
|
||||
int probe_drivers();
|
||||
|
||||
void irq_init(Server::Entrypoint &ep);
|
||||
|
||||
void timer_init(Server::Entrypoint &ep);
|
||||
void update_time();
|
||||
|
||||
|
||||
/**************************
|
||||
** Bus_driver interface **
|
||||
**************************/
|
||||
|
||||
struct Bus_driver
|
||||
{
|
||||
virtual Genode::Irq_session_capability irq_session() = 0;
|
||||
|
||||
virtual Genode::addr_t alloc(Genode::size_t size, int align) = 0;
|
||||
virtual void free(Genode::addr_t virt, Genode::size_t size) = 0;
|
||||
virtual Genode::addr_t virt_to_phys(Genode::addr_t virt) = 0;
|
||||
virtual Genode::addr_t phys_to_virt(Genode::addr_t phys) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* _BSD_H_ */
|
Reference in New Issue
Block a user