Commit 7919cd82 authored by Alastair Bridgewater's avatar Alastair Bridgewater Committed by Takashi Iwai

ALSA: hda/ca0132: Delete pointless assignments to struct auto_pin_cfg fields

ca0132_config() was setting some values in the auto_pin_cfg for
the codec... but it is called prior to snd_hda_parse_pin_defcfg(),
which does a memset() to clear the entire structure as one of its
first actions, making the entire exercise pointless.

Kill all use of struct auto_pin_cfg from ca0132_config().
Signed-off-by: default avatarAlastair Bridgewater <alastair.bridgewater@gmail.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d5a6cabf
...@@ -7343,7 +7343,6 @@ static const struct hda_codec_ops ca0132_patch_ops = { ...@@ -7343,7 +7343,6 @@ static const struct hda_codec_ops ca0132_patch_ops = {
static void ca0132_config(struct hda_codec *codec) static void ca0132_config(struct hda_codec *codec)
{ {
struct ca0132_spec *spec = codec->spec; struct ca0132_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->autocfg;
spec->dacs[0] = 0x2; spec->dacs[0] = 0x2;
spec->dacs[1] = 0x3; spec->dacs[1] = 0x3;
...@@ -7405,12 +7404,7 @@ static void ca0132_config(struct hda_codec *codec) ...@@ -7405,12 +7404,7 @@ static void ca0132_config(struct hda_codec *codec)
/* SPDIF I/O */ /* SPDIF I/O */
spec->dig_out = 0x05; spec->dig_out = 0x05;
spec->multiout.dig_out_nid = spec->dig_out; spec->multiout.dig_out_nid = spec->dig_out;
cfg->dig_out_pins[0] = 0x0c;
cfg->dig_outs = 1;
cfg->dig_out_type[0] = HDA_PCM_TYPE_SPDIF;
spec->dig_in = 0x09; spec->dig_in = 0x09;
cfg->dig_in_pin = 0x0e;
cfg->dig_in_type = HDA_PCM_TYPE_SPDIF;
break; break;
case QUIRK_R3DI: case QUIRK_R3DI:
codec_dbg(codec, "%s: QUIRK_R3DI applied.\n", __func__); codec_dbg(codec, "%s: QUIRK_R3DI applied.\n", __func__);
...@@ -7438,9 +7432,6 @@ static void ca0132_config(struct hda_codec *codec) ...@@ -7438,9 +7432,6 @@ static void ca0132_config(struct hda_codec *codec)
/* SPDIF I/O */ /* SPDIF I/O */
spec->dig_out = 0x05; spec->dig_out = 0x05;
spec->multiout.dig_out_nid = spec->dig_out; spec->multiout.dig_out_nid = spec->dig_out;
cfg->dig_out_pins[0] = 0x0c;
cfg->dig_outs = 1;
cfg->dig_out_type[0] = HDA_PCM_TYPE_SPDIF;
break; break;
default: default:
spec->num_outputs = 2; spec->num_outputs = 2;
...@@ -7463,12 +7454,7 @@ static void ca0132_config(struct hda_codec *codec) ...@@ -7463,12 +7454,7 @@ static void ca0132_config(struct hda_codec *codec)
/* SPDIF I/O */ /* SPDIF I/O */
spec->dig_out = 0x05; spec->dig_out = 0x05;
spec->multiout.dig_out_nid = spec->dig_out; spec->multiout.dig_out_nid = spec->dig_out;
cfg->dig_out_pins[0] = 0x0c;
cfg->dig_outs = 1;
cfg->dig_out_type[0] = HDA_PCM_TYPE_SPDIF;
spec->dig_in = 0x09; spec->dig_in = 0x09;
cfg->dig_in_pin = 0x0e;
cfg->dig_in_type = HDA_PCM_TYPE_SPDIF;
break; break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment