aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-01-15 11:00:35 +0100
committerTakashi Iwai <tiwai@suse.de>2020-01-16 17:29:17 +0100
commit2ba0176c709c103974cf55b6d373c4ea749c6391 (patch)
tree7ad0def740a156e30c9ffd2b9f147ad6ba67bdd7 /sound/core
parentALSA: usb-audio: add implicit fb quirk for MOTU M Series (diff)
downloadwireguard-linux-2ba0176c709c103974cf55b6d373c4ea749c6391.tar.xz
wireguard-linux-2ba0176c709c103974cf55b6d373c4ea749c6391.zip
ALSA: hda/analog - Minor optimization for SPDIF mux connections
AD HD-audio codec driver has a few code lines invoking snd_get_num_conns() and using its return value as the array index without checking. This is basically safe in all those places; at the second and later calls snd_get_num_conns() returns the value cached from the first invocation, hence the value is always consistent. However, it looks a bit confusing as if a lack of the proper check. This patch introduces a new field num_smux_conns in ad198x_spec for simplifying the code. Now we store and refer to the value more locally without invoking the extra function at each time. Reported-by: Colin King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200115100035.22511-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
0 files changed, 0 insertions, 0 deletions