hda-emu: Implement tpacpi_set_led
PATCH 1/1 hda-emu: Implement tpacpi_set_led
This allows for testing the feature as well as avoiding a warning when testing the relevant codecs.
Signed-off-by David Henningsson <[email protected]>
--- include/wrapper.h | 3 +-- snd-wrapper.c | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-)
Note: the i915 power well functions probably needs implementing as well now that symbol_request is changed, but this does not seem to be a problem here, maybe because hda_i915 is not in the kernel/Makefile.am file?
include/wrapper.h +1 -2
@@ -238,8 +238,7 @@ void mylock_write_unlock(int *lock, const char *file, int line);/* FIXME */ #define IS_ENABLED (x) 1 -/* FIXME */ -#define symbol_request (x) NULL +#define symbol_request (x) x#define symbol_put (x)static inline long copy_from_user (void *to,const void __user *from,unsigned long n)
snd-wrapper.c +7 -0
@@ -720,3 +720,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,return 0 ; }EXPORT_SYMBOL_GPL (snd_pcm_add_chmap_ctls); + +int tpacpi_led_set (int whichled,bool on) +{ +hda_log (HDA_LOG_INFO ,"Setting thinkpad LED %d to %s\n" , whichled, on ?"on" :"off" ); +return 0 ; +} +
Signature · 1 line
1.7.9.5
Takashi Iwai
AppliedAt Fri, 1 Nov 2013 08:17:27 +0100,
Quoted 5 lines · David Henningsson
This allows for testing the feature as well as avoiding a warning when testing the relevant codecs.
Signed-off-by David Henningsson <[email protected]>
Thanks, applied.
Takashi
Quoted 41 lines
--- include/wrapper.h | 3 +-- snd-wrapper.c | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-)Note: the i915 power well functions probably needs implementing as well now that
symbol_requestis changed, but this does not seem to be a problem here, maybe becausehda_i915is not in thekernel/Makefile.amfile?include/wrapper.h +1
-2@@ -238,8 +238,7 @@ void mylock_write_unlock(int *lock, const char *file, int line);/* FIXME */ #define IS_ENABLED (x) 1 -/* FIXME */ -#define symbol_request (x) NULL +#define symbol_request (x) x#define symbol_put (x)static inline long copy_from_user (void *to,const void __user *from,unsigned long n)snd-wrapper.c +7
-0@@ -720,3 +720,10 @@ int snd_pcm_add_chmap_ctls(struct snd_pcm *pcm, int stream,return 0 ; }EXPORT_SYMBOL_GPL (snd_pcm_add_chmap_ctls); + +int tpacpi_led_set (int whichled,bool on) +{ +hda_log (HDA_LOG_INFO ,"Setting thinkpad LED %d to %s\n" , whichled, on ?"on" :"off" ); +return 0 ; +} +Signature · 1 line
1.7.9.5