aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
Commit message (Collapse)AuthorAgeFilesLines
* remove compat from include, get new scripts workingWolfgang Wiedmeyer2015-10-231-219/+427
| | | | | further update code, especially sound remove initramfs files for galaxys2 and d710 and a busybox binary
* merged 3.0.101 tagWolfgang Wiedmeyer2015-10-221-2/+2
|
* ALSA: hda - Add a fake mute featureTakashi Iwai2012-03-121-2/+6
| | | | | | | | | | | | | | | | | | | | | | commit 3868137ea41866773e75d9ac4b9988dcc361ff1d upstream. Some codecs don't supply the mute amp-capabilities although the lowest volume gives the mute. It'd be handy if the parser provides the mute mixers in such a case. This patch adds an extension amp-cap bit (which is used only in the driver) to represent the min volume = mute state. Also modified the amp cache code to support the fake mute feature when this bit is set but the real mute bit is unset. In addition, conexant cx5051 parser uses this new feature to implement the missing mute controls. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42825 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ALSA: HDA: Fix duplicated output to more than one codecDavid Henningsson2012-02-131-1/+1
| | | | | | | | | | | | | | commit 54c2a89f60fd71b924d0f848ac892442951401a6 upstream. This typo caused the wrong codec's nid to be checked for wcaps type. As a result, sometimes speakers would duplicate the output sent to HDMI output. BugLink: https://bugs.launchpad.net/bugs/924320 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ALSA: hda - Don't add elements of other codecs to vmaster slaveTakashi Iwai2011-11-211-21/+39
| | | | | | | | | | | | | | | | | | commit aeb4b88ec0a948efce8e3a23a8f964d3560a7308 upstream. When a virtual mater control is created, the driver looks for slave elements from the assigned card instance. But this may include the elements of other codecs when multiple codecs are on the same HD-audio bus. This works at the first time, but it'll give Oops when it's once freed and re-created via reconfig sysfs. This patch changes the element-look-up strategy to limit only to the mixer elements of the same codec. Reported-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ALSA: hda - Use snd_printd() in snd_hda_parse_pin_def_config()Takashi Iwai2011-05-261-1/+1
| | | | | | | 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-191-0/+2
| | | | | | | | 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-021-7/+7
| | | | | | 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/+3
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-05-021-2/+2
|\
| * Merge branch 'fix/hda' into for-linusTakashi Iwai2011-04-211-0/+4
| |\
| * | Fix common misspellingsLucas De Marchi2011-03-311-2/+2
| | | | | | | | | | | | | | | | | | 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-291-2/+5
| | | | | | | | | | | | | | | | | | Helpful for debugging. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-04-261-0/+4
|\ \ \ | | |/ | |/|
| * | ALSA: hda - Fix unused warnings when !SND_HDA_NEEDS_RESUMEMike Waychison2011-04-201-0/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 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-151-1/+1
| | | | | | | | | | | | | | | | 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-071-2/+67
|/ | | | | | | | 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-031-0/+105
| | | | | | | 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-5/+5
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix multi-headphone handling for Realtek codecsTakashi Iwai2011-01-101-0/+3
| | | | | | | | | | | 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-231-23/+34
| | | | | | | | 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-251-0/+3
| | | | | | | | | | | 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-221-1/+4
| | | | | | | | | 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-171-1/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Sigmatel: work around incorrect master mutingClemens Ladisch2010-10-171-0/+3
| | | | | | | | | | | | | | | | | | 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-211-4/+1
| | | | | | | 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-171-37/+25
| | | | | | | | 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-171-2/+5
| | | | | | | 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-091-0/+19
| | | | | | | 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-091-0/+23
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Reduce redundant mic location prefix in input source labelsTakashi Iwai2010-09-091-13/+77
| | | | | | | 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-091-16/+75
| | | | | | | | 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-44/+6
| | | | | | | | 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-12/+6
| | | | | | | | 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-081-0/+2
| | | | | | | | 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-081-1/+1
|\
| * ALSA: hda - Fix wrong HP pin detection in snd_hda_parse_pin_def_config()Takashi Iwai2010-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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-301-1/+24
| | | | | | | | | | | | | | 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-11/+29
|/ | | | | | | | | | 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-201-13/+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-131-8/+18
| | | | | | | | | | | | | | | 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-061-8/+142
| | | | | | | | | | | | | | 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-051-4/+6
|\
| * ALSA: hda-intel - fix function_id rework (add missing bitmask)Jaroslav Kysela2010-07-201-1/+1
| | | | | | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
| * ALSA: hda-intel - do not mix audio and modem function IDsJaroslav Kysela2010-07-191-3/+5
| | | | | | | | | | | | | | 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-031-18/+23
| | | | | | | | | | | | | | 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-031-1/+5
| | | | | | | | | | | | | | | | | | | | 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-301-3/+6
| | | | | | | | | | | | | | 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-261-1/+2
| | | | | | | | | | | | | | | | | | 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-091-0/+27
|\ \