From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, broonie@kernel.org,
lgirdwood@gmail.com, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH 1/3] ASOC: wm8991: fix wrong usage of DECLARE_TLV_DB_LINEAR()
Date: Tue, 27 Sep 2016 09:48:39 +0100 [thread overview]
Message-ID: <20160927084839.GX21682@localhost.localdomain> (raw)
In-Reply-To: <1474932329-10640-2-git-send-email-o-takashi@sakamocchi.jp>
On Tue, Sep 27, 2016 at 08:25:27AM +0900, Takashi Sakamoto wrote:
> As long as reading datasheet of WM8991, this driver includes wrong usage
> of DECLARE_TLV_DB_LINEAR().
>
> In "Table 6 Input PGA Volume Range", volume is represented in 5 bits by
> 1.5 dB/step between -16.5/30.0 dB. Thus, 'in_pga_tlv' should be dB step
> representation.
>
> In "Table 34 LOMIX and ROMIX Volume Range", volume is represented in three
> bits by -3 dB/step from 0 to -21 dB. Thus, 'out_mix_tlv' should be dB step
> represenation.
>
> In "Table 36 LOPGA, ROPGA, LOUT, ROUT and SPKVOL Volume Range", volume is
> represented in 7 bits by 1 dB/step from -73 to 6 dB, including mute. Thus,
> 'out_pga_tlv' should be dB step representation.
>
> In "Table 26 Digital Volume Range", volume is represented in 8 bits by
> 3/8 dB/step from -71.625 to 0 dB. Thus, 'out_dac_tlv' should be dB step
> representation.
>
> In "Table 16 ADC Digital Volume Range", volume is represented in 8 bits by
> 3/8 dB/step from -71.625 to 17.625 dB. Thus, 'in_adc_tlv' should be dB step
> representation.
>
> In "Table 23 Digital Sidetone Volume", volume is represented in 5 bits by
> 3 dB/step from -36 to 0 dB. Thus, 'out_sidetone_tlv' should be dB step
> representation.
>
> In "Table 12 Left Input Mixer Volume Control", volume is represented in
> 3 bits by 3 dB/step from -12 to 6 dB
>
> Totally, current implementation includes misuse of TLV-related macro.
>
> This commit replaces usage of DECLARE_TLV_DB_LINEAR() with proper macros,
> to give proper information to applications in user land.
>
> Fixes: 203db220718c ("ASoC: WM8991: Add initial WM8991 driver")
> Cc: patches@opensource.wolfsonmicro.com
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Thanks,
Charles
next prev parent reply other threads:[~2016-09-27 8:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 23:25 [PATCH 0/3] ASOC: wm8991/stac9766: fix wrong usage of TLV-related macro Takashi Sakamoto
2016-09-26 23:25 ` [PATCH 1/3] ASOC: wm8991: fix wrong usage of DECLARE_TLV_DB_LINEAR() Takashi Sakamoto
2016-09-27 8:48 ` Charles Keepax [this message]
2016-09-27 16:24 ` Applied "ASoC: wm8991: fix wrong usage of DECLARE_TLV_DB_LINEAR()" to the asoc tree Mark Brown
2016-09-26 23:25 ` [PATCH 2/3] ASOC: wm8991: remove unused variable Takashi Sakamoto
2016-09-27 8:48 ` Charles Keepax
2016-09-27 16:24 ` Applied "ASoC: wm8991: remove unused variable" to the asoc tree Mark Brown
2016-09-26 23:25 ` [PATCH 3/3] ASOC: stac9766: fix wrong usage of DECLARE_TLV_DB_LINEAR() Takashi Sakamoto
2016-09-27 16:24 ` Applied "ASoC: stac9766: fix wrong usage of DECLARE_TLV_DB_LINEAR()" to the asoc tree Mark Brown
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=20160927084839.GX21682@localhost.localdomain \
--to=ckeepax@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=o-takashi@sakamocchi.jp \
--cc=patches@opensource.wolfsonmicro.com \
--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 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).