diff --git a/repos/dde_bsd/include/audio/audio.h b/repos/dde_bsd/include/audio/audio.h index 3c3c255a79..f9236db405 100644 --- a/repos/dde_bsd/include/audio/audio.h +++ b/repos/dde_bsd/include/audio/audio.h @@ -24,17 +24,31 @@ ** private Audio namespace ** *****************************/ -namespace Audio { +namespace Audio_out { enum Channel_number { LEFT, RIGHT, MAX_CHANNELS, INVALID = MAX_CHANNELS }; +} + + +namespace Audio_in { + + enum Channel_number { LEFT, MAX_CHANNELS, INVALID = MAX_CHANNELS }; +} + + +namespace Audio { void init_driver(Server::Entrypoint &ep); bool driver_active(); - void dma_notifier(Genode::Signal_context_capability cap); + void play_sigh(Genode::Signal_context_capability cap); + + void record_sigh(Genode::Signal_context_capability cap); int play(short *data, Genode::size_t size); + + int record(short *data, Genode::size_t size); } #endif /* _AUDIO__AUDIO_H_ */ diff --git a/repos/dde_bsd/patches/notify.patch b/repos/dde_bsd/patches/notify.patch new file mode 100644 index 0000000000..c8f3a79237 --- /dev/null +++ b/repos/dde_bsd/patches/notify.patch @@ -0,0 +1,20 @@ +--- a/dev/audio.c ++++ b/dev/audio.c +@@ -2293,6 +2293,8 @@ + sc->sc_pqui = 1; + audio_wake(&sc->sc_wchan); + } ++ ++ notify_play(); + } + + /* +@@ -2400,6 +2402,8 @@ + sc->sc_rqui = 1; + audio_wake(&sc->sc_rchan); + } ++ ++ notify_record(); + } + + int diff --git a/repos/dde_bsd/ports/dde_bsd.hash b/repos/dde_bsd/ports/dde_bsd.hash index 3423971e99..061de5f27b 100644 --- a/repos/dde_bsd/ports/dde_bsd.hash +++ b/repos/dde_bsd/ports/dde_bsd.hash @@ -1 +1 @@ -8a8864f346418a483832c0fa28419f35fa3d5b78 +c560befb7c9f80152fcd720a2cef4272eded0e0f diff --git a/repos/dde_bsd/ports/dde_bsd.port b/repos/dde_bsd/ports/dde_bsd.port index 48a79f3317..606397b369 100644 --- a/repos/dde_bsd/ports/dde_bsd.port +++ b/repos/dde_bsd/ports/dde_bsd.port @@ -21,5 +21,6 @@ PATCHES := $(addprefix patches/,$(notdir $(wildcard $(REP_DIR)/patches/*.patch)) AUDIO_OPT := -p1 -d$(SRC_DIR_AUDIO) PATCH_OPT(patches/oppress_warning.patch) := $(AUDIO_OPT) PATCH_OPT(patches/azalia_c.patch) := $(AUDIO_OPT) +PATCH_OPT(patches/notify.patch) := $(AUDIO_OPT) # vi: set ft=make : diff --git a/repos/dde_bsd/src/drivers/audio_out/main.cc b/repos/dde_bsd/src/drivers/audio_out/main.cc index d4d74df699..720b18e0bc 100644 --- a/repos/dde_bsd/src/drivers/audio_out/main.cc +++ b/repos/dde_bsd/src/drivers/audio_out/main.cc @@ -4,22 +4,39 @@ * \date 2014-11-09 */ +/* + * 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. + */ + + +/* Genode includes */ +#include #include #include #include #include +#include #include #include #include +#include +/* local includes */ #include