Re: [pulseaudio-discuss] [PATCH v6 00/37] raop2 support for module-raop-sink

2016-02-10 Thread Arun Raghavan
Hi Hajime,
I'm still working on this, it's slow going since I have other things to
do in parallel.

It's a bit hard to review this work properly per-commit, so I'm going
to try to summarise the issues I've found at one go. 

* There are some style issues that I'm fixing up as I find, and I'll
just have that as a commit on top of your tree.

* While testing, I see there are two instances loaded every time (one
for IPv4 and one for IPv6) -- wouldn't it be more user friendly to make
sure we load only one? This doesn't appear to be a new issue, so not a
blocker on this series

* I tried this against Airserver on a Mac (worked) and a current
generation Apple TV (did not work) -- just got stuck trying to start
playback

Will reply again once I'm through the patch set.

Regards,
Arun

On Wed, 2016-02-10 at 18:50 -0600, Hajime Fujita wrote:
> Hi Arun,
> 
> Are you still going through the patches?
> If you are done, I'll submit a new series of patches that address
> your comments.
> 
> 
> Thanks,
> Hajime
> 
> Hajime Fujita wrote:
> > Arun Raghavan wrote:
> > > On Sun, 2016-01-31 at 22:15 -0600, Hajime Fujita wrote:
> > > > From: Hajime Fujita 
> > > > 
> > > > This is basically same as the previous patch series,
> > > > with several patches squashed for conciseness, rebased
> > > > on the latest master.
> > > > http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-O
> > > > ctober
> > > > /024547.html
> > > > 
> > > > This patch set adds a support for UDP version of RAOP (so
> > > > called
> > > > raop2). Most of the RAOP devices (e.g. AppleTV, AirportExpress,
> > > > third party AV receivers) today use UDP version, so this patch
> > > > set is expected to support those devices.
> > > > 
> > > > Also the patches can be seen from here:
> > > > https://github.com/hfujita/pulseaudio-raop2/compare/323dc5bf...
> > > > hf/rao
> > > > p2-v4-v8.0
> > > > 
> > > 
> > > Thank you for your perseverance in getting this through. I'm
> > > going to
> > > try to do a pass through the list in the coming days.
> > > 
> > > I'm using the raop2-v4-v8.0 branch. Please let me know if I
> > > should be
> > > looking at something else.
> > 
> > Hi Arun,
> > 
> > Thank you for taking a look at this.
> > Yes, that is the right one. I'll start addressing your comments.
> > 
> > 
> > Best,
> > Hajime
> > 
> > > 
> > > Regards,
> > > Arun
> > > ___
> > > pulseaudio-discuss mailing list
> > > pulseaudio-discuss@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> > > 
> > 
> > ___
> > pulseaudio-discuss mailing list
> > pulseaudio-discuss@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> > 
> 
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH v2] module-coreaudio-{device, detect}: implement record and playback modargs, curtesy of module-waveout.

2016-02-10 Thread Mihai Moldovan
Signed-off-by: Mihai Moldovan 
---
 src/modules/macosx/module-coreaudio-detect.c | 30 +---
 src/modules/macosx/module-coreaudio-device.c | 23 ++---
 2 files changed, 47 insertions(+), 6 deletions(-)

diff --git a/src/modules/macosx/module-coreaudio-detect.c 
b/src/modules/macosx/module-coreaudio-detect.c
index d9c09da..dd558c2 100644
--- a/src/modules/macosx/module-coreaudio-detect.c
+++ b/src/modules/macosx/module-coreaudio-detect.c
@@ -39,10 +39,14 @@ PA_MODULE_AUTHOR("Daniel Mack");
 PA_MODULE_DESCRIPTION("CoreAudio device detection");
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(true);
-PA_MODULE_USAGE("ioproc_frames= ");
+PA_MODULE_USAGE("ioproc_frames= "
+"record= "
+"playback= ");
 
 static const char* const valid_modargs[] = {
 "ioproc_frames",
+"record",
+"playback",
 NULL
 };
 
@@ -58,6 +62,8 @@ struct userdata {
 int detect_fds[2];
 pa_io_event *detect_io;
 unsigned int ioproc_frames;
+bool record;
+bool playback;
 PA_LLIST_HEAD(ca_device, devices);
 };
 
