* [PATCH] hw/audio/es1370: Clean up comment
@ 2023-11-10 16:43 Peter Maydell
2023-11-11 14:02 ` Volker Rümelin
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2023-11-10 16:43 UTC (permalink / raw)
To: qemu-devel
Cc: qemu-trivial, Gerd Hoffmann, Thomas Huth,
Daniel P . Berrangé
Replace a sweary comment with one that's a bit more helpful to
future readers of the code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/audio/es1370.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
index 91c47330ad3..fad55412119 100644
--- a/hw/audio/es1370.c
+++ b/hw/audio/es1370.c
@@ -670,8 +670,13 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel,
cnt += (transferred + d->leftover) >> 2;
if (s->sctl & loop_sel) {
- /* Bah, how stupid is that having a 0 represent true value?
- i just spent few hours on this shit */
+ /*
+ * loop_sel tells us which bit in the SCTL register to look at
+ * (either P1_LOOP_SEL, P2_LOOP_SEL or R1_LOOP_SEL). The sense
+ * of these bits is 0 for loop mode (set interrupt and keep recording
+ * when the sample count reaches zero) or 1 for stop mode (set
+ * interrupt and stop recording).
+ */
AUD_log ("es1370: warning", "non looping mode\n");
} else {
d->frame_cnt = size;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hw/audio/es1370: Clean up comment
2023-11-10 16:43 [PATCH] hw/audio/es1370: Clean up comment Peter Maydell
@ 2023-11-11 14:02 ` Volker Rümelin
0 siblings, 0 replies; 2+ messages in thread
From: Volker Rümelin @ 2023-11-11 14:02 UTC (permalink / raw)
To: Peter Maydell, qemu-devel
Cc: qemu-trivial, Gerd Hoffmann, Thomas Huth,
Daniel P . Berrangé
Am 10.11.23 um 17:43 schrieb Peter Maydell:
> Replace a sweary comment with one that's a bit more helpful to
> future readers of the code.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Volker Rümelin <vr_qemu@t-online.de>
> ---
> hw/audio/es1370.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c
> index 91c47330ad3..fad55412119 100644
> --- a/hw/audio/es1370.c
> +++ b/hw/audio/es1370.c
> @@ -670,8 +670,13 @@ static void es1370_transfer_audio (ES1370State *s, struct chan *d, int loop_sel,
> cnt += (transferred + d->leftover) >> 2;
>
> if (s->sctl & loop_sel) {
> - /* Bah, how stupid is that having a 0 represent true value?
> - i just spent few hours on this shit */
> + /*
> + * loop_sel tells us which bit in the SCTL register to look at
> + * (either P1_LOOP_SEL, P2_LOOP_SEL or R1_LOOP_SEL). The sense
> + * of these bits is 0 for loop mode (set interrupt and keep recording
> + * when the sample count reaches zero) or 1 for stop mode (set
> + * interrupt and stop recording).
> + */
> AUD_log ("es1370: warning", "non looping mode\n");
> } else {
> d->frame_cnt = size;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-11 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10 16:43 [PATCH] hw/audio/es1370: Clean up comment Peter Maydell
2023-11-11 14:02 ` Volker Rümelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).