.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Generic BIOS auto-parser helper functions for HD-audio |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
10 | 6 | */ |
---|
11 | 7 | |
---|
12 | 8 | #ifndef __SOUND_HDA_GENERIC_H |
---|
13 | 9 | #define __SOUND_HDA_GENERIC_H |
---|
| 10 | + |
---|
| 11 | +#include <linux/leds.h> |
---|
14 | 12 | |
---|
15 | 13 | /* table entry for multi-io paths */ |
---|
16 | 14 | struct hda_multi_io { |
---|
.. | .. |
---|
90 | 88 | unsigned int led_mode; |
---|
91 | 89 | unsigned int capture; |
---|
92 | 90 | unsigned int led_value; |
---|
93 | | - void (*update)(struct hda_codec *codec); |
---|
94 | 91 | void (*old_hook)(struct hda_codec *codec, |
---|
95 | 92 | struct snd_kcontrol *kcontrol, |
---|
96 | 93 | struct snd_ctl_elem_value *ucontrol); |
---|
.. | .. |
---|
119 | 116 | * dig_out_nid and hp_nid are optional |
---|
120 | 117 | */ |
---|
121 | 118 | 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 */ |
---|
123 | 120 | int dig_out_type; |
---|
124 | 121 | |
---|
125 | 122 | /* capture */ |
---|
.. | .. |
---|
308 | 305 | struct hda_jack_callback *cb); |
---|
309 | 306 | void (*mic_autoswitch_hook)(struct hda_codec *codec, |
---|
310 | 307 | struct hda_jack_callback *cb); |
---|
| 308 | + |
---|
| 309 | + /* leds */ |
---|
| 310 | + struct led_classdev *led_cdevs[NUM_AUDIO_LEDS]; |
---|
311 | 311 | }; |
---|
312 | 312 | |
---|
313 | 313 | /* values for add_stereo_mix_input flag */ |
---|
.. | .. |
---|
358 | 358 | void snd_hda_gen_stream_pm(struct hda_codec *codec, hda_nid_t nid, bool on); |
---|
359 | 359 | int snd_hda_gen_fix_pin_power(struct hda_codec *codec, hda_nid_t pin); |
---|
360 | 360 | |
---|
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)); |
---|
363 | 367 | |
---|
364 | 368 | #endif /* __SOUND_HDA_GENERIC_H */ |
---|