From 5706db1deb061ee9affdcea81e59c4c2cad7c41e Mon Sep 17 00:00:00 2001 From: "Kővágó, Zoltán" 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/coreaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'audio/coreaudio.c') diff --git a/audio/coreaudio.c b/audio/coreaudio.c index 5964c62eaf..20346bce6e 100644 --- a/audio/coreaudio.c +++ b/audio/coreaudio.c @@ -287,7 +287,8 @@ static int coreaudio_write (SWVoiceOut *sw, void *buf, int len) return audio_pcm_sw_write (sw, buf, len); } -static int coreaudio_init_out (HWVoiceOut *hw, struct audsettings *as) +static int coreaudio_init_out(HWVoiceOut *hw, struct audsettings *as, + void *drv_opaque) { OSStatus status; coreaudioVoiceOut *core = (coreaudioVoiceOut *) hw; -- cgit v1.2.3