All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Update omap/ams-delta for TTY API change
@ 2011-05-12 17:29 Janusz Krzysztofik
  2011-05-12 22:36 ` [RESEND][PATCH] " Janusz Krzysztofik
  0 siblings, 1 reply; 11+ messages in thread
From: Janusz Krzysztofik @ 2011-05-12 17:29 UTC (permalink / raw)
  To: alsa-devel, patches; +Cc: Mark Brown, Felipe Balbi, Liam Girdwood

Following the receive_buf() change to return the number of bytes 
received, the cx20442 CODEC driver was updated to report that we 
accepted all the data that was offered to us. Do the same with the 
corresponding Amstrad Delta sound card level wrapper function, which is 
actually registered as the tty line discipline callback instead of the 
the CODEC function, which it then calls.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
---
 sound/soc/omap/ams-delta.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- git/sound/soc/omap/ams-delta.c.orig	2011-04-09 00:39:54.000000000 
+0200
+++ git/sound/soc/omap/ams-delta.c	2011-05-12 18:50:33.000000000 +0200
@@ -331,7 +331,7 @@ static int cx81801_hangup(struct tty_str
 }
 
 /* Line discipline .recieve_buf() */
-static void cx81801_receive(struct tty_struct *tty,
+static unsigned int cx81801_receive(struct tty_struct *tty,
 				const unsigned char *cp, char *fp, int count)
 {
 	struct snd_soc_codec *codec = tty->disc_data;
@@ -347,7 +347,7 @@ static void cx81801_receive(struct tty_s
 		/* Initialize timer used for config pulse generation */
 		setup_timer(&cx81801_timer, cx81801_timeout, 0);
 
-		v253_ops.receive_buf(tty, cp, fp, count);
+		ret = v253_ops.receive_buf(tty, cp, fp, count);
 
 		/* Link hook switch to DAPM pins */
 		ret = snd_soc_jack_add_pins(&ams_delta_hook_switch,
@@ -358,10 +358,10 @@ static void cx81801_receive(struct tty_s
 				"Failed to link hook switch to DAPM pins, "
 				"will continue with hook switch unlinked.\n");
 
-		return;
+		return count;
 	}
 
-	v253_ops.receive_buf(tty, cp, fp, count);
+	ret = v253_ops.receive_buf(tty, cp, fp, count);
 
 	for (c = &cp[count - 1]; c >= cp; c--) {
 		if (*c != '\r')
@@ -381,6 +381,7 @@ static void cx81801_receive(struct tty_s
 						AMS_DELTA_LATCH2_MODEM_CODEC);
 		break;
 	}
+	return count;
 }
 
 /* Line discipline .write_wakeup() */

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-06-06 10:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12 17:29 [PATCH] ASoC: Update omap/ams-delta for TTY API change Janusz Krzysztofik
2011-05-12 22:36 ` [RESEND][PATCH] " Janusz Krzysztofik
2011-05-13  7:00   ` Mark Brown
2011-05-13  9:25     ` Liam Girdwood
2011-06-03 21:37       ` Janusz Krzysztofik
2011-06-06  9:53         ` Liam Girdwood
2011-06-06  9:58           ` Felipe Balbi
2011-06-06 10:37             ` Janusz Krzysztofik
2011-06-06 10:31   ` Mark Brown
2011-06-06 10:46     ` Janusz Krzysztofik
2011-06-06 10:57       ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.