forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/sound/pci/hda/hda_generic.h
....@@ -1,16 +1,14 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Generic BIOS auto-parser helper functions for HD-audio
34 *
45 * Copyright (c) 2012 Takashi Iwai <tiwai@suse.de>
5
- *
6
- * This driver is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
106 */
117
128 #ifndef __SOUND_HDA_GENERIC_H
139 #define __SOUND_HDA_GENERIC_H
10
+
11
+#include <linux/leds.h>
1412
1513 /* table entry for multi-io paths */
1614 struct hda_multi_io {
....@@ -90,7 +88,6 @@
9088 unsigned int led_mode;
9189 unsigned int capture;
9290 unsigned int led_value;
93
- void (*update)(struct hda_codec *codec);
9491 void (*old_hook)(struct hda_codec *codec,
9592 struct snd_kcontrol *kcontrol,
9693 struct snd_ctl_elem_value *ucontrol);
....@@ -119,7 +116,7 @@
119116 * dig_out_nid and hp_nid are optional
120117 */
121118 hda_nid_t alt_dac_nid;
122
- hda_nid_t slave_dig_outs[3]; /* optional - for auto-parsing */
119
+ hda_nid_t follower_dig_outs[3]; /* optional - for auto-parsing */
123120 int dig_out_type;
124121
125122 /* capture */
....@@ -308,6 +305,9 @@
308305 struct hda_jack_callback *cb);
309306 void (*mic_autoswitch_hook)(struct hda_codec *codec,
310307 struct hda_jack_callback *cb);
308
+
309
+ /* leds */
310
+ struct led_classdev *led_cdevs[NUM_AUDIO_LEDS];
311311 };
312312
313313 /* values for add_stereo_mix_input flag */
....@@ -358,7 +358,11 @@
358358 void snd_hda_gen_stream_pm(struct hda_codec *codec, hda_nid_t nid, bool on);
359359 int snd_hda_gen_fix_pin_power(struct hda_codec *codec, hda_nid_t pin);
360360
361
-int snd_hda_gen_add_micmute_led(struct hda_codec *codec,
362
- void (*hook)(struct hda_codec *));
361
+int snd_hda_gen_add_mute_led_cdev(struct hda_codec *codec,
362
+ int (*callback)(struct led_classdev *,
363
+ enum led_brightness));
364
+int snd_hda_gen_add_micmute_led_cdev(struct hda_codec *codec,
365
+ int (*callback)(struct led_classdev *,
366
+ enum led_brightness));
363367
364368 #endif /* __SOUND_HDA_GENERIC_H */