Optional session label in audio_in/out connection

This commit is contained in:
Christian Helmuth 2024-12-04 08:39:58 +01:00
parent 3067a2c51d
commit 5665e8059a
2 changed files with 8 additions and 3 deletions

View File

@ -26,13 +26,16 @@ struct Audio_in::Connection : Genode::Connection<Session>, Audio_in::Session_cli
/**
* Constructor
*
* \param channel channel identifier (e.g., "left")
* \param label optional session label
* \param progress_signal install progress signal, the client may then
* call 'wait_for_progress', which is sent when the
* server processed one or more packets
*/
Connection(Genode::Env &env, char const *channel, bool progress_signal = false)
Connection(Genode::Env &env, char const *channel,
Label const &label = Label(), bool progress_signal = false)
:
Genode::Connection<Session>(env, Label(),
Genode::Connection<Session>(env, label,
Ram_quota { 10*1024 + sizeof(Stream) },
Args("channel=\"", channel, "\"")),
Session_client(env.rm(), cap(), progress_signal)

View File

@ -27,6 +27,7 @@ struct Audio_out::Connection : Genode::Connection<Session>, Audio_out::Session_c
* Constructor
*
* \param channel channel identifier (e.g., "front left")
* \param label optional session label
* \param alloc_signal install 'alloc_signal', the client may then use
* 'wait_for_alloc' when the stream is full
* \param progress_signal install progress signal, the client may then
@ -35,10 +36,11 @@ struct Audio_out::Connection : Genode::Connection<Session>, Audio_out::Session_c
*/
Connection(Genode::Env &env,
char const *channel,
Label const &label = Label(),
bool alloc_signal = true,
bool progress_signal = false)
:
Genode::Connection<Session>(env, Label(),
Genode::Connection<Session>(env, label,
Ram_quota { 2*4096 + 2048 + sizeof(Stream) },
Args("channel=\"", channel, "\"")),
Session_client(env.rm(), cap(), alloc_signal, progress_signal)