Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package callaudiod for openSUSE:Factory 
checked in at 2024-11-01 21:04:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/callaudiod (Old)
 and      /work/SRC/openSUSE:Factory/.callaudiod.new.2020 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "callaudiod"

Fri Nov  1 21:04:43 2024 rev:5 rq:1219921 version:0.1.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/callaudiod/callaudiod.changes    2024-02-02 
15:47:44.821702525 +0100
+++ /work/SRC/openSUSE:Factory/.callaudiod.new.2020/callaudiod.changes  
2024-11-01 21:04:57.471888142 +0100
@@ -1,0 +2,7 @@
+Sun Oct 06 15:17:55 UTC 2024 - andrea.manz...@suse.com
+
+- Update to version 0.1.10:
+  * cad-pulse: improve profile selection
+  * cad-pulse: use glib functions instead of strcmp/strstr
+
+-------------------------------------------------------------------

Old:
----
  callaudiod-0.1.9.obscpio
  callaudiod-0.1.9.tar.xz

New:
----
  callaudiod-0.1.10.obscpio
  callaudiod-0.1.10.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ callaudiod.spec ++++++
--- /var/tmp/diff_new_pack.ukZtMA/_old  2024-11-01 21:04:58.883947152 +0100
+++ /var/tmp/diff_new_pack.ukZtMA/_new  2024-11-01 21:04:58.883947152 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package callaudiod
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
 %define apiver 0.1
 
 Name:           callaudiod
-Version:        0.1.9
+Version:        0.1.10
 Release:        0
 Summary:        Daemon for audio calls
 License:        GPL-3.0-or-later AND MIT

++++++ _service ++++++
--- /var/tmp/diff_new_pack.ukZtMA/_old  2024-11-01 21:04:58.911948322 +0100
+++ /var/tmp/diff_new_pack.ukZtMA/_new  2024-11-01 21:04:58.915948489 +0100
@@ -1,7 +1,7 @@
 <services>
   <service mode="disabled" name="obs_scm">
     <param name="url">https://gitlab.com/mobian1/callaudiod.git</param>
-    <param name="revision">refs/tags/0.1.9</param>
+    <param name="revision">refs/tags/0.1.10</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="scm">git</param>
     <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.ukZtMA/_old  2024-11-01 21:04:58.931949158 +0100
+++ /var/tmp/diff_new_pack.ukZtMA/_new  2024-11-01 21:04:58.935949325 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://gitlab.com/mobian1/callaudiod.git</param>
-              <param 
name="changesrevision">50d1ac3792aac03abe0a3a88ceac77201a43bb3b</param></service></servicedata>
+              <param 
name="changesrevision">56831297817afb6b30062b7cee3e40225ac39cac</param></service></servicedata>
 (No newline at EOF)
 

++++++ callaudiod-0.1.9.obscpio -> callaudiod-0.1.10.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/callaudiod-0.1.9/src/cad-pulse.c 
new/callaudiod-0.1.10/src/cad-pulse.c
--- old/callaudiod-0.1.9/src/cad-pulse.c        2023-05-16 09:14:33.000000000 
+0200
+++ new/callaudiod-0.1.10/src/cad-pulse.c       2024-07-02 11:38:46.000000000 
+0200
@@ -18,6 +18,7 @@
 
 #include <string.h>
 #include <stdio.h>
+#include <stdint.h>
 
 #define APPLICATION_NAME "CallAudio"
 #define APPLICATION_ID   "org.mobian-project.CallAudio"
@@ -81,7 +82,7 @@
     for (i = 0; i < source->n_ports; i++) {
         pa_source_port_info *port = source->ports[i];
 
-        if ((exclude && strcmp(port->name, exclude) == 0) ||
+        if ((exclude && g_strcmp0(port->name, exclude) == 0) ||
             port->available == PA_PORT_AVAILABLE_NO) {
             continue;
         }
@@ -150,7 +151,7 @@
     int i;
 
     prop = pa_proplist_gets(info->proplist, PA_PROP_DEVICE_CLASS);
-    if (prop && strcmp(prop, SINK_CLASS) != 0)
+    if (prop && g_strcmp0(prop, SINK_CLASS) != 0)
         return;
     if (info->monitor_of_sink != PA_INVALID_INDEX)
         return;
@@ -231,7 +232,7 @@
     for (i = 0; i < sink->n_ports; i++) {
         pa_sink_port_info *port = sink->ports[i];
 
-        if ((exclude && strcmp(port->name, exclude) == 0) ||
+        if ((exclude && g_strcmp0(port->name, exclude) == 0) ||
             port->available == PA_PORT_AVAILABLE_NO) {
             continue;
         }
@@ -300,7 +301,7 @@
     guint i;
 
     prop = pa_proplist_gets(info->proplist, PA_PROP_DEVICE_CLASS);
-    if (prop && strcmp(prop, SINK_CLASS) != 0)
+    if (prop && g_strcmp0(prop, SINK_CLASS) != 0)
         return;
     if (info->card != self->card_id || self->sink_id != -1)
         return;
@@ -318,7 +319,7 @@
         switch (port->type) {
           case PA_DEVICE_PORT_TYPE_SPEAKER:
             if (self->speaker_port) {
-                if (strcmp(port->name, self->speaker_port) != 0) {
+                if (g_strcmp0(port->name, self->speaker_port) != 0) {
                     g_free(self->speaker_port);
                     self->speaker_port = g_strdup(port->name);
                 }
@@ -330,7 +331,7 @@
           case PA_DEVICE_PORT_TYPE_HANDSET:
           case PA_DEVICE_PORT_TYPE_HEADPHONES:
             if (self->earpiece_port) {
-                if (strcmp(port->name, self->earpiece_port) != 0) {
+                if (g_strcmp0(port->name, self->earpiece_port) != 0) {
                     g_free(self->earpiece_port);
                     self->earpiece_port = g_strdup(port->name);
                 }
@@ -464,11 +465,11 @@
 
     prop = pa_proplist_gets(info->proplist, "alsa.card_name");
     g_debug("CARD: prop %s = %s", "alsa.card_name", prop);
-    if (prop && strstr(prop, CARD_MODEM_NAME) != 0)
+    if (prop && g_str_has_prefix(prop, CARD_MODEM_NAME))
         return;
     prop = pa_proplist_gets(info->proplist, PA_PROP_DEVICE_CLASS);
     g_debug("CARD: prop %s = %s", PA_PROP_DEVICE_CLASS, prop);
-    if (prop && strcmp(prop, CARD_MODEM_CLASS) == 0)
+    if (prop && g_strcmp0(prop, CARD_MODEM_CLASS) == 0)
         return;
 
     for (i = 0; i < info->n_ports; i++) {
@@ -502,7 +503,7 @@
     for (i = 0; i < info->n_profiles; i++) {
         pa_card_profile_info2 *profile = info->profiles2[i];
 
-        if (strstr(profile->name, SND_USE_CASE_VERB_VOICECALL) != NULL) {
+        if (g_str_has_prefix(profile->name, SND_USE_CASE_VERB_VOICECALL)) {
             self->has_voice_profile = TRUE;
             if (info->active_profile2 == profile)
                 self->audio_mode = CALL_AUDIO_MODE_CALL;
@@ -548,7 +549,7 @@
 
     g_debug("MODULE: idx=%u name='%s'", info->index, info->name);
 
-    if (strcmp(info->name, "module-switch-on-port-available") == 0) {
+    if (g_strcmp0(info->name, "module-switch-on-port-available") == 0) {
         g_debug("MODULE: unloading '%s'", info->name);
         op = pa_context_unload_module(ctx, info->index, NULL, NULL);
         if (op)
@@ -830,6 +831,7 @@
     CadPulseOperation *operation = data;
     pa_card_profile_info2 *profile;
     pa_operation *op = NULL;
+    const char *target_verb = NULL;
 
     if (eol != 0)
         return;
@@ -844,16 +846,35 @@
 
     profile = info->active_profile2;
 
-    if (strcmp(profile->name, SND_USE_CASE_VERB_VOICECALL) == 0 && 
operation->value == 0) {
+    if (g_str_has_prefix(profile->name, SND_USE_CASE_VERB_VOICECALL) && 
operation->value == 0) {
         g_debug("switching to default profile");
-        op = pa_context_set_card_profile_by_index(ctx, 
operation->pulse->card_id,
-                                                  SND_USE_CASE_VERB_HIFI,
-                                                  operation_complete_cb, 
operation);
-    } else if (strcmp(profile->name, SND_USE_CASE_VERB_HIFI) == 0 && 
operation->value == 1) {
+        target_verb = SND_USE_CASE_VERB_HIFI;
+    } else if (g_str_has_prefix(profile->name, SND_USE_CASE_VERB_HIFI) && 
operation->value == 1) {
         g_debug("switching to voice profile");
-        op = pa_context_set_card_profile_by_index(ctx, 
operation->pulse->card_id,
-                                                  SND_USE_CASE_VERB_VOICECALL,
-                                                  operation_complete_cb, 
operation);
+        target_verb = SND_USE_CASE_VERB_VOICECALL;
+    }
+
+    if (target_verb) {
+        uint32_t target_priority = 0;
+        const char *target_profile = NULL;
+
+        for (int i = 0; i < info->n_profiles; i++) {
+            profile = info->profiles2[i];
+
+            if (profile->available &&
+                g_str_has_prefix(profile->name, target_verb) &&
+                profile->priority > target_priority) {
+                target_profile = profile->name;
+                target_priority = profile->priority;
+            }
+        }
+
+        if (target_profile) {
+            g_debug("target profile: '%s'", target_profile);
+            op = pa_context_set_card_profile_by_index(ctx, 
operation->pulse->card_id,
+                                                      target_profile,
+                                                      operation_complete_cb, 
operation);
+        }
     }
 
     if (op) {
@@ -908,7 +929,7 @@
 
     g_debug("active port is '%s', target port is '%s'", 
info->active_port->name, target_port);
 
-    if (target_port && strcmp(info->active_port->name, target_port) != 0) {
+    if (target_port && g_strcmp0(info->active_port->name, target_port) != 0) {
         g_debug("switching to target port '%s'", target_port);
         op = pa_context_set_sink_port_by_index(ctx, operation->pulse->sink_id,
                                                target_port,

++++++ callaudiod-0.1.9.tar.xz -> callaudiod-0.1.10.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/callaudiod-0.1.9/src/cad-pulse.c 
new/callaudiod-0.1.10/src/cad-pulse.c
--- old/callaudiod-0.1.9/src/cad-pulse.c        2023-05-16 09:14:33.000000000 
+0200
+++ new/callaudiod-0.1.10/src/cad-pulse.c       2024-07-02 11:38:46.000000000 
+0200
@@ -18,6 +18,7 @@
 
 #include <string.h>
 #include <stdio.h>
+#include <stdint.h>
 
 #define APPLICATION_NAME "CallAudio"
 #define APPLICATION_ID   "org.mobian-project.CallAudio"
@@ -81,7 +82,7 @@
     for (i = 0; i < source->n_ports; i++) {
         pa_source_port_info *port = source->ports[i];
 
-        if ((exclude && strcmp(port->name, exclude) == 0) ||
+        if ((exclude && g_strcmp0(port->name, exclude) == 0) ||
             port->available == PA_PORT_AVAILABLE_NO) {
             continue;
         }
@@ -150,7 +151,7 @@
     int i;
 
     prop = pa_proplist_gets(info->proplist, PA_PROP_DEVICE_CLASS);
-    if (prop && strcmp(prop, SINK_CLASS) != 0)
+    if (prop && g_strcmp0(prop, SINK_CLASS) != 0)
         return;
     if (info->monitor_of_sink != PA_INVALID_INDEX)
         return;
@@ -231,7 +232,7 @@
     for (i = 0; i < sink->n_ports; i++) {
         pa_sink_port_info *port = sink->ports[i];
 
-        if ((exclude && strcmp(port->name, exclude) == 0) ||
+        if ((exclude && g_strcmp0(port->name, exclude) == 0) ||
             port->available == PA_PORT_AVAILABLE_NO) {
             continue;
         }
@@ -300,7 +301,7 @@
     guint i;
 
     prop = pa_proplist_gets(info->proplist, PA_PROP_DEVICE_CLASS);
-    if (prop && strcmp(prop, SINK_CLASS) != 0)
+    if (prop && g_strcmp0(prop, SINK_CLASS) != 0)
         return;
     if (info->card != self->card_id || self->sink_id != -1)
         return;
@@ -318,7 +319,7 @@
         switch (port->type) {
           case PA_DEVICE_PORT_TYPE_SPEAKER:
             if (self->speaker_port) {
-                if (strcmp(port->name, self->speaker_port) != 0) {
+                if (g_strcmp0(port->name, self->speaker_port) != 0) {
                     g_free(self->speaker_port);
                     self->speaker_port = g_strdup(port->name);
                 }
@@ -330,7 +331,7 @@
           case PA_DEVICE_PORT_TYPE_HANDSET:
           case PA_DEVICE_PORT_TYPE_HEADPHONES:
             if (self->earpiece_port) {
-                if (strcmp(port->name, self->earpiece_port) != 0) {
+                if (g_strcmp0(port->name, self->earpiece_port) != 0) {
                     g_free(self->earpiece_port);
                     self->earpiece_port = g_strdup(port->name);
                 }
@@ -464,11 +465,11 @@
 
     prop = pa_proplist_gets(info->proplist, "alsa.card_name");
     g_debug("CARD: prop %s = %s", "alsa.card_name", prop);
-    if (prop && strstr(prop, CARD_MODEM_NAME) != 0)
+    if (prop && g_str_has_prefix(prop, CARD_MODEM_NAME))
         return;
     prop = pa_proplist_gets(info->proplist, PA_PROP_DEVICE_CLASS);
     g_debug("CARD: prop %s = %s", PA_PROP_DEVICE_CLASS, prop);
-    if (prop && strcmp(prop, CARD_MODEM_CLASS) == 0)
+    if (prop && g_strcmp0(prop, CARD_MODEM_CLASS) == 0)
         return;
 
     for (i = 0; i < info->n_ports; i++) {
@@ -502,7 +503,7 @@
     for (i = 0; i < info->n_profiles; i++) {
         pa_card_profile_info2 *profile = info->profiles2[i];
 
-        if (strstr(profile->name, SND_USE_CASE_VERB_VOICECALL) != NULL) {
+        if (g_str_has_prefix(profile->name, SND_USE_CASE_VERB_VOICECALL)) {
             self->has_voice_profile = TRUE;
             if (info->active_profile2 == profile)
                 self->audio_mode = CALL_AUDIO_MODE_CALL;
@@ -548,7 +549,7 @@
 
     g_debug("MODULE: idx=%u name='%s'", info->index, info->name);
 
-    if (strcmp(info->name, "module-switch-on-port-available") == 0) {
+    if (g_strcmp0(info->name, "module-switch-on-port-available") == 0) {
         g_debug("MODULE: unloading '%s'", info->name);
         op = pa_context_unload_module(ctx, info->index, NULL, NULL);
         if (op)
@@ -830,6 +831,7 @@
     CadPulseOperation *operation = data;
     pa_card_profile_info2 *profile;
     pa_operation *op = NULL;
+    const char *target_verb = NULL;
 
     if (eol != 0)
         return;
@@ -844,16 +846,35 @@
 
     profile = info->active_profile2;
 
-    if (strcmp(profile->name, SND_USE_CASE_VERB_VOICECALL) == 0 && 
operation->value == 0) {
+    if (g_str_has_prefix(profile->name, SND_USE_CASE_VERB_VOICECALL) && 
operation->value == 0) {
         g_debug("switching to default profile");
-        op = pa_context_set_card_profile_by_index(ctx, 
operation->pulse->card_id,
-                                                  SND_USE_CASE_VERB_HIFI,
-                                                  operation_complete_cb, 
operation);
-    } else if (strcmp(profile->name, SND_USE_CASE_VERB_HIFI) == 0 && 
operation->value == 1) {
+        target_verb = SND_USE_CASE_VERB_HIFI;
+    } else if (g_str_has_prefix(profile->name, SND_USE_CASE_VERB_HIFI) && 
operation->value == 1) {
         g_debug("switching to voice profile");
-        op = pa_context_set_card_profile_by_index(ctx, 
operation->pulse->card_id,
-                                                  SND_USE_CASE_VERB_VOICECALL,
-                                                  operation_complete_cb, 
operation);
+        target_verb = SND_USE_CASE_VERB_VOICECALL;
+    }
+
+    if (target_verb) {
+        uint32_t target_priority = 0;
+        const char *target_profile = NULL;
+
+        for (int i = 0; i < info->n_profiles; i++) {
+            profile = info->profiles2[i];
+
+            if (profile->available &&
+                g_str_has_prefix(profile->name, target_verb) &&
+                profile->priority > target_priority) {
+                target_profile = profile->name;
+                target_priority = profile->priority;
+            }
+        }
+
+        if (target_profile) {
+            g_debug("target profile: '%s'", target_profile);
+            op = pa_context_set_card_profile_by_index(ctx, 
operation->pulse->card_id,
+                                                      target_profile,
+                                                      operation_complete_cb, 
operation);
+        }
     }
 
     if (op) {
@@ -908,7 +929,7 @@
 
     g_debug("active port is '%s', target port is '%s'", 
info->active_port->name, target_port);
 
-    if (target_port && strcmp(info->active_port->name, target_port) != 0) {
+    if (target_port && g_strcmp0(info->active_port->name, target_port) != 0) {
         g_debug("switching to target port '%s'", target_port);
         op = pa_context_set_sink_port_by_index(ctx, operation->pulse->sink_id,
                                                target_port,

++++++ callaudiod.obsinfo ++++++
--- /var/tmp/diff_new_pack.ukZtMA/_old  2024-11-01 21:04:59.099956179 +0100
+++ /var/tmp/diff_new_pack.ukZtMA/_new  2024-11-01 21:04:59.099956179 +0100
@@ -1,5 +1,5 @@
 name: callaudiod
-version: 0.1.9
-mtime: 1684221273
-commit: 50d1ac3792aac03abe0a3a88ceac77201a43bb3b
+version: 0.1.10
+mtime: 1719913126
+commit: 56831297817afb6b30062b7cee3e40225ac39cac
 

Reply via email to