@@ -87,9 +93,9 @@ static int ca_device_added(struct pa_module *m, AudioObjectID 
id) {
 return 0;
 
 if (u->ioproc_frames)
-args = pa_sprintf_malloc("object_id=%d ioproc_frames=%d", (int) id, 
u->ioproc_frames);
+args = pa_sprintf_malloc("object_id=%d ioproc_frames=%d record=%d 
playback=%d", (int) id, u->ioproc_frames, (int) u->record, (int) u->playback);
 else
-args = pa_sprintf_malloc("object_id=%d", (int) id);
+args = pa_sprintf_malloc("object_id=%d record=%d playback=%d", (int) 
id, (int) u->record, (int) u->playback);
 
 pa_log_debug("Loading %s with arguments '%s'", DEVICE_MODULE_NAME, args);
 mod = pa_module_load(m->core, DEVICE_MODULE_NAME, args);
@@ -212,6 +218,7 @@ int pa__init(pa_module *m) {
 pa_modargs *ma;
 
 pa_assert(m);
+pa_assert(m->core);
 
 m->userdata = u;
 
@@ -220,6 +227,23 @@ int pa__init(pa_module *m) {
 goto fail;
 }
 
+/*
+ * Set default value to true if not given as a modarg.
+ * In such a case, pa_modargs_get_value_boolean() will not touch the
+ * buffer.
+ */
+u->playback = u->record = true;
+
+if (pa_modargs_get_value_boolean(ma, "record", &u->record) < 0 || 
pa_modargs_get_value_boolean(ma, "playback", &u->playback) < 0) {
+pa_log("record= and playback= expect boolean argument.");
+goto fail;
+}
+
+if (!u->playback && !u->record) {
+pa_log("neither playback nor record enabled for device.");
+goto fail;
+}
+
 pa_modargs_get_value_u32(ma, "ioproc_frames", &u->ioproc_frames);
 
 property_address.mSelector = kAudioHardwarePropertyDevices;
diff --git a/src/modules/macosx/module-coreaudio-device.c 
b/src/modules/macosx/module-coreaudio-device.c
index 93f57ed..a292d39 100644
--- a/src/modules/macosx/module-coreaudio-device.c
+++ b/src/modules/macosx/module-coreaudio-device.c
@@ -58,11 +58,15 @@ PA_MODULE_DESCRIPTION("CoreAudio device");
 PA_MODULE_VERSION(PACKAGE_VERSION);
 PA_MODULE_LOAD_ONCE(false);
 PA_MODULE_USAGE("object_id= "
-"ioproc_frames= ");
+"ioproc_frames= "
+"record= "
+"playback= ");
 
 static const char* const valid_modargs[] = {
 "object_id",
 "ioproc_frames",
+"record",
+"playback",
 NULL
 };
 
@@ -772,6 +776,7 @@ int pa__init(pa_module *m) {
 UInt32 size, frames;
 struct userdata *u = NULL;
 pa_modargs *ma = NULL;
+bool record = true, playback = true;
 char tmp[64];
 pa_card_new_data card_new_data;
 pa_card_profile *p;
@@ -786,6 +791,16 @@ int pa__init(pa_module *m) {
 goto fail;
 }
 
+if (pa_modargs_get_value_boolean(ma, "record", &record) < 0 || 
pa_modargs_get_value_boolean(ma, "playback", &playback) < 0) {
+pa_log("record= and playback= expect boolean argument.");
+goto fail;
+}
+
+if (!playback && !record) {
+pa_log("neither playback nor record enabled for device.");
+goto fail;
+}
+
 u = pa_xnew0(struct userdata, 1);
 u->module = m;
 m->userdata = u;
@@ -845,10 +860,12 @@ int pa__init(pa_module *m) {
 PA_LLIST_HEAD_INIT(coreaudio_sink, u->sinks);
 
 /* create sinks */
-ca_device_create_streams(m, false);
+if (playback)
+ca_device_create_streams(m, false);
 
 /* create sources */
-ca_device_create_streams(m, true);
+if (record)
+ca_device_create_streams(m, true);
 
 /* create the message thread */
 if (!(u->thread = pa_thread_new(u->device_name, thread_func, u))) {
-- 
2.7.1




signature.asc
Description: OpenPGP digital signature
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] module-coreaudio-{device, detect}: implement record and playback modargs, curtesy of module-waveout.

2016-02-10 Thread Mihai Moldovan
On 04.01.2016 06:17 AM, Arun Raghavan wrote:
> Sorry about the super late review. Shouldn't u->record and u->playback
> be true by default?

Sure, I messed that up. v2 incoming (also so that Patchwork catches it.)



Mihai




signature.asc
Description: OpenPGP digital signature
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH] default.pa.in: do not load module-console-kit and module-systemd-login if HAVE_COREAUDIO. It fails.

2016-02-10 Thread Mihai Moldovan
Just a resubmit to let Patchwork catch it.



Mihai



signature.asc
Description: OpenPGP digital signature
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH] default.pa.in: do not load module-console-kit and module-systemd-login if HAVE_COREAUDIO. It fails.

2016-02-10 Thread Mihai Moldovan
Signed-off-by: Mihai Moldovan 
---
 src/daemon/default.pa.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
index 7a68653..629fad5 100755
--- a/src/daemon/default.pa.in
+++ b/src/daemon/default.pa.in
@@ -140,12 +140,14 @@ load-module module-suspend-on-idle
 
 ### If autoexit on idle is enabled we want to make sure we only quit
 ### when no local session needs us anymore.
+ifelse(@HAVE_COREAUDIO@, 1, [], [dnl
 .ifexists module-console-kit@PA_SOEXT@
 load-module module-console-kit
 .endif
 .ifexists module-systemd-login@PA_SOEXT@
 load-module module-systemd-login
 .endif
+])dnl
 
 ### Enable positioned event sounds
 load-module module-position-event-sounds
-- 
2.7.1




signature.asc
Description: OpenPGP digital signature
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 3/3] coreaudio: Catch devices with more channels than we support

2016-02-10 Thread Mihai Moldovan
Regarding this, I submitted another patch a year ago that doesn't skip devices
with more channels than supported, but only exposes as many channels as
supported by PulseAudio.

I guess it would be beneficial to decide how to proceed on that front: either
drop devices with an unsupported number of channels completely, or restrict the
channels so that PA can still handle the device (and leave the other channels
"empty")?

My original idea of still using the device might not make most sense or be
ideal, but I felt that completely dropping it would be weird as well. What's
your take?



Mihai



signature.asc
Description: OpenPGP digital signature
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH v6 00/37] raop2 support for module-raop-sink

