aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_local.h
Commit message (Collapse)AuthorAgeFilesLines
* remove compat from include, get new scripts workingWolfgang Wiedmeyer2015-10-231-17/+45
| | | | | further update code, especially sound remove initramfs files for galaxys2 and d710 and a busybox binary
* ALSA: hda - Return the error from get_wcaps_type() for invalid NIDsTakashi Iwai2012-01-251-1/+6
| | | | | | | | | | | | | | | | | commit 3a90274de3548ebb2aabfbf488cea8e275a73dc6 upstream. When an invalid NID is given, get_wcaps() returns zero as the error, but get_wcaps_type() takes it as the normal value and returns a bogus AC_WID_AUD_OUT value. This confuses the parser. With this patch, get_wcaps_type() returns -1 when value 0 is given, i.e. an invalid NID is passed to get_wcaps(). Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740118 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ALSA: hda - Check unsol-cap in is_jack_detectalbe()Takashi Iwai2011-05-171-1/+2
| | | | | | Also replace more open-codes with this function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add automute-mode enum to Conexant auto-parserTakashi Iwai2011-05-171-0/+5
| | | | | | | | Implement the same functionality as Realtek's auto-mute mode control. Now Conexant auto-parser can also mutes line-out and provide the enum control for different automute behavior. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Constify some API function argumentsTakashi Iwai2011-05-021-3/+3
| | | | | | Also fixed the assignment of multiout.dac_nids to satisfy const. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Constify some API function argumentsTakashi Iwai2011-05-021-2/+2
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make common input-jack helper functionsTakashi Iwai2011-03-031-0/+24
| | | | | | | Since multiple codec drivers already use the input-jack stuff, let's make common helper functions to reduce the duplicated codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - consitify string arraysTakashi Iwai2011-01-181-3/+3
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Sigmatel: work around incorrect master mutingClemens Ladisch2010-10-171-4/+10
| | | | | | | | | | | | | | | | | | The HDA specification does not allow for a codec to mute itself just because the volume is reduced, so _of course_ somebody had to go and do it. This wouldn'\''t hurt too much when the volume is adjusted by hand, but programs like PA that try to set the volume automatically could inadvertently mute the output. To work around this, change the TLV dB information for the Master volume on all Sigmatel HDA codecs to indicate the the minimal volume setting actually mutes. Reported-by: Colin Guthrie <gmane@colin.guthr.ie> Reported-by: "Alexander E. Patrakov" <patrakov@gmail.com> Tested-by: Colin Guthrie <cguthrie@mandriva.org> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make snd_hda_get_input_pin_attr() helperTakashi Iwai2010-09-171-0/+11
| | | | | | | | Make the helper function to give the input-pin attribute for jack connectivity and location. This simplifies checks of input-pin jacks a bit in some places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Improve the input source name labelsTakashi Iwai2010-09-091-4/+7
| | | | | | | | This patch improves the input-source label strings to be generated from the pin information instead of fixed strings per AUTO_PIN_* type. This gives more suitable labels, especially for mic and line-in pins. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove AUTO_PIN_FRONT_{MIC|LINE}Takashi Iwai2010-09-091-4/+1
| | | | | | | | We can assign multiple pins to a single role now, let's reduce the redundant FRONT_MIC and FRONT_LINE. Also, autocfg->input_pins[] is no longer used, so this is removed as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Keep char arrays in input_mux itemsTakashi Iwai2010-09-091-3/+3
| | | | | | | | Keep char array in the input_mux item itself instead of pointing to an external string. This is a preliminary work for improving the input-mux name based on the pin role. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add snd_hda_get_input_pin_label() helper functionTakashi Iwai2010-08-301-0/+2
| | | | | | | Added snd_hda_get_input_pin_label() helper function to return the string that can be used for control or capture-source ids. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add inputs[] to auto_pin_cfg structTakashi Iwai2010-08-301-1/+11
| | | | | | | | | | Added the new fields to contain all input-pins to struct auto_pin_cfg. Unlike the existing input_pins[], this array contains all input pins even if the multiple pins are assigned for a single role (i.e. two front mics). The former input_pins[] still remains for a while, but will be removed in near future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Restrict PCM parameters per ELD information over HDMITakashi Iwai2010-08-131-0/+2
| | | | | | | | | | | | | | | When a device is plugged over HDMI, it passes some information in ELD including the supported PCM parameters like formats, rates, channels. This patch adds the check to PCM open callback of HDMI streams so that only valid parameters the device supports are used. When no device is plugged, the parameters the codec supports are used; it's mostly all parameters the hardware can work. This is for apps that are started before device plugging and do probing (e.g. a sound daemon), so that at least, probing would work even before the device plugging. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* fix comment typo in sound/pci/hda/hda_local.hJustin P. Mattock2010-03-191-1/+1
| | | | | | | | I think this should be automatic pin instead of ping. (but could be wrong). Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* ALSA: hda - Fix NID association for capture mixersTakashi Iwai2009-12-231-2/+0
| | | | | | | | Fix the wrong implementation of NID <-> kctl mapping for capture mixers introduced by the ocmmit 5b0cb1d850c26893b1468b3a519433a1b7a176be. So far, the driver returns an error at probe. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - simplify usage of HDA_SUBDEV_AMP_FLAGJaroslav Kysela2009-12-151-3/+3
| | | | | | | The HDA_SUBDEV_NID_FLAG is duplicate for amplifier control elements. Move get_amp_nid_() call to the snd_hda_ctl_add() function. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - introduce HDA_SUBDEV_AMP_FLAG (ControlAmp in proc)Jaroslav Kysela2009-12-151-3/+8
| | | | | | | | | | | | The purpose of this changeset is to show information about amplifier setting in the codec proc file. Something like: Control: name="Front Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Front Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=In, idx=2, ofs=0 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - add more NID->Control mappingJaroslav Kysela2009-12-151-0/+5
| | | | | | | | This set of changes add missing NID values to some static control elemenents. Also, it handles all "Capture Source" or "Input Source" controls. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ALSA: hda - introduce snd_hda_jack_detect() and snd_hda_pin_sense()Wu Fengguang2009-11-181-0/+2
| | | | | | | | | This helps merge duplicate code. v2: add snd_hda_jack_detect() and comments recommended by Takashi. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: intelhdmi - export monitor-presence and ELD-valid statusWu Fengguang2009-11-181-1/+3
| | | | | Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix build errors with CONFIG_SND_HDA_INPUT_BEEP=nTakashi Iwai2009-11-161-0/+8
| | | | | | Disable beep-related codes when CONFIG_SND_HDA_INPUT_BEEP isn't set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - move snd_hda_pcm_type_name from hda_codec.h to hda_local.hJaroslav Kysela2009-11-161-0/+2
| | | | | | | The snd_hda_pcm_type_name array is local only. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Get rid of magic digits for subdev hackTakashi Iwai2009-11-161-3/+12
| | | | | | | Define a proper const for a magic 31bit flag for subdev / NID setup with a brief comment. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - proc - add support for dynamic controls to mixer<->NID mappingJaroslav Kysela2009-11-161-0/+3
| | | | | | | | This patch adds support for dynamically created controls to proc codec file (Control: lines). Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - proc - introduce Control: lines to show mixer<->NID assignmentJaroslav Kysela2009-11-161-2/+9
| | | | | | | | This is an initial patch to show universal control<->NID assigment in proc codec file. The change helps to debug codec related problems. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda_intel: Digital PC Beep - change behaviour for input layerJaroslav Kysela2009-11-161-0/+15
| | | | | | | | | | | | | | | | Original implementation was keeping registered input device for SND_BEEP and SND_TONE events all time. This patch changes this behaviour: If digital PC Beep is turned off using universal control switch, the input device is unregistered. Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last registered device acceping those events. It means that the HDA Intel audio driver blocks also the internal PC Speaker device (pcspkr.c driver) even if the HDA Beep is muted. The user can easy disable all beeps using 'setterm -blength 0' or 'xset b off' command. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix build error without CONFIG_SND_HDA_HWDEP=yTakashi Iwai2009-11-121-1/+1
| | | | | | | CONFIG_SND_HDA_POWER_SAVE is independent from CONFIG_SND_HDA_HWDEP. Thus snd_hda_hwdep_add_power_sysfs() needs the check of both kconfigs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add power on/off counterTakashi Iwai2009-11-111-0/+9
| | | | | | | | | | Added the power on/off counter and expose via sysfs files. The sysfs files, power_on_acct and power_off_acct, are created under each codec hwdep sysfs directory (e.g. /sys/class/sound/hwC0D0). The files show the msec length of the codec power-on and power-off, respectively. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - vectorize intelhdmiWu Fengguang2009-10-301-2/+4
| | | | | | | | | | | | | | | | | The Intel IbexPeak HDMI codec supports 2 converters and 3 pins, which requires converting the cvt_nid/pin_nid to arrays. The active pin number (the one connected with a live HDMI monitor/sink) will be dynamically identified on hotplug events. It exports two HDMI devices, so that user space can choose the A/V pipe for sending the audio samples. It's still undefined behavior when there are two active monitors connected and routed to the same audio converter. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda: move open coded tricks into get_wcaps_channels()Wu Fengguang2009-08-241-0/+10
| | | | | Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Introduce get_wcaps_type() macroTakashi Iwai2009-07-271-0/+3
| | | | | | Add a helper macro to retrieve the widget type from wiget cap bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()Takashi Iwai2009-06-241-1/+0
| | | | | | | | | | The codec setup call via snd_hda_codec_configure() isn't necessarily called in snd_hda_codec_new(). For the later added feature, it's better to change the code flow like: - create all codec instances - configure each codec Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Cache pin-cap valuesTakashi Iwai2009-03-231-0/+1
| | | | | | | Added snd_hda_query_pin_caps() to read and cache pin-cap values to avoid too frequently issuing the same verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add hint string helper functionsTakashi Iwai2009-03-021-0/+17
| | | | | | | | | Added snd_hda_get_hint() and snd_hda_get_bool_hint() helper functions to retrieve a hint value. Internally, the hint is stored in a pair of two strings, key and val. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sound/pci/hda: fix sparse warning: different signednessHannes Eder2009-02-261-1/+1
| | | | | | | | | | Fix this sparse warning: sound/pci/hda/hda_codec.c:1544:19: warning: incorrect type in assignment (different signedness) sound/pci/hda/hda_codec.c:1544:19: expected unsigned long *vals sound/pci/hda/hda_codec.c:1544:19: got long *<noident> Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add pseudo device-locking for clear/reconfigTakashi Iwai2009-02-231-1/+1
| | | | | | | Added the pseudo device-locking using card->shutdown flag to avoid the crash via clear/reconfig during operations. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-02-131-0/+2
|\
| * ALSA: hda - Add snd_hda_multi_out_dig_cleanup()Takashi Iwai2009-02-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Added the helper function snd_hda_multi_out_dig_cleanup() to clean up the digital outputs with multi setup. This call is needed in cases the codec supports multiple digital outputs as slaves. Otherwise the slave widgets aren't properly cleaned up. For a single digital output (e.g. in patch_conexant.c), this call isn't needed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Detect multiple digital-out pinsTakashi Iwai2009-02-121-2/+3
| | | | | | | | | | | | | | | | | | Detect multiple digital-out pins in snd_hda_parse_pin_defconfig(). The dig_out_pin and dig_out_type fields become arrays. The codec parser still doesn't use this multiple pins detection, though. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: enable concurrent digital outputs for ALC1200Wu Fengguang2009-02-061-0/+1
| | | | | | | | | | | | | | | | | | Add the SPDIF pin as slave digital out to enable concurrent HDMI/SPDIF outputs for ASUS M3A-H/HDMI with ALC1200 codec. Tested-by: Thomas Schneider <nailstudio@gmx.net> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'test/hda-vol-ofs' into next/hdaTakashi Iwai2009-01-221-1/+4
|\ \
| * | ALSA: hda - Add extra volume offset to standard volume amp macrosTakashi Iwai2009-01-201-1/+4
| |/ | | | | | | | | | | | | | | Added the volume offset to base for the standard volume controls to handle elements with too big volume scales like -96dB..0dB. For such elements, you can set the base volume to reduce the range. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Check HDMI jack types in the auto configurationTakashi Iwai2009-01-201-0/+2
|/ | | | | | | | Add dig_out_type and dig_in_type fields to autocfg struct. A proper HDA_PCM_TYPE_* value is assigned to these fields according to the pin-jack location type value. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add a new function to seek for a codec IDMauro Carvalho Chehab2008-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Gateway notebooks have their ID inside codec vendor ID, not at PCI ID. Due to that, model auto-detection were not possible with the standard seek method. This is what is found at lspci -vnn: 00:14.2 Audio device [0403]: ATI Technologies Inc SB450 HDA Audio [1002:437b] (rev 01) Subsystem: ATI Technologies Inc SB450 HDA Audio [1002:437b] Yet, autodetection is possible, since the codec properly reflects the vendor at the Subsystem ID: $ cat /proc/asound/card0/codec#0 |head -4 Codec: SigmaTel STAC9250 Address: 0 Vendor Id: 0x83847634 Subsystem Id: 0x107b0367 This patch adds a new autodetection function that seeks for codec subsystem ID. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make CONFIG_SND_HDA_RECONFIG for codec reconfigurationTakashi Iwai2008-11-211-1/+9
| | | | | | | | Make the codec re-configuration feature selectable via Kconfig, CONFIG_SND_HDA_RECONFIG. Also mark it as experimental (as it really is). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Release ELD proc fileTakashi Iwai2008-11-211-0/+8
| | | | | | Release ELD proc file when reconfigured so that no leak occurs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add missing static for snd_hda_eld_proc_new() inline funcitonTakashi Iwai2008-11-211-1/+2
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>