mbox series

[alsa-lib,v2,0/3] mixer: Volume control fixes

Message ID 20210228161304.241288-1-hdegoede@redhat.com
Headers show
Series mixer: Volume control fixes | expand

Message

Hans de Goede Feb. 28, 2021, 4:13 p.m. UTC
Hi All,

Here is v2 of my series of alsa-lib volume-control fixes which I wrote
while working on adding hw-volume control to UCM profiles for various
x86 ASoC setups.

New in v2 is adding an extra entry to the capture_volume_names array
for the "ADC PGA Gain Volume" control used in the es8316 codec driver
in patch 3/3.

Note that patch 3/3 is not strictly necessary to make hw-volume control
work. At least the PA hw-vol-control code does not care if the controls
are wronly marked as global-volume-controls instead of
capture-volume-controls. I mostly wrote patch 3/3 because for
correctness reasons, so if it is deemed controversial we can drop it.

Regards,

Hans


Hans de Goede (3):
  mixer: Unify simple_none: base_len() exception handling
  mixer: Add exception for non " Volume" suffixed capture vol-ctls used
    in ASoC realtek codec drivers
  mixer: Add exception for some capture-vol-ctls which have a " Volume"
    suffix

 src/mixer/simple_none.c | 83 +++++++++++++++++++++++++++++++----------
 1 file changed, 64 insertions(+), 19 deletions(-)

Comments

Hans de Goede March 4, 2021, 9:50 p.m. UTC | #1
Hi All,

On 2/28/21 5:13 PM, Hans de Goede wrote:
> Hi All,
> 
> Here is v2 of my series of alsa-lib volume-control fixes which I wrote
> while working on adding hw-volume control to UCM profiles for various
> x86 ASoC setups.
> 
> New in v2 is adding an extra entry to the capture_volume_names array
> for the "ADC PGA Gain Volume" control used in the es8316 codec driver
> in patch 3/3.
> 
> Note that patch 3/3 is not strictly necessary to make hw-volume control
> work. At least the PA hw-vol-control code does not care if the controls
> are wronly marked as global-volume-controls instead of
> capture-volume-controls. I mostly wrote patch 3/3 because for
> correctness reasons, so if it is deemed controversial we can drop it.

Self-nack, I have some plans to make this more generic and I found
another set of control-names which need special handling (which is
the motivation to make the exception mechanism more generic).

I will post a new version sometime this weekend.

Regards,

Hans
Jaroslav Kysela March 5, 2021, 9:57 a.m. UTC | #2
Dne 04. 03. 21 v 22:50 Hans de Goede napsal(a):
> Hi All,
> 
> On 2/28/21 5:13 PM, Hans de Goede wrote:
>> Hi All,
>>
>> Here is v2 of my series of alsa-lib volume-control fixes which I wrote
>> while working on adding hw-volume control to UCM profiles for various
>> x86 ASoC setups.
>>
>> New in v2 is adding an extra entry to the capture_volume_names array
>> for the "ADC PGA Gain Volume" control used in the es8316 codec driver
>> in patch 3/3.
>>
>> Note that patch 3/3 is not strictly necessary to make hw-volume control
>> work. At least the PA hw-vol-control code does not care if the controls
>> are wronly marked as global-volume-controls instead of
>> capture-volume-controls. I mostly wrote patch 3/3 because for
>> correctness reasons, so if it is deemed controversial we can drop it.
> 
> Self-nack, I have some plans to make this more generic and I found
> another set of control-names which need special handling (which is
> the motivation to make the exception mechanism more generic).

I think that we should put the exceptions to a configuration file per driver,
but I haven't a time to propose a complete solution.

BTW: The first patch looks really straight, so I have a plan to merge it.

						Jaroslav
Hans de Goede March 5, 2021, 10:03 a.m. UTC | #3
Hi,

On 3/5/21 10:57 AM, Jaroslav Kysela wrote:
> Dne 04. 03. 21 v 22:50 Hans de Goede napsal(a):
>> Hi All,
>>
>> On 2/28/21 5:13 PM, Hans de Goede wrote:
>>> Hi All,
>>>
>>> Here is v2 of my series of alsa-lib volume-control fixes which I wrote
>>> while working on adding hw-volume control to UCM profiles for various
>>> x86 ASoC setups.
>>>
>>> New in v2 is adding an extra entry to the capture_volume_names array
>>> for the "ADC PGA Gain Volume" control used in the es8316 codec driver
>>> in patch 3/3.
>>>
>>> Note that patch 3/3 is not strictly necessary to make hw-volume control
>>> work. At least the PA hw-vol-control code does not care if the controls
>>> are wronly marked as global-volume-controls instead of
>>> capture-volume-controls. I mostly wrote patch 3/3 because for
>>> correctness reasons, so if it is deemed controversial we can drop it.
>>
>> Self-nack, I have some plans to make this more generic and I found
>> another set of control-names which need special handling (which is
>> the motivation to make the exception mechanism more generic).
> 
> I think that we should put the exceptions to a configuration file per driver,
> but I haven't a time to propose a complete solution.

Yes that would be ideal. But I don't have the time for that either.

What I do have in mind should be able to serve as a basis for that.

> BTW: The first patch looks really straight, so I have a plan to merge it.

That is fine, my planned re-write of this patch-set starts at patch 2   :)

Regards,

Hans