summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ALSA: hda - Add pseudo device-locking for clear/reconfigTakashi Iwai2009-02-231-4/+50
| | | | | | | 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>
* ALSA: hda - Make user_pin overriding the driver setupTakashi Iwai2009-02-231-4/+12
| | | | | | | Make user_pin overriding even the driver pincfg, e.g. the static / fixed pin config table in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Rename {override,cur}_pin with {user,driver}_pinTakashi Iwai2009-02-231-9/+9
| | | | | | | 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>
* ALSA: hda - Use snd_hda_codec_get_pincfg() in the rest placesTakashi Iwai2009-02-231-2/+1
| | | | | | Replace with snd_hda_codec_get_pincfg() in the places where available. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add generic pincfg initializationTakashi Iwai2009-02-201-9/+142
| | | | | | | 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>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-02-131-0/+10
|\
| * ALSA: hda - Add snd_hda_multi_out_dig_cleanup()Takashi Iwai2009-02-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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-7/+10
| | | | | | | | | | | | | | | | | | 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: hda - Fix a wrong pin check in snd_hda_parse_pin_def_config()Takashi Iwai2009-02-111-1/+1
| | | | | | | | | | | | Fixed a wrong pin check (a typo) for debug print of digital input pin. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add missing NULL check in snd_hda_create_spdif_in_ctls()Takashi Iwai2009-02-061-0/+2
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2009-02-051-4/+5
|\|
| * ALSA: hda - Fix misc workqueue issuesTakashi Iwai2009-02-051-4/+5
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'test/hda-vol-ofs' into next/hdaTakashi Iwai2009-01-221-8/+37
|\ \
| * | ALSA: hda - Add extra volume offset to standard volume amp macrosTakashi Iwai2009-01-201-8/+37
| |/ | | | | | | | | | | | | | | 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/+8
| | | | | | | | | | | | | | | | 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 - Don't break the PCM creation loopTakashi Iwai2009-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Don't break the loop in snd_hda_codec_build_pcms() even if the item has no substreams. It's possible that it's an empty item and the next item containing the valid substreams (e.g. realtek codecs may create the analog and alt-analog but no digitl streams). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Detect non-SPDIF digital I/OTakashi Iwai2009-01-201-0/+2
| | | | | | | | | | | | | | Accept non-SPDIF digital I/O pins as the digital pins. These are usually corresponding to HDMI I/O. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add debug prints for digital I/O pin detectionsTakashi Iwai2009-01-201-0/+4
|/ | | | | | | Add the debug prints for digital I/O pin detections in snd_hda_parse_pin_def_config() function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/hda-gateway' into topic/hdaTakashi Iwai2009-01-131-0/+61
|\
| * ALSA: hda - Add a new function to seek for a codec IDMauro Carvalho Chehab2008-11-301-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 - Use queue_delayed_work()Takashi Iwai2009-01-131-1/+1
| | | | | | | | | | | | | | Replaced the old schedule_work() with queue_delayed_work() where overlooked in the previous patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Use own workqueueTakashi Iwai2009-01-121-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: hda - create hda_codec.control_mutex for kcontrol->private_valueWu Fengguang2009-01-091-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: hda - Add probe_only optionTakashi Iwai2008-12-191-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: hda - Add missing initializations of amp and verb cachesTakashi Iwai2008-12-191-0/+2
| | | | | | | | | | | | | | The re-initializations of codec amp and verb caches are missing at reconfig, which may cause Oops occasionally. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add Intel vendor id stringTakashi Iwai2008-12-181-0/+1
| | | | | | | | | | | | | | Added Intel codec vendor id string (0x8086). Also fixed Intel-HDMI codec name strings, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add Nvidia vendor id stringTakashi Iwai2008-12-161-0/+1
| | | | | | | | | | | | | | Added Nvidia (0x10de) to the vendor id list. Cleaned up the codec name strings accordingly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/hda-modularize' into topic/hdaTakashi Iwai2008-12-031-44/+143
|\|
| * ALSA: hda - Don't export symbols when built-in kernelTakashi Iwai2008-11-281-74/+74
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ALSA: hda - Check MODULE instead of CONFIG_SND_HDA_INTEL_MODULETakashi Iwai2008-11-281-2/+2
| | | | | | | | | | | | | | Checking MODULE is more generic. Also a cosmetic comment change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Modularize HD-audio driverTakashi Iwai2008-11-271-44/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: hda - Clear codec->proc_widget_hook at resetTakashi Iwai2008-11-281-0/+1
|/ | | | | | Clear the remaining pointer at snd_hda_codec_reset() to avoid Oops. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix PCM reconfigureTakashi Iwai2008-11-271-69/+93
| | | | | | | | | | | | | 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>
* ALSA: hda - Move power_save option to hda_intel.cTakashi Iwai2008-11-271-10/+6
| | | | | | | 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>
* ALSA: hda - make some functions staticTakashi Iwai2008-11-271-13/+1
| | | | | | | | 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>
* ALSA: sound/pci/hda/hda_codec.c: cleanup kernel-docQinghuang Feng2008-11-261-1/+0
| | | | | | | | There is no argument named @state in snd_hda_resume, remove its' comment. Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/fix/hda' into topic/hdaTakashi Iwai2008-11-251-2/+2
|\ | | | | | | | | Conflicts: sound/pci/hda/patch_sigmatel.c
| * ALSA: hda - Fix caching of SPDIF status bitsTakashi Iwai2008-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | SPDIF status bits controls are written via snd_hda_codec_write() without caching. This causes a regression at resume that the bits are lost. Simply replacing it with the cached version fixes the problem. Reference: http://lkml.org/lkml/2008/11/24/324 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix build without CONFIG_PROC_FSTakashi Iwai2008-11-211-0/+30
| | | | | | | | | | | | | | | | snd_print_pcm_rates() and snd_print_pcm_bits() are used by both hda_proc.c and hda_eld.c, thus they have to be defined in the common place. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix double free of jack instancesTakashi Iwai2008-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | ALSA: hda - Fix another cache list managementTakashi Iwai2008-11-101-4/+3
| | | | | | | | | | | | Fix another silly bug in the amp cache list management. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix broken hash chain allocationTakashi Iwai2008-11-071-0/+1
| | | | | | | | | | | | | | The chaining for amp hash got broken due to the rewrite with snd_array. Fixed now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add max allocation check in array allocatorTakashi Iwai2008-11-071-1/+4
| | | | | | | | | | | | | | Added a check for max allocation size in snd_array_new() for a debugging purpose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add missing NULL check in amp hash allocationTakashi Iwai2008-11-071-0/+2
| | | | | | | | | | | | Added the missing NULL check from allocator in get_alloc_hash(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - simplify hda_bus ops callbacksTakashi Iwai2008-11-061-15/+47
| | | | | | | | | | | | | | | | 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>
* | ALSA: hda - Intel HDMI audio supportWu, Fengguang2008-11-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | Add support for Intel G45 integrated HDMI audio codecs. This initial release supports: - 2 channel stereo sound output - report monitor's ELD information Signed-off-by: Wu Fengguang <wfg@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Don't create empty PCM streamsTakashi Iwai2008-11-041-0/+5
| | | | | | | | | | | | | | | | | | | | Due to the hda-reconfiguration patches, the check of empty stream is gone, and this results in an error with the codec setup with empty streams. This patch adds the check again to avoid the error at probing. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix possible NULL dereferenceTakashi Iwai2008-11-041-1/+3
| | | | | | | | | | | | | | | | Add NULL-check of the return value of snd_kctl_new1() before accessing it. Also, make a sanity NULL check to snd_BUG_ON() for debugging only. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/fix/hda' into topic/hdaTakashi Iwai2008-10-291-0/+1
|\|
| * ALSA: hda: Add HDA vendor ID for Wolfson MicroelectronicsMark Brown2008-10-281-0/+1
| | | | | | | | | | | | | | Add Wolfson Microelectronics to the HDA vendor ID table. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud