[alsa-devel] [PATCH] aplay: Fix header for raw format

Takashi Iwai tiwai at suse.de
Fri Jun 30 08:54:03 CEST 2017


On Thu, 29 Jun 2017 13:17:16 +0200,
Ion-Horia Petrisor wrote:
> 
> Raw format has no header, so use 0 when calling playback_go.

It's the value passed for the length that has been already loaded.
The program has read dta bytes for parsing the header, and it's raw
data without header.  Thus you need to pass dta there.


thanks,

Takashi

> 
> Signed-off-by: Ion-Horia Petrisor <ion-horia.petrisor at nxp.com>
> ---
>  aplay/aplay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/aplay/aplay.c b/aplay/aplay.c
> index 00af662..fe274ed 100644
> --- a/aplay/aplay.c
> +++ b/aplay/aplay.c
> @@ -2831,7 +2831,7 @@ static void playback(char *name)
>  		/* should be raw data */
>  		init_raw_data();
>  		pbrec_count = calc_count();
> -		playback_go(fd, dta, pbrec_count, FORMAT_RAW, name);
> +		playback_go(fd, 0, pbrec_count, FORMAT_RAW, name);
>  	}
>        __end:
>  	if (fd != 0)
> -- 
> 2.7.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 


More information about the Alsa-devel mailing list