2016-02-10 Thread Hajime Fujita
Hi Arun,

Are you still going through the patches?
If you are done, I'll submit a new series of patches that address your comments.


Thanks,
Hajime

Hajime Fujita wrote:
> Arun Raghavan wrote:
>> On Sun, 2016-01-31 at 22:15 -0600, Hajime Fujita wrote:
>>> From: Hajime Fujita 
>>>
>>> This is basically same as the previous patch series,
>>> with several patches squashed for conciseness, rebased
>>> on the latest master.
>>> http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-October
>>> /024547.html
>>>
>>> This patch set adds a support for UDP version of RAOP (so called
>>> raop2). Most of the RAOP devices (e.g. AppleTV, AirportExpress,
>>> third party AV receivers) today use UDP version, so this patch
>>> set is expected to support those devices.
>>>
>>> Also the patches can be seen from here:
>>> https://github.com/hfujita/pulseaudio-raop2/compare/323dc5bf...hf/rao
>>> p2-v4-v8.0
>>>
>>
>> Thank you for your perseverance in getting this through. I'm going to
>> try to do a pass through the list in the coming days.
>>
>> I'm using the raop2-v4-v8.0 branch. Please let me know if I should be
>> looking at something else.
> 
> Hi Arun,
> 
> Thank you for taking a look at this.
> Yes, that is the right one. I'll start addressing your comments.
> 
> 
> Best,
> Hajime
> 
>>
>> Regards,
>> Arun
>> ___
>> pulseaudio-discuss mailing list
>> pulseaudio-discuss@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>>
> 
> ___
> pulseaudio-discuss mailing list
> pulseaudio-discuss@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> 

___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


Re: [pulseaudio-discuss] [PATCH 2/3] coreaudio: Dynamically allocate C string when converting from CFString

2016-02-10 Thread Mihai Moldovan
On 04.01.2016 08:15 AM, a...@accosted.net wrote:
> From: Arun Raghavan 
> 
> ---
>  src/modules/macosx/module-coreaudio-device.c | 60 
> +++-
>  1 file changed, 32 insertions(+), 28 deletions(-)
> 
> diff --git a/src/modules/macosx/module-coreaudio-device.c 
> b/src/modules/macosx/module-coreaudio-device.c
> index 0c92d42..78edc6b 100644
> --- a/src/modules/macosx/module-coreaudio-device.c
> +++ b/src/modules/macosx/module-coreaudio-device.c
> @@ -550,25 +553,26 @@ static int ca_device_create_source(pa_module *m, 
> AudioBuffer *buf, int channel_i
>  
>  for (i = 0; i < buf->mNumberChannels; i++) {
>  property_address.mSelector = kAudioObjectPropertyElementName;
> -property_address.mScope = kAudioDevicePropertyScopeInput;
> +property_address.mScope = kAudioDevicePropertyScopeOutput;

Uhm... what are you doing here? A source should be an input channel, right?


Everything else looks okay to me. Are you going to pick the patch? I have a few
changes that are dependent on this code, so I'd ask you to please pick it to
master and I'll base my patches on it.


Mihai



signature.asc
Description: OpenPGP digital signature
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] Rerouting an automatically created loopback?

2016-02-10 Thread Stefan Neufeind
Hi,

upon pairing a phone I automatically get an A2DP source. And when
playing sound from that phone it plays back on the PC through an
autocreated loopback.

However the loopbacked sound comes out of the wrong pair of speakers. In
"pavucontrol" under "Recording" I see the loopback and can mute it or
so. But I didn't find a way there so select what speakers the loopback
goes out through?

Or is there a "routing-GUI" (like with Jack?) besides the functionality
in pavucontrol?


Kind regards,
 Stefan
___
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss