aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.h
AgeCommit message (Collapse)Author
2010-01-28ALSA: hda - Define max number of PCM devices in hda_codec.hTakashi Iwai
Define the constant rather in the common header file. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-01-19Merge branch 'fix/hda' into topic/hdaTakashi Iwai
Conflicts: sound/pci/hda/patch_realtek.c
2009-12-27ALSA: hda - Add snd_hda_shutup_pins() helper functionTakashi Iwai
Add a common helper function for clearing pin controls before suspend. Use the pincfg array instead of looking through all widget tree. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-25ALSA: hda - Disable tigger at pin-sensing on AD codecsTakashi Iwai
Analog Device codecs seem to have problems with the triggering of pin-sensing although their pincaps give the trigger requirements. Some reported that constant CPU load on HP laptops with AD codecs. For avoiding this regression, add a flag to codec struct to notify explicitly that the codec doesn't suppot the trigger at pin-sensing. Tested-by: Maciej Rutecki <maciej.rutecki@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-15ALSA: hda - add more NID->Control mappingJaroslav Kysela
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>
2009-12-11intelhdmi - dont power off HDA linkWu Fengguang
For codecs without EPSS support (G45/IbexPeak), the hotplug event will be lost if the HDA is powered off during the time. After that the pin presence detection verb returns inaccurate info. So always power-on HDA link for !EPSS codecs. KarL offers the fact and Takashi recommends to flag hda_bus. Thanks! Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11ALSA: intelhdmi - accept DisplayPort pinWu Fengguang
HDA036 spec states: DP (Display Port) indicates whether the Pin Complex Widget supports connection to a Display Port sink. Supported if set to 1. Note that it is possible for the pin widget to support more than one digital display connection type, e.g. HDMI and DP bit are both set to 1. Also export the DP pin cap in procfs. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-12-11ALSA: hda - show HBR(High Bit Rate) pin cap in procfsWu Fengguang
Note that the HBR capability only applies to HDMI pin. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-18ALSA: hda - show EPSS capability in procWu Fengguang
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-16ALSA: hda - move snd_hda_pcm_type_name from hda_codec.h to hda_local.hJaroslav Kysela
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>
2009-11-16ALSA: hda - add beep_mode module parameterJaroslav Kysela
The beep_mode parameter for snd-hda-intel module allows to choose among different digital beep device registation to the input layer. 0 = do not register to the input layer 1 = register to the input layer all time 2 = use "Beep Switch" control exported to user space mixer applications Also, introduce CONFIG_SND_HDA_INPUT_BEEP_MODE for default value. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-11ALSA: hda - Add power on/off counterTakashi Iwai
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>
2009-11-10ALSA: hda - proc - show which I/O NID is associated to PCM deviceJaroslav Kysela
Output something like: Node 0x02 [Audio Output] wcaps 0x11: Stereo Device: name="ALC888 Analog", type="Audio", device=0, substream=0 Converter: stream=0, channel=0 ... Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-11-10ALSA: hda - Add reboot notifier to each codecTakashi Iwai
Add reboot notifier to each codec so that it can do some workarounds needed for reboot. So far, patch_sigmatel.c calls its shutup routine for avoiding noises at reboot on some HP machines. References: Novell bnc#544779 http://bugzilla.novell.com/show_bug.cgi?id=544779 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-03Merge branch 'fix/hda' into topic/hdaTakashi Iwai
2009-08-03ALSA: hda: track CIRB/CORB command/response states for each codecWu Fengguang
Recently we hit a bug in our dev board, whose HDMI codec#3 may emit redundant/spurious responses, which were then taken as responses to command for another onboard Realtek codec#2, and mess up both codecs. Extend the azx_rb.cmds and azx_rb.res to array and track each codec's commands/responses separately. This helps keep good codec safe from broken ones. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24ALSA: hda - Add patch module optionTakashi Iwai
Added the patch module option to apply a "patch" as a firmware to modify pin configurations or give additional hints to the driver before actually initializing and configuring the codec. This can be used as a workaround when the BIOS doesn't give sufficient information or give wrong information that doesn't match with the real hardware setup, until it's fixed statically in the driver via a quirk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-24ALSA: hda - Don't call snd_hda_codec_configure in snd_hda_codec_new()Takashi Iwai
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>
2009-06-02ALSA: hda - Limit codec-verb retry to limited hardwaresTakashi Iwai
The reset of a BUS controller during operations is somehow risky and shouldn't be done inevitably for devices that have apparently no such codec-communication problems. This patch adds the check of the hardware and limits the bus-reset capability. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-02ALSA: hda - Add codec bus reset and verb-retry at critical errorsTakashi Iwai
Some machines machine cause a severe CORB/RIRB stall in certain weird conditions, such as PA access at the start up together with fglrx driver. This seems unable to be recovered without the controller reset. This patch allows the bus controller reset at critical errors so that the communication gets recovered again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-05-16ALSA: hda - Split codec->name to vendor and chip name stringsTakashi Iwai
Split the name string in hda_codec struct to vendor_name and chip_name strings to be stored directly from the preset name. Since mostly only the chip name is referred in many patch_*.c, this results in the reduction of many codes in the end. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-04-21ALSA: hda - Retry codec-verbs at errorsTakashi Iwai
The current error-recovery scheme for the codec communication errors doesn't work always well. Especially falling back to the single-command mode causes the fatal problem on many systems. In this patch, the problematic verb is re-issued again after the error (even with polling mode) instead of the single-cmd mode. The single-cmd mode will be used only when specified via the command option explicitly, mainly just for testing. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-23ALSA: hda - Add function id to proc outputPascal de Bruijn
This patch does two things: Output Intel HDA Function Id in /proc/asound/cardX/codec#X Align Vendor/Subsystem/Revision Ids to 8 characters, front-padded with zeros Before: Vendor Id: 0x11d41884 Subsystem Id: 0x103c281a Revision Id: 0x100100 After: Function Id: 0x1 Vendor Id: 0x11d41884 Subsystem Id: 0x103c281a Revision Id: 0x0100100 As report on the Kernel Bugzilla #12888 Signed-off-by: Pascal de Bruijn <pascal@unilogicnetworks.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-12ALSA: hda - Print multiple out-amp values of pin widgets on Conext codecsTakashi Iwai
Add a flag to work around the non-standard amp-value handling on Conexant codecs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-23ALSA: hda - Rename {override,cur}_pin with {user,driver}_pinTakashi Iwai
Rename from override_pin and cur_pin with user_pin and driver_pin, respectively, to be a bit more intuitive. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-20ALSA: hda - Add generic pincfg initializationTakashi Iwai
Added the generic pincfg cache and save/restore functions. Also introduced the pin-overriding via hwdep sysfs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-05ALSA: hda - Fix misc workqueue issuesTakashi Iwai
Some fixes regarding snd-hda-intel workqueue: - Use create_singlethread_workqueue() instead of create_workqueue() as per-CPU work isn't required. - Allocate workq name string properly - Renamed the workq name to "hd-audio*" to be more obvious. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12ALSA: hda - Use own workqueueTakashi Iwai
snd-hda-intel driver used schedule_work() fot the delayed DMA pointer updates, but this has several potential problems: - it may block other eventsd works longer - it may deadlock when probing fails and flush_scheduled_work() is called during probe callback (as probe callback itself could be invoked from eventd) This patch adds an own workq for each driver instance to solve these problems. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-09ALSA: hda - create hda_codec.control_mutex for kcontrol->private_valueWu Fengguang
Fix the following lockdep warning by not reusing the hda_codec.spdif_mutex. ALSA sound/pci/hda/hda_codec.c:882: hda_codec_cleanup_stream: NID=0x2 ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.28-next-20090102 #33 ------------------------------------------------------- mplayer/3151 is trying to acquire lock: (&pcm->open_mutex){--..}, at: [<ffffffffa004ced3>] snd_pcm_release+0x43/0xd0 [snd_pcm] but task is already holding lock: (&mm->mmap_sem){----}, at: [<ffffffff810c0252>] sys_munmap+0x42/0x80 which lock already depends on the new lock. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19ALSA: hda - Add probe_only optionTakashi Iwai
Added probe_only module option to hd-audio driver. This option specifies whether the driver creates and initializes the codec-parser after probing. When this option is set, the driver skips the codec parsing and initialization but gives you proc and other accesses. It's useful to see the initial codec state for debugging. The default of this value is off, so the default behavior is as same as before. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-03Merge branch 'topic/hda-modularize' into topic/hdaTakashi Iwai
2008-11-28ALSA: hda - Don't export symbols when built-in kernelTakashi Iwai
The global functions in hda_codec.c and other core parts are only for HD-audio codec and controller drivers. When the HD-audio driver is built in kernel, all stuff have to be statically linked, thus we don't need any exports. This patch introduces a conditional macro to do export only when needed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28ALSA: hda - Remove unused proc entry in hda_bus structTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-28ALSA: hda - Add codec-specific proc hookTakashi Iwai
Added a hook for proc outputs of codec-specific stuff. Moved realtek-specific coeff output into patch_realtek.c as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27ALSA: hda - Modularize HD-audio driverTakashi Iwai
Split the monolithc HD-audio driver into several pieces: - snd-hda-intel HD-audio PCI controller driver; loaded via udev - snd-hda-codec HD-audio codec bus driver - snd-hda-codec-* Specific HD-audio codec drivers When built as modules, snd-hda-codec (that is invoked by snd-hda-intel) looks up the codec vendor ID and loads the corresponding codec module automatically via request_module(). When built in a kernel, each codec drivers are statically hooked up before probing the PCI. This patch adds appropriate EXPORT_SYMBOL_GPL()'s and the module information for each driver, and driver-linking codes between codec-bus and codec drivers. TODO: - Avoid EXPORT_SYMBOL*() when built-in kernel - Restore __devinit appropriately depending on the condition Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27ALSA: hda - Fix PCM reconfigureTakashi Iwai
The reconfiguration of PCM affected all PCM streams on the bus, but this this should be done rather only for the target codec. This patch does the following: - introduce bitmap indicating the PCM device usages on a hda_bus - refactor the PCM build functions - fix __devinit prefix in some fucntions - add a proper ifdef around HDA-reconfig-specific functions Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27ALSA: hda - Move power_save option to hda_intel.cTakashi Iwai
Move power_save option into hda_intel.c, and make a field in hda_bus, instead of keeping module parameters in separate files. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-27ALSA: hda - make some functions staticTakashi Iwai
Minor clean ups: move snd_hda_codecs_inuse() into hda_intel.c and make static. Also, make snd_hda_query_supported_pcm() static as it's used only in hda_codec.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-21ALSA: hda - Fix double free of jack instancesTakashi Iwai
The jack instances created in patch_sigmatel.c may be double-freed. The device management code checks the invalid element, and thus there is no real breakage, but it spews annoying warning messages. But, we can't simply remove the release calls of these jack instances because they have to be freed when the codec is re-configured. Now, a new flag, bus->shutdown is introduced to indicate that the bus is really being unloaded, i.e. the objects managed by the device manager will be automatically deleted. We release these objects only when this flag isn't set. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-10ALSA: hda - Fix another cache list managementTakashi Iwai
Fix another silly bug in the amp cache list management. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-11-06ALSA: hda - simplify hda_bus ops callbacksTakashi Iwai
The hda_bus ops callback take struct hda_bus pointer. Also, the command callback takes the composed command word, instead of each small bits in arguments. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-27ALSA: hda: add snd_hda_get_jack* functionsMatthew Ranostay
This patch adds snd_hda_get_jack* functions for reporting jack location, device, and connectivity type. Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Add hints for reconfigTakashi Iwai
This patch adds the "hints" for reconfiguring codecs. The hints are simply string arrays and can be freely used/parsed by the codec patch. The hints can be input via hwdep sysfs files. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Add init_verbs entriesTakashi Iwai
This patch enables the additional init verbs for each codec. The verbs can be entered via hwdep sysfs file. These verbs are executed at reconfiguring the codec for non-standard setups like overriding the pin-defcfg. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Add codec reconfiguration featureTakashi Iwai
Added the reconfiguration feature of any individual codec. Via the reconfiguration, the old resources are released and the patch is called again to recreate the PCM and mixers in addition to the re-initialization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Manage kcontrol listsTakashi Iwai
Manage all kcontrol elements created in the hda-intel driver. This makes it possible to remove and reconfigure the controls of each codec. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Allocate name string of each codecTakashi Iwai
Allocate dynamically the name string of each codec instead of pointing to a static string. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Use generic array helpersTakashi Iwai
Use generic array helpers to simplify array handling in snd-hda-intel. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Add generic arraysTakashi Iwai
Added helper functions to handle generic arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: hda - Add infrastructure for dynamic stream allocationTakashi Iwai
Added the infrastructure for dynamic stream allocation on HD-audio. Signed-off-by: Takashi Iwai <tiwai@suse.de>