aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_sysfs.c
AgeCommit message (Collapse)Author
2017-06-29ALSA: hda: constify attribute_group structures.Arvind Yadav
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/device.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 995 608 0 1603 643 sound/pci/hda/hda_sysfs.o File size After adding 'const': text data bss dec hex filename 1035 544 0 1579 62b sound/pci/hda/hda_sysfs.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-10ALSA: hda - Fix broken reconfigTakashi Iwai
The HD-audio reconfig function got broken in the recent kernels, typically resulting in a failure like: snd_hda_intel 0000:00:1b.0: control 3:0:0:Playback Channel Map:0 is already present This is because of the code restructuring to move the PCM and control instantiation into the codec drive probe, by the commit [bcd96557bd0a: ALSA: hda - Build PCMs and controls at codec driver probe]. Although the commit above removed the calls of snd_hda_codec_build_pcms() and *_build_controls() at the controller driver probe, the similar calls in the reconfig were still left forgotten. This caused the conflicting and duplicated PCMs and controls. The fix is trivial: just remove these superfluous calls from reconfig_codec(). Fixes: bcd96557bd0a ('ALSA: hda - Build PCMs and controls at codec driver probe') Reported-by: Jochen Henneberg <jh@henneberg-systemdesign.com> Cc: <stable@vger.kernel.org> # v4.1+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-15ALSA: hda - consolidate chip rename functionsTakashi Iwai
A few multiple codec drivers do renaming the chip_name string but all these are open-coded and some of them have even no error check. Let's make common helpers to do it properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Move a part of hda_codec stuff into hdac_deviceTakashi Iwai
Now some codes and functionalities of hda_codec struct are moved to hdac_device struct. A few basic attributes like the codec address, vendor ID number, FG numbers, etc are moved to hdac_device, and they are accessed like codec->core.addr. The basic verb exec functions are moved, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-23ALSA: hda - Move some codes up to hdac_bus structTakashi Iwai
A few basic codes for communicating over HD-audio bus are moved to struct hdac_bus now. It has only command and get_response ops in addition to the unsolicited event handling. Note that the codec-side tracing support is disabled temporarily during this transition due to the code shuffling. It will be re-enabled later once when all pieces are settled down. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-03ALSA: hda - Add card field to hda_codec structTakashi Iwai
Allow the codec object to have an individual card pointer. Not only this simplifies the redirections in many places, also this will allow us to make each codec assigned to a different card object. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-12-15ALSA: hda - Fix typos in snd_hda_get_int_hint() kerneldoc commentsTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29ALSA: hda - More kerneldoc commentsTakashi Iwai
Put more kerneldoc comments to the exported functions. Still the generic parser code and the HD-audio controller code aren't covered yet, though. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-09-17ALSA: hda - Replace strnicmp with strncasecmpRasmus Villemoes
The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25ALSA: hda - Replace with standard printkTakashi Iwai
Use dev_err() and co for messages from HD-audio controller and codec drivers. The codec drivers are mostly bound with codec objects, so some helper macros, codec_err(), codec_info(), etc, are provided. They merely wrap the corresponding dev_xxx(). There are a few places still calling snd_printk() and its variants as they are called without the codec or device context. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25ALSA: hda - Enable sysfs attributes without CONFIG_SND_HDA_RECONFIGTakashi Iwai
Some sysfs attributes like init_pin_configs or vendor_name are really basic and should be available no matter whether the codec driver is re-configurable or not. Put them out of #ifdef CONFIG_SND_HDA_RECONFIG and allow the read-only accesses. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-25ALSA: hda - Add sysfs to codec object, tooTakashi Iwai
We have currently sysfs attributes for each hwdep, but basically these should belong to the codec itself, per se. Let's add them to the codec object while keeping them for hwdep as is for compatibility. While we are at it, split the sysfs-related stuff into a separate source file, hda_sysfs.c, and keep only the stuff necessary for hwdep in hda_hwdep.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>