arecord cannot interrupt streaming via CTRL-C when using voc_pcm_wirte()
diff mbox

Message ID B0FB33DC1499054591F62C0EF1E013D76845AF71@HI2EXCH01.adit-jv.com
State New
Headers show

Commit Message

Timo Wischer July 10, 2017, 7:47 a.m. UTC
Hi all,

please merge following patch:


From fb58aa47b8715924667a0a4383ce9a3615378413 Mon Sep 17 00:00:00 2001
From: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Date: Mon, 19 Dec 2016 14:04:39 +0530
Subject: alsa-utils: interrupt streaming via signal in voc_pcm_write

arecord (alsa-utils v1.1.2) cannot interrupt streaming
via CTRL-C. Fixed the issue by properly handling 'in_aborting'
flag in appropriate functions.

Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
---
 aplay/aplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.7.4



Best regards

Timo Wischer

Advanced Driver Information Technology GmbH
Software Group I (ADITG/ESB)
Robert-Bosch-Str. 200
31139 Hildesheim
Germany

Tel. +49 5121 49 6938
Fax +49 5121 49 6999
twischer@de.adit-jv.com

ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car Multimedia GmbH and DENSO Corporation
Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438
Geschäftsführung: Wilhelm Grabow, Ken Yaguchi

Comments

Takashi Iwai July 10, 2017, 1:27 p.m. UTC | #1
On Mon, 10 Jul 2017 09:47:43 +0200,
Wischer, Timo (ADITG/ESB) wrote:
> 
> Hi all,
> 
> please merge following patch:

Applied, thanks.


Takashi

> 
> 
> >From fb58aa47b8715924667a0a4383ce9a3615378413 Mon Sep 17 00:00:00 2001
> From: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
> Date: Mon, 19 Dec 2016 14:04:39 +0530
> Subject: alsa-utils: interrupt streaming via signal in voc_pcm_write
> 
> arecord (alsa-utils v1.1.2) cannot interrupt streaming
> via CTRL-C. Fixed the issue by properly handling 'in_aborting'
> flag in appropriate functions.
> 
> Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
> Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
> Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> ---
>  aplay/aplay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/aplay/aplay.c b/aplay/aplay.c
> index 2da7dda..cdaa1a8 100644
> --- a/aplay/aplay.c
> +++ b/aplay/aplay.c
> @@ -2161,7 +2161,7 @@ static ssize_t voc_pcm_write(u_char *data, size_t count)
>         ssize_t result = count, r;
>         size_t size;
> 
> -       while (count > 0) {
> +       while (count > 0 && !in_aborting) {
>                 size = count;
>                 if (size > chunk_bytes - buffer_pos)
>                         size = chunk_bytes - buffer_pos;
> --
> 2.7.4
> 
> 
> 
> Best regards
> 
> Timo Wischer
> 
> Advanced Driver Information Technology GmbH
> Software Group I (ADITG/ESB)
> Robert-Bosch-Str. 200
> 31139 Hildesheim
> Germany
> 
> Tel. +49 5121 49 6938
> Fax +49 5121 49 6999
> twischer@de.adit-jv.com
> 
> ADIT is a joint venture company of Robert Bosch GmbH/Robert Bosch Car Multimedia GmbH and DENSO Corporation
> Sitz: Hildesheim, Registergericht: Amtsgericht Hildesheim HRB 3438
> Geschäftsführung: Wilhelm Grabow, Ken Yaguchi
> From fb58aa47b8715924667a0a4383ce9a3615378413 Mon Sep 17 00:00:00 2001
> From: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
> Date: Mon, 19 Dec 2016 14:04:39 +0530
> Subject: alsa-utils: interrupt streaming via signal in voc_pcm_write
> 
> aplay/arecord (alsa-utils v1.1.2) cannot interrupt streaming
> via CTRL-C. Fixed the issue by properly handling 'in_aborting'
> flag in appropriate functions.
> 
> Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
> Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
> Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
> Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
> ---
>  aplay/aplay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/aplay/aplay.c b/aplay/aplay.c
> index 2da7dda..cdaa1a8 100644
> --- a/aplay/aplay.c
> +++ b/aplay/aplay.c
> @@ -2161,7 +2161,7 @@ static ssize_t voc_pcm_write(u_char *data, size_t count)
>  	ssize_t result = count, r;
>  	size_t size;
>  
> -	while (count > 0) {
> +	while (count > 0 && !in_aborting) {
>  		size = count;
>  		if (size > chunk_bytes - buffer_pos)
>  			size = chunk_bytes - buffer_pos;
> -- 
> 2.7.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Patch
diff mbox

From fb58aa47b8715924667a0a4383ce9a3615378413 Mon Sep 17 00:00:00 2001
From: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Date: Mon, 19 Dec 2016 14:04:39 +0530
Subject: alsa-utils: interrupt streaming via signal in voc_pcm_write

aplay/arecord (alsa-utils v1.1.2) cannot interrupt streaming
via CTRL-C. Fixed the issue by properly handling 'in_aborting'
flag in appropriate functions.

Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Srikanth Krishnakar <Srikanth_Krishnakar@mentor.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
---
 aplay/aplay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/aplay/aplay.c b/aplay/aplay.c
index 2da7dda..cdaa1a8 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -2161,7 +2161,7 @@  static ssize_t voc_pcm_write(u_char *data, size_t count)
 	ssize_t result = count, r;
 	size_t size;
 
-	while (count > 0) {
+	while (count > 0 && !in_aborting) {
 		size = count;
 		if (size > chunk_bytes - buffer_pos)
 			size = chunk_bytes - buffer_pos;
-- 
2.7.4