From: sujith kumar reddy <sujithreddy6192@gmail.com>
To: folkert <folkert@vanheusden.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: arecord is failing with -V stereo
Date: Mon, 23 Aug 2021 22:01:44 +0530 [thread overview]
Message-ID: <CAAd2w=Z4rG1UwA6ELzqwr_0TXjQmD0T1izonAJk9-32TSzGchQ@mail.gmail.com> (raw)
In-Reply-To: <20210819190634.GW890690@belle.intranet.vanheusden.com>
Hi Folkert,
In all version it is crashing.
when i debug these i found that p value is coming negative at memset.
the function snippet is:
in aplay.c file in alsa-utils.
in the below function for c=0 it is working when c incremented to 1 the p
value is becoming negative . so memset is crashing.
static void print_vu_meter_stereo(int *perc, int *maxperc)
{
const int bar_length = 35;
char line[80];
int c;
memset(line, ' ', sizeof(line) - 1);
line[bar_length + 3] = '|';
for (c = 0; c < 2; c++) {
int p = perc[c] * bar_length / 100;
char tmp[4];
if (p > bar_length)
p = bar_length;
if (c)
memset(line + bar_length + 6 + 1, '#', p);
----------------//this is the line where it is crashing.here p value is
becoming negative at c=1.As we see if we change the p value to bar_length
it works fine ..As it is a player issue not a driver issue.
else
memset(line + bar_length - p - 1, '#', p);
p = maxperc[c] * bar_length / 100;
if (p > bar_length)
p = bar_length;
if (c)
line[bar_length + 6 + 1 + p] = '+';
else
line[bar_length - p - 1] = '+';
if (maxperc[c] > 99)
sprintf(tmp, "MAX");
else
sprintf(tmp, "%02d%%", maxperc[c]);
if (c)
memcpy(line + bar_length + 3 + 1, tmp, 3);
else
memcpy(line + bar_length, tmp, 3);
}
line[bar_length * 2 + 6 + 2] = 0;
fputs(line, stderr);
}
Could you please help on this.As the driver data is fine when we keep p
value to bar length and checked .
.
Thanks
Sujith
On Fri, Aug 20, 2021 at 12:36 AM folkert <folkert@vanheusden.com> wrote:
> > > > arecord is failing vumeter option -V stereo only.
> > >
> > > What version?
> > > Because the commandline you provide works fine here with
> 1.2.4-1ubuntu3.
> >
> > 1.2.1.2
>
> See what happens if you upgrade to 1.2.4.
>
next prev parent reply other threads:[~2021-08-23 16:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 18:04 arecord is failing with -V stereo sujith kumar reddy
2021-08-19 18:34 ` folkert
2021-08-19 18:43 ` sujith kumar reddy
2021-08-19 19:06 ` folkert
2021-08-23 16:31 ` sujith kumar reddy [this message]
2021-08-23 17:03 ` folkert
2021-08-23 18:44 ` sujith kumar reddy
2021-08-23 18:47 ` folkert
2021-08-23 19:06 ` sujith kumar reddy
2021-08-23 19:08 ` folkert
2021-08-23 19:33 ` sujith kumar reddy
2021-08-23 20:16 ` folkert
2021-08-24 1:15 ` sujith kumar reddy
2021-08-24 6:11 ` sujith kumar reddy
2021-08-24 8:12 ` Takashi Iwai
2021-08-24 9:19 ` sujith kumar reddy
2021-08-24 9:50 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2021-08-17 8:38 sujith kumar reddy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAd2w=Z4rG1UwA6ELzqwr_0TXjQmD0T1izonAJk9-32TSzGchQ@mail.gmail.com' \
--to=sujithreddy6192@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=folkert@vanheusden.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.