From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>,
shumingf@realtek.com, broonie@kernel.org, lgirdwood@gmail.com
Cc: oder_chiou@realtek.com, jack.yu@realtek.com,
alsa-devel@alsa-project.org, lars@metafoo.de,
derek.fang@realtek.com, bard.liao@intel.com, flove@realtek.com,
pierre-louis.bossart@intel.com
Subject: Re: [PATCH v2] ASoC: rt1316: Add RT1316 SDCA vendor-specific driver
Date: Mon, 22 Feb 2021 09:48:39 -0600 [thread overview]
Message-ID: <e03dc0b5-80cf-1881-2be8-9d6fc2eafc4e@linux.intel.com> (raw)
In-Reply-To: <37e136a7-01de-412a-6527-e3b6b6038de1@perex.cz>
On 2/20/21 11:55 AM, Jaroslav Kysela wrote:
> Dne 18. 02. 21 v 15:49 Pierre-Louis Bossart napsal(a):
>>
>>
>> On 2/18/21 3:44 AM, Jaroslav Kysela wrote:
>>> Dne 18. 02. 21 v 10:12 shumingf@realtek.com napsal(a):
>>>
>>>> + SND_SOC_DAPM_SWITCH("DAC L", SND_SOC_NOPM, 0, 0, &rt1316_sto_dac_l),
>>>> + SND_SOC_DAPM_SWITCH("DAC R", SND_SOC_NOPM, 0, 0, &rt1316_sto_dac_r),
>>>
>>> Truly, I don't understand the reason to have a separate L/R switch when we can
>>> map this functionality to one stereo (multichannel) control.
>>>
>>> It's an issue for all ASoC drivers. We should consider to be more strict for
>>> the new ones.
>>
>> At the same time we have to recognize that the L/R notion only makes
>> sense at the input to the amplifier. The amplifier may recombine
>> channels to deal with orientation/posture or simply select a specific
>> input, and drive different speakers (e.g. tweeter/woofer). Dac L and R
>> are often an abuse of language when the system have multi-way speakers.
>> Exhibit A for this is the TigerLake device with 2 RT1316 and 4 speakers.
>> L/R don't make sense to describe amplifier outputs and speaker position.
>
> My point is a bit different. If the channels are supposed to be used together
> (which usually mean a kind of the stereo operation in this case), it does not
> make much sense to split this control to separate single channels. It's just a
> waste of resources.
In this case the control affects analog resources and speaker outputs,
so in this case I will assume that it's perfectly ok to have a single
speaker. Put differently, assuming that the two channels will always be
used is not quite right.
> The current patch code:
>
> one channel control "DAC L"
> one channel control "DAC R"
>
> The one control:
>
> two channels control "DAC"
>
> From the user space POV, the only difference is the value write operation
> (both channels are set using one ioctl).
SDCA mandates that all devices are able to consume stereo data, even if
there is a single speaker connected. It's useful IMHO if you provide
controls so that one of the two DACs is switched off.
>
>> There's also a difficult balance to be found between exposing all the
>> capabilities of the device, and making integration and userspace
>> simpler. I2C/IS2 and SoundWire devices tend to expose more controls than
>> HDaudio ones, and that was driven by a desire to optimize as much as
>> possible. Some devices are designed with limited number of controls,
>> others provide hooks to tweak everything in the system by exposing
>> literally have thousands of controls. I don't think we should pick and
>> choose which controls we want to expose, that's the codec vendor's job
>> IMHO (or the device class definition when standard and applicable)
>
> The problem with ASoC tree is that many of those controls are not supposed to
> be configured/used by the end user, but in UCM or other higher level layer
> configuration, because they're a part of the hw/driver setup.
>
> I think that we should classify those controls so the standard user space
> tools can hide them, but it's another problem.
>
> Jaroslav
>
prev parent reply other threads:[~2021-02-22 16:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-18 9:12 [PATCH v2] ASoC: rt1316: Add RT1316 SDCA vendor-specific driver shumingf
2021-02-18 9:44 ` Jaroslav Kysela
2021-02-18 14:49 ` Pierre-Louis Bossart
2021-02-20 17:55 ` Jaroslav Kysela
2021-02-22 13:35 ` Mark Brown
2021-02-22 15:48 ` Pierre-Louis Bossart [this message]
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=e03dc0b5-80cf-1881-2be8-9d6fc2eafc4e@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bard.liao@intel.com \
--cc=broonie@kernel.org \
--cc=derek.fang@realtek.com \
--cc=flove@realtek.com \
--cc=jack.yu@realtek.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=oder_chiou@realtek.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@intel.com \
--cc=shumingf@realtek.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.