Re: [PATCH] ALSA: hda/realtek: Refactor and simplify Samsung Galaxy Book init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Mon, 09 Sep 2024 21:30:00 +0200,
Joshua Grisham wrote:
> 
> I have done a lot of analysis for these type of devices and collaborated
> quite a bit with Nick Weihs (author of the first patch submitted for this
> including adding samsung_helper.c). More information can be found in the
> issue on Github [1] including additional rationale and testing.
> 
> The existing implementation includes a large number of equalizer coef
> values that are not necessary to actually init and enable the speaker
> amps, as well as create a somewhat worse sound profile. Users have
> reported "muffled" or "muddy" sound; more information about this including
> my analysis of the differences can be found in the linked Github issue.
> 
> This patch refactors the "v2" version of ALC298_FIXUP_SAMSUNG_AMP to a much
> simpler implementation which removes the new samsung_helper.c, reuses more
> of the existing patch_realtek.c, and sends significantly fewer unnecessary
> coef values (including removing all of these EQ-specific coef values).
> 
> A pcm_playback_hook is used to dynamically enable and disable the speaker
> amps only when there will be audio playback; this is to match the behavior
> of how the driver for these devices is working in Windows, and is
> suspected but not yet tested or confirmed to help with power consumption.
> 
> Support for models with 2 speaker amps vs 4 speaker amps is controlled by
> a specific quirk name for both types. A new int num_speaker_amps has been
> added to alc_spec so that the hooks can know how many speaker amps to
> enable or disable. This design was chosen to limit the number of places
> that subsystem ids will need to be maintained: like this, they can be
> maintained only once in the quirk table and there will not be another
> separate list of subsystem ids to maintain elsewhere in the code.
> 
> Also updated the quirk name from ALC298_FIXUP_SAMSUNG_AMP2 to
> ALC298_FIXUP_SAMSUNG_AMP_V2_.. as this is not a quirk for "Amp #2" on
> ALC298 but is instead a different version of how to handle it.
> 
> More devices have been added (see Github issue for testing confirmation),
> as well as a small cleanup to existing names.
> 
> [1]: https://github.com/thesofproject/linux/issues/4055#issuecomment-2323411911
> 
> Signed-off-by: Joshua Grisham <josh@xxxxxxxxxxxxxxxxx>

This looks like a nice cleanup.
Applied now.  Thanks.


Takashi




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux