All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Veness <john-linux@pelago.org.uk>
To: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org, Hector Martin <marcan@marcan.st>,
	Takashi Sakamoto <o-takashi@sakamocchi.jp>
Subject: Re: Quirks for MacroSilicon MS2100/MS2106
Date: Sat, 25 Jun 2022 11:17:09 +0100	[thread overview]
Message-ID: <32f309b8-2722-6baa-18ae-95ad05c8dc53@pelago.org.uk> (raw)
In-Reply-To: <YrZ8QDN5jobAq7jk@workstation>

Thanks for all the discussions so far. A lot of it is over my head, but 
I appreciate it!

> Even with this patch, there is a remaining problem, which is not present > in the MS2109. The sound sample values range from 0x0000 to 0x7fff, 
with> silence around 0x4000, i.e. 15-bit-ish audio. This actually sounds 
OK to> the ear (although half as loud as it should be), but looks odd 
when> looking at the waveform, and makes volume meters always think the 
sound> is very loud.
On further inspection, the last hex digit of the samples are always 0 or 
8. So the least significant three bits are always zero, and technically 
the values range from 0x0000 to 0x7ff8, not 0x7fff as I said before.

> To convert to s16le, I can bitshift one bit left, and subtract 32768.
> I'm told that this isn't something that can or should be done in the
> kernel, but should be in userspace. Any more advice on how to fix this
> remaining quirk would be very welcome.

I don't know if this makes things more complicated. It is still the case 
that the conversion described above to s16le makes the waveforms look 
correct (and the volume correct), even if the lowest four bits are zero.

John Veness

  reply	other threads:[~2022-06-25 10:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 20:23 Quirks for MacroSilicon MS2100/MS2106 John Veness
2022-06-23  5:58 ` Takashi Iwai
2022-06-23  7:18   ` Jaroslav Kysela
2022-06-23  8:24     ` Takashi Sakamoto
2022-06-23  8:51       ` Jaroslav Kysela
2022-06-25  3:08         ` Takashi Sakamoto
2022-06-25 10:17           ` John Veness [this message]
2022-06-24 14:11   ` John Veness

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=32f309b8-2722-6baa-18ae-95ad05c8dc53@pelago.org.uk \
    --to=john-linux@pelago.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=marcan@marcan.st \
    --cc=o-takashi@sakamocchi.jp \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.de \
    /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.