ALSA: hda/via - Simplify control management
authorTakashi Iwai <tiwai@suse.de>
Wed, 20 Jun 2018 15:20:42 +0000 (17:20 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 25 Jun 2018 08:04:27 +0000 (10:04 +0200)
commit0e8f9862493a55d85d3351cb4517f2e4d95c9600
tree663f14d9ebcc4d22d2d278e04b134fdbc619e214
parentfcbdcc1a93dd49ccd0e0f34224ce1ba4203b75de
ALSA: hda/via - Simplify control management

This patch replaces the control element creations in VIA codec driver
with the standard snd_hda_gen_add_kctl() calls as a cleanup.  There
are two major fields targeted by this patch: the beep controls and
static init controls.

The former is converted just like other codec drivers do.  The
spec->beep_amp field can be eliminated by this change as well.

The latter, static init controls, are replaced simply with explicit
snd_hda_gen_add_kctl() calls.

After these conversions, via_build_controls() becomes superfluous and
replaced with snd_hda_gen_build_controls(), too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c