Re: [PATCH 1/4] android/audio: Prefix error log with "a2dp"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lukasz,

On Thu, Jan 9, 2014 at 1:45 PM, Lukasz Rymanowski
<lukasz.rymanowski@xxxxxxxxx> wrote:
> ---
>  android/hal-audio.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
>
> diff --git a/android/hal-audio.c b/android/hal-audio.c
> index 59a8269..7a7c111 100644
> --- a/android/hal-audio.c
> +++ b/android/hal-audio.c
> @@ -423,7 +423,8 @@ static bool create_audio_ipc(void)
>         sk = socket(PF_LOCAL, SOCK_SEQPACKET, 0);
>         if (sk < 0) {
>                 err = errno;
> -               error("Failed to create socket: %d (%s)", err, strerror(err));
> +               error("a2dp: Failed to create socket: %d (%s)", err,
> +                                                               strerror(err));
>                 return false;
>         }
>
> @@ -435,13 +436,14 @@ static bool create_audio_ipc(void)
>
>         if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
>                 err = errno;
> -               error("Failed to bind socket: %d (%s)", err, strerror(err));
> +               error("a2dp: Failed to bind socket: %d (%s)", err,
> +                                                               strerror(err));
>                 goto failed;
>         }
>
>         if (listen(sk, 1) < 0) {
>                 err = errno;
> -               error("Failed to listen on the socket: %d (%s)", err,
> +               error("a2dp: Failed to listen on the socket: %d (%s)", err,
>                                                                 strerror(err));
>                 goto failed;
>         }
> @@ -449,7 +451,7 @@ static bool create_audio_ipc(void)
>         audio_sk = accept(sk, NULL, NULL);
>         if (audio_sk < 0) {
>                 err = errno;
> -               error("Failed to accept socket: %d (%s)", err, strerror(err));
> +               error("a2dp: Failed to accept socket: %d (%s)", err, strerror(err));
>                 goto failed;
>         }
>
> @@ -470,7 +472,7 @@ static void *ipc_handler(void *data)
>
>         while (!done) {
>                 if(!create_audio_ipc()) {
> -                       error("Failed to create listening socket");
> +                       error("a2dp: Failed to create listening socket");
>                         sleep(1);
>                         continue;
>                 }
> @@ -511,7 +513,7 @@ static int audio_open(const hw_module_t *module, const char *name,
>         DBG("");
>
>         if (strcmp(name, AUDIO_HARDWARE_INTERFACE)) {
> -               error("interface %s not matching [%s]", name,
> +               error("ad2p: interface %s not matching [%s]", name,
>                                                 AUDIO_HARDWARE_INTERFACE);
>                 return -EINVAL;
>         }
> @@ -547,7 +549,7 @@ static int audio_open(const hw_module_t *module, const char *name,
>         err = pthread_create(&ipc_th, NULL, ipc_handler, NULL);
>         if (err < 0) {
>                 ipc_th = 0;
> -               error("Failed to start Audio IPC thread: %d (%s)",
> +               error("a2dp: Failed to start Audio IPC thread: %d (%s)",
>                                                         -err, strerror(-err));
>                 return (-err);
>         }
> --
> 1.8.4

I prefer you use the term Audio as prefix e.g. Audo: Failed to start
IPC thread as this may be used for more than just A2DP.


-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux