From 5706db1deb061ee9affdcea81e59c4c2cad7c41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= Date: Wed, 3 Jun 2015 23:03:47 +0200 Subject: audio: expose drv_opaque to init_out and init_in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the opaque pointer returned by audio_driver's init is only exposed to the driver's fini, but not to audio_pcm_ops. This way if someone wants to share a variable with the driver and the pcm, he must use global variables. This patch fixes it by adding a third parameter to audio_pcm_op's init_out and init_in. Signed-off-by: Kővágó, Zoltán Signed-off-by: Gerd Hoffmann --- audio/ossaudio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'audio/ossaudio.c') diff --git a/audio/ossaudio.c b/audio/ossaudio.c index b9c6b30..27c6bc6 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -510,7 +510,8 @@ static void oss_fini_out (HWVoiceOut *hw) } } -static int oss_init_out (HWVoiceOut *hw, struct audsettings *as) +static int oss_init_out(HWVoiceOut *hw, struct audsettings *as, + void *drv_opaque) { OSSVoiceOut *oss = (OSSVoiceOut *) hw; struct oss_params req, obt; @@ -677,7 +678,7 @@ static int oss_ctl_out (HWVoiceOut *hw, int cmd, ...) return 0; } -static int oss_init_in (HWVoiceIn *hw, struct audsettings *as) +static int oss_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque) { OSSVoiceIn *oss = (OSSVoiceIn *) hw; struct oss_params req, obt; -- cgit v1.1