Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Mar 2011 12:58:50 +0200
From:      Andriy Gapon <avg@freebsd.org>
To:        Koop Mast <kwm@rainbow-runner.nl>
Cc:        gnome@freebsd.org, multimedia@freebsd.org, mkbosmans@gmail.com
Subject:   Re: pulseaudio: module.c: module-detect is deprecated: Please use module-udev-detect instead of module-detect!
Message-ID:  <4D6F746A.1020507@freebsd.org>
In-Reply-To: <1299109316.45274.34.camel@crashalot.rainbow-runner.nl>
References:  <4D6E558B.5090706@freebsd.org> <1299109316.45274.34.camel@crashalot.rainbow-runner.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
on 03/03/2011 01:41 Koop Mast said the following:
> 
> Could you give this patch a try? It should get rid of the message. Just
> put it in audio/pulseaudio/files.
> 
> http://people.freebsd.org/~kwm/patch-src_modules_module-detect.c

The patch works as expected.  Thank you!

BTW, I also found the following change necessary in my environment.
Without it I can not record from full-duplex devices, only play through them.

The problem seems to be that FreeBSD doesn't support the following usage pattern:
open(/dev/dsp, O_RDWR);
mmap(fd, PROT_READ);
mmap(fd, PROT_WRITE);

FreeBSD will only support writing in this case.
FreeBSD requires two separate file descriptors to be opened:
open(/dev/dsp, O_RDONLY);
open(/dev/dsp, O_WRONLY);
mmap(fd1, PROT_READ);
mmap(fd2, PROT_WRITE);

But implementing this approach would be a bigger change to the code.
So it's easier to just disable mmap on FreeBSD.

The obvious diff:
--- src/modules/oss/module-oss.c.orig	2010-11-26 02:45:23.000000000 +0200
+++ src/modules/oss/module-oss.c	2011-03-03 12:35:33.578266715 +0200
@@ -1164,7 +1164,7 @@
     int fd = -1;
     int nfrags, orig_frag_size, frag_size;
     int mode, caps;
-    pa_bool_t record = TRUE, playback = TRUE, use_mmap = TRUE;
+    pa_bool_t record = TRUE, playback = TRUE, use_mmap = FALSE;
     pa_sample_spec ss;
     pa_channel_map map;
     pa_modargs *ma = NULL;



Last note.  Each time I log into a KDE session I get the following message:
pulseaudio[NNNN]: pid.c: Daemon already running.
Looks like possibly some (minor) issue in automatic pulseaudio daemon startup?

Thank you again!
-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D6F746A.1020507>