forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/sound/pci/hda/patch_via.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Universal Interface for Intel High Definition Audio Codec
34 *
....@@ -5,20 +6,6 @@
56 *
67 * (C) 2006-2009 VIA Technology, Inc.
78 * (C) 2006-2008 Takashi Iwai <tiwai@suse.de>
8
- *
9
- * This driver is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This driver is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
229 */
2310
2411 /* * * * * * * * * * * * * * Release History * * * * * * * * * * * * * * * * */
....@@ -52,7 +39,7 @@
5239 #include <linux/module.h>
5340 #include <sound/core.h>
5441 #include <sound/asoundef.h>
55
-#include "hda_codec.h"
42
+#include <sound/hda_codec.h>
5643 #include "hda_local.h"
5744 #include "hda_auto_parser.h"
5845 #include "hda_jack.h"
....@@ -410,7 +397,7 @@
410397 /* some delay here to make jack detection working (bko#98921) */
411398 msleep(10);
412399 codec->patch_ops.init(codec);
413
- regcache_sync(codec->core.regmap);
400
+ snd_hda_regmap_sync(codec);
414401 return 0;
415402 }
416403 #endif
....@@ -533,11 +520,11 @@
533520 if (err < 0)
534521 return err;
535522
536
- err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
523
+ err = auto_parse_beep(codec);
537524 if (err < 0)
538525 return err;
539526
540
- err = auto_parse_beep(codec);
527
+ err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
541528 if (err < 0)
542529 return err;
543530
....@@ -1054,6 +1041,7 @@
10541041 };
10551042
10561043 static const struct snd_pci_quirk vt2002p_fixups[] = {
1044
+ SND_PCI_QUIRK(0x1043, 0x13f7, "Asus B23E", VIA_FIXUP_POWER_SAVE),
10571045 SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75),
10581046 SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
10591047 SND_PCI_QUIRK_VENDOR(0x1558, "Clevo", VIA_FIXUP_POWER_SAVE),
....@@ -1065,8 +1053,8 @@
10651053 */
10661054 static void fix_vt1802_connections(struct hda_codec *codec)
10671055 {
1068
- static hda_nid_t conn_24[] = { 0x14, 0x1c };
1069
- static hda_nid_t conn_33[] = { 0x1c };
1056
+ static const hda_nid_t conn_24[] = { 0x14, 0x1c };
1057
+ static const hda_nid_t conn_33[] = { 0x1c };
10701058
10711059 snd_hda_override_conn_list(codec, 0x24, ARRAY_SIZE(conn_24), conn_24);
10721060 snd_hda_override_conn_list(codec, 0x33, ARRAY_SIZE(conn_33), conn_33);