diff mbox

alsa-lib: topology: improve verbose output for block output.

Message ID 1498828496-28897-2-git-send-email-liam.r.girdwood@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liam Girdwood June 30, 2017, 1:14 p.m. UTC
Show index and full DAPm route in verbose output.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 src/topology/builder.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Comments

Takashi Iwai June 30, 2017, 2:34 p.m. UTC | #1
On Fri, 30 Jun 2017 15:14:56 +0200,
Liam Girdwood wrote:
> 
> Show index and full DAPm route in verbose output.
> 
> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>

Applied, thanks.


Takashi

> ---
>  src/topology/builder.c | 13 ++++++++-----
>  1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/src/topology/builder.c b/src/topology/builder.c
> index ca5cbe1a..997df0c7 100644
> --- a/src/topology/builder.c
> +++ b/src/topology/builder.c
> @@ -67,9 +67,10 @@ static int write_block_header(snd_tplg_t *tplg, unsigned int type,
>  		exit(-EINVAL);
>  	}
>  
> -	verbose(tplg, " header type %d size 0x%lx/%ld vendor %d "
> -		"version %d\n", type, (long unsigned int)payload_size,
> -		(long int)payload_size, vendor_type, version);
> +	verbose(tplg, " header index %d type %d count %d size 0x%lx/%ld vendor %d "
> +		"version %d\n", index, type, count,
> +		(long unsigned int)payload_size, (long int)payload_size,
> +		vendor_type, version);
>  
>  	tplg->next_hdr_pos += hdr.payload_size + sizeof(hdr);
>  
> @@ -119,8 +120,10 @@ static int write_elem_block(snd_tplg_t *tplg,
>  					verbose(tplg, " %s '%s': write %d bytes\n",
>  						obj_name, elem->id, elem->size);
>  				else
> -					verbose(tplg, " %s '%s': write %d bytes\n",
> -						obj_name, elem->route->source, elem->size);
> +					verbose(tplg, " %s '%s -> %s -> %s': write %d bytes\n",
> +						obj_name, elem->route->source,
> +						elem->route->control,
> +						elem->route->sink, elem->size);
>  
>  				wsize = write(tplg->out_fd, elem->obj, elem->size);
>  				if (wsize < 0) {
> -- 
> 2.11.0
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
diff mbox

Patch

diff --git a/src/topology/builder.c b/src/topology/builder.c
index ca5cbe1a..997df0c7 100644
--- a/src/topology/builder.c
+++ b/src/topology/builder.c
@@ -67,9 +67,10 @@  static int write_block_header(snd_tplg_t *tplg, unsigned int type,
 		exit(-EINVAL);
 	}
 
-	verbose(tplg, " header type %d size 0x%lx/%ld vendor %d "
-		"version %d\n", type, (long unsigned int)payload_size,
-		(long int)payload_size, vendor_type, version);
+	verbose(tplg, " header index %d type %d count %d size 0x%lx/%ld vendor %d "
+		"version %d\n", index, type, count,
+		(long unsigned int)payload_size, (long int)payload_size,
+		vendor_type, version);
 
 	tplg->next_hdr_pos += hdr.payload_size + sizeof(hdr);
 
@@ -119,8 +120,10 @@  static int write_elem_block(snd_tplg_t *tplg,
 					verbose(tplg, " %s '%s': write %d bytes\n",
 						obj_name, elem->id, elem->size);
 				else
-					verbose(tplg, " %s '%s': write %d bytes\n",
-						obj_name, elem->route->source, elem->size);
+					verbose(tplg, " %s '%s -> %s -> %s': write %d bytes\n",
+						obj_name, elem->route->source,
+						elem->route->control,
+						elem->route->sink, elem->size);
 
 				wsize = write(tplg->out_fd, elem->obj, elem->size);
 				if (wsize < 0) {