aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
Commit message (Collapse)AuthorAge
* ALSA: hda - Use snd_printd() in snd_hda_parse_pin_def_config()Takashi Iwai2011-05-26
| | | | | | | Fixed the wrong usage of snd_printdd() for debug prints of input entries. It should be snd_printd() like others. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Add jack detection for HDMIDavid Henningsson2011-05-19
| | | | | | | | Just as for headphones and microphone jacks, this patch adds reporting of HDMI jack status through the input layer. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Constify some API function argumentsTakashi Iwai2011-05-02
| | | | | | 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-02
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-05-02
|\
| * Merge branch 'fix/hda' into for-linusTakashi Iwai2011-04-21
| |\
| * | Fix common misspellingsLucas De Marchi2011-03-31
| | | | | | | | | | | | | | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* | | ALSA: hda - Show the line-out type in snd_hda_parse_pin_def_config()Takashi Iwai2011-04-29
| | | | | | | | | | | | | | | | | | Helpful for debugging. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-04-26
|\ \ \ | | |/ | |/|
| * | ALSA: hda - Fix unused warnings when !SND_HDA_NEEDS_RESUMEMike Waychison2011-04-20
| |/ | | | | | | | | | | | | | | | | | | | | | | | | When SND_HDA_NEEDS_RESUME is not defined, the compiler identifies that the following symbols are static but not used: restore_shutup_pins hda_cleanup_all_streams Fix warnings by adding SND_HDA_NEEDS_RESUME guards. Signed-off-by: Mike Waychison <mikew@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - sound/pci/hda/hda_codec.c: fix warningAndrew Morton2011-04-15
| | | | | | | | | | | | | | | | sound/pci/hda/hda_codec.c: In function 'snd_hda_get_connections': sound/pci/hda/hda_codec.c:332: warning: unused variable 'j' Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remember connection listsTakashi Iwai2011-04-07
|/ | | | | | | | The connection lists are static and we can reuse the previous results instead of querying via verb at each time. This will reduce the I/O in the runtime especially for some codec auto-parsers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make common input-jack helper functionsTakashi Iwai2011-03-03
| | | | | | | 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-18
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix multi-headphone handling for Realtek codecsTakashi Iwai2011-01-10
| | | | | | | | | | | When multiple headphone pins are defined without line-out pins, the driver takes them as primary outputs. But it forgot to set line_out_type to HP by assuming there is some rest of HP pins. This results in some mis-handling of these pins for Realtek codec parser. It takes as if these are pure line-out jacks. Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
* ALSA: hda - Try to find an empty control index when it's occupiedTakashi Iwai2010-12-23
| | | | | | | | When a mixer control element was already created with the given name, try to find another index for avoiding conflicts, instead of breaking with an error. This makes the driver more robust. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Disable sticky PCM stream assignment for AD codecsTakashi Iwai2010-10-25
| | | | | | | | | | | The sticky PCM stream assignment introduced in 2.6.36 kernel seems causing problems on AD codecs. At some time later, the streaming no longer works by unknown reason. A simple workaround is to disable sticky-assignment for these codecs. Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add workarounds for CT-IBG controllersTakashi Iwai2010-10-22
| | | | | | | | | Creative IBG controllers require the playback stream-tags to be started from 1, instead of capture+1. Otherwise the stream stalls. Reported-by: Wai Yew CHAY <wychay@ctl.creative.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: tlv - Define numbers in sound/tlv.hTakashi Iwai2010-10-17
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Sigmatel: work around incorrect master mutingClemens Ladisch2010-10-17
| | | | | | | | | | | | | | | | | | 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 - Introduce hda_call_check_power_status() helperTakashi Iwai2010-09-21
| | | | | | | Replace the explicit ifdef check and call of check_power_status ops with a new helper function, hda_call_check_power_status(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make snd_hda_get_input_pin_attr() helperTakashi Iwai2010-09-17
| | | | | | | | 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 - Fix mic attribute check for internal micsTakashi Iwai2010-09-17
| | | | | | | Now Windows claims that the BIOS sets pins for internal mics to be BOTH connection instead of FIXED. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Sort input pins in snd_hda_parse_pin_def_config()Takashi Iwai2010-09-09
| | | | | | | Sort inputs[] array in autocfg so that the codec parsers can filter out easily per input pin types. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add comments to new helper functionsTakashi Iwai2010-09-09
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Reduce redundant mic location prefix in input source labelsTakashi Iwai2010-09-09
| | | | | | | When the mic pins are assigned to the same location, we can omit the redundant location prefix like "Front" or "Rear". Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Improve the input source name labelsTakashi Iwai2010-09-09
| | | | | | | | 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-09
| | | | | | | | 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-09
| | | | | | | | 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 - Clear left-over hp_pins in snd_hda_parse_pin_def_config()Takashi Iwai2010-09-08
| | | | | | | | In snd_hda_parse_def_config(), some unused values may remain in hp_pins[] array during the headphone-reassignment workaround. This patch clears the unused array members. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2010-09-08
|\
| * ALSA: hda - Fix wrong HP pin detection in snd_hda_parse_pin_def_config()Takashi Iwai2010-09-08
| | | | | | | | | | | | | | | | | | | | | | | | snd_hda_parse_pin_def_config() has some workaround for re-assigning some pins declared as headphones to line-outs. This didn't work properly for some cases because it used memmove() stupidly wrongly. Reference: Novell bnc#637263 https://bugzilla.novell.com/show_bug.cgi?id=637263 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add snd_hda_get_input_pin_label() helper functionTakashi Iwai2010-08-30
| | | | | | | | | | | | | | 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-30
|/ | | | | | | | | | 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 - Fix stream and channel-ids codec-bus wideTakashi Iwai2010-08-20
| | | | | | | | | | | | | | | | The new sticky PCM parameter introduced the delayed clean-ups of stream- and channel-id tags. In the current implementation, this check (adding dirty flag) and actual clean-ups are done only for the codec chip. However, with HD-audio architecture, multiple codecs can be on a single bus, and the controller assign stream- and channel-ids in the bus-wide. In this patch, the stream-id and channel-id are checked over all codecs connected to the corresponding bus. Together with it, the mutex is moved to struct hda_bus, as this becomes also bus-wide. Reported-and-tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix dynamic ADC change working againTakashi Iwai2010-08-13
| | | | | | | | | | | | | | | The commit eb541337b7a43822fce7d0c9d967ee149b2d9a96 ALSA: hda - Make converter setups sticky changes the semantics of snd_hda_codec_cleanup_stream() not to clean up the stream at that moment but delay the action. This broke the codes expecting that the clean-up is done immediately, such as dynamic ADC changes in some codec drivers. This patch fixes the issue by introducing a lower helper, __snd_hda_codec_cleanup_stream(), to allow the immediate clean up. The original snd_hda_codec_cleanup_stream() is kept as is now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Make converter setups stickyTakashi Iwai2010-08-06
| | | | | | | | | | | | | | So far, we reset the converter setups like the stream-tag, the channel-id and format-id in prepare callbacks, and clear them in cleanup callbacks. This often causes a silence of the digital receiver for a couple of seconds. This patch tries to delay the converter setup changes as much as possible. The converter setups are cached and aren't reset as long as the same values are used. At suspend/resume, they are cleared to be recovered properly, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/misc' into for-linusTakashi Iwai2010-08-05
|\
| * ALSA: hda-intel - fix function_id rework (add missing bitmask)Jaroslav Kysela2010-07-20
| | | | | | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
| * ALSA: hda-intel - do not mix audio and modem function IDsJaroslav Kysela2010-07-19
| | | | | | | | | | | | | | The function IDs are different for audio and modem. Do not mix them. Also, show the unsolicited bit in the function_id register. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* | ALSA: hda - Define AC_FMT_* constantsTakashi Iwai2010-08-03
| | | | | | | | | | | | | | Define constants for the HD-audio stream format bits, and replace the magic numbers in codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Set Stream Type in Stream Format according to AES0Anssi Hannula2010-08-03
| | | | | | | | | | | | | | | | | | | | Set bit 15 (Stream Type) of HDA Stream Format to 1 (Non-PCM) when IEC958 channel status bit 1 (AES0 & 0x02) is set to 1 (non-audio). This is a prequisite for HDMI HBR passthrough. Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Make error messages more verboseTakashi Iwai2010-07-30
| | | | | | | | | | | | | | Add a prefix and more information for error messages regarding the connection-list in hda_codec.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Fix max amp cap calculation for IDT/STAC codecsTakashi Iwai2010-07-26
| | | | | | | | | | | | | | | | | | The commit afbd9b8448f4b7d15673c6858012f384f18d28b8 ALSA: hda - Limit the amp value to write introduced a regression for codec setups with amp offsets like IDT/STAC codecs. The limit value should be a raw value without offset calculation. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2010-07-09
|\ \
| * | ALSA: hda - Restore cleared pin controls on resumeTakashi Iwai2010-07-09
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many codecs now clear the pin controls at suspend via snd_hda_shutup_pins() for reducing the click noise at power-off. But this leaves some pins uninitialized, and they'll be never recovered after resume. This patch adds the proper recovery of cleared pin controls on resume. Also it adds a check of bus->shutdown so that pins won't be cleared at module unloading. Reference: Kernel bug 16339 http://bugzilla.kernel.org/show_bug.cgi?id=16339 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* / ALSA: hda - Limit the amp value to writeTakashi Iwai2010-07-09
|/ | | | | | | | Check the amp max value at put callbacks and set the upper limit so that the driver won't write any invalid value over the defined range. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - introduce snd_hda_codec_update_cache()Takashi Iwai2010-03-30
| | | | | | | | | | Add a new helper, snd_hda_codec_update_cache(), for reducing the unneeded verbs. This function checks the cached value and skips if it's identical with the given one. Otherwise it works like snd_hda_codec_write_cache(). The alc269 code uses this function as an example. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Report errors when invalid values are passed to snd_hda_amp_*()Takashi Iwai2010-03-29
| | | | | | The values should be in 8 bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Take internal mic as Front MicKailang Yang2010-03-19
| | | | | | | | | | Add new check for MIC. Do the internal DMIC as the Front MIC. It could solve the default record source index issue. [Fix the check properly using the bitmask by tiwai] Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>