mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
ALSA: hda - Set function_id only on FG nodes
(Re)set function_id only from the value on FG nodes. The current code overrides the value with the last widget. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
4dc1f87f07
commit
93e82ae781
@ -642,19 +642,21 @@ static int get_codec_name(struct hda_codec *codec)
|
|||||||
*/
|
*/
|
||||||
static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec)
|
static void /*__devinit*/ setup_fg_nodes(struct hda_codec *codec)
|
||||||
{
|
{
|
||||||
int i, total_nodes;
|
int i, total_nodes, function_id;
|
||||||
hda_nid_t nid;
|
hda_nid_t nid;
|
||||||
|
|
||||||
total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
|
total_nodes = snd_hda_get_sub_nodes(codec, AC_NODE_ROOT, &nid);
|
||||||
for (i = 0; i < total_nodes; i++, nid++) {
|
for (i = 0; i < total_nodes; i++, nid++) {
|
||||||
codec->function_id = snd_hda_param_read(codec, nid,
|
function_id = snd_hda_param_read(codec, nid,
|
||||||
AC_PAR_FUNCTION_TYPE) & 0xff;
|
AC_PAR_FUNCTION_TYPE) & 0xff;
|
||||||
switch (codec->function_id) {
|
switch (function_id) {
|
||||||
case AC_GRP_AUDIO_FUNCTION:
|
case AC_GRP_AUDIO_FUNCTION:
|
||||||
codec->afg = nid;
|
codec->afg = nid;
|
||||||
|
codec->function_id = function_id;
|
||||||
break;
|
break;
|
||||||
case AC_GRP_MODEM_FUNCTION:
|
case AC_GRP_MODEM_FUNCTION:
|
||||||
codec->mfg = nid;
|
codec->mfg = nid;
|
||||||
|
codec->function_id = function_id;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user