aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
AgeCommit message (Collapse)AuthorFilesLines
2013-01-12ALSA: hda/realtek - Consolidate is_reachable_path()Takashi Iwai1-18/+7
alc_auto_is_dac_reachable() can be replaced fully with is_reachable_path(). The only difference is the order of arguments. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-12ALSA: hda/realtek - Add path active flagTakashi Iwai2-88/+176
... and rewrite the initialization of output paths as a generic function that is applicable for both i/o directions. The new flag, active, is introduced to each nid_path entry. This indicates whether the given path is active, and it's used for checking whether a certain widget can be turned off or changed when a path is no longer used or newly enabled. It's still used only in the output paths. More wider adaption for input and loopback paths will be achieved in the later patch. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-12ALSA: hda/realtek - Remove non-standard automute modeTakashi Iwai1-36/+10
We are using only AUTOMUTE_MODE_PIN in patch_realtek.c and all others have been already dropped. Let's remove the old superfluous codes. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-12ALSA: hda - Introduce snd_hda_codec_amp_init*()Takashi Iwai2-19/+56
The new function snd_hda_codec_amp_init() (and the stereo variant) initializes the amp value only once at the first access. If the amp was already initialized or updated, this won't do anything more. It's useful for initializing the input amps that are in the part of the path but never used. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-12ALSA: hda - Introduce cache & flush cmd / amp writesTakashi Iwai3-26/+65
For optimizing the verb executions, a new mechanism to cache the verbs and amp update commands is introduced. With the new "write to cache and flush" way, you can reduce the same verbs that have been written multiple times. When codec->cached_write flag is set, the further snd_hda_codec_write_cache() and snd_hda_codec_amp_stereo() calls will be performed only on the command or amp cache table, but not sent to the hardware yet. Once after you call all commands and update amps, call snd_hda_codec_resume_amp() and snd_hda_codec_resume_cache(). Then all cached writes and amp updates will be written to the hardware, and the dirty flags are cleared. In this implementation, the existing cache table is reused, so actually no big code change is seen here. Each cache entry has a new dirty flag now (so the cache key is now reduced to 31bit). As a good side-effect by this change, snd_hda_codec_resume_*() will no longer execute verbs that have been already issued during the resume phase by checking the dirty flags. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda - Remove snd_hda_codec_amp_update() call from patch_*.cTakashi Iwai1-9/+1
It's used only in one place in patch_analog.c, and it can be replaced with others better. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Fix initialization of input amps in output pathsTakashi Iwai1-7/+15
When initializing the output paths, we assumed the input amps have almost two inputs blindly. It's not only generic but even incorrect for some codecs like ALC268 & co. Also, the same assumption (two sources) exists for the bind input-amp controls. This patch changes the codes in these places to handle the input connections in a more generic way. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Check amp capabilities of aa-mixer widgetTakashi Iwai1-6/+16
For handling the analog-loopback paths more generically, check the amp capabilities of the aa-mixer widget, and create only the appropriate mixer elements. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Parse analog loopback paths more genericallyTakashi Iwai1-8/+30
Improve the parser of analog loopback paths and handle in a more generic way. The following changes are included in this patch: - Instead of assuming direct connections between pins and the mixer widget, track the whole path between them. This fixes some missing connections like ALC660. - Introduce the path list for loopback paths like input and output path lists. Currently it's not used for any real purposes, yet. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Parse input pathsTakashi Iwai1-30/+73
Just like the output paths, parse the whole paths for inputs as well and store in a path list. For that purpose, rewrite the output parser code to be generically usable. The input path list is not referred at all in this patch. It'll be used to replace the fixed adc/capsrc array in later patches for more flexible input path selections. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Make path->idx[] and path->multi[] consistentTakashi Iwai1-6/+6
So far, idx[i] and multi[i] indicate the attribute of the widget path[i - 1]. This was just for simplifying the code in __parse_output_path(), but this is rather confusing for later use. It's more natural if both idx[i] and multi[i] point to the same widget of path[i]. This patch changes to that way. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Simplify the output volume initializationTakashi Iwai1-89/+93
Simplify the output path initialization using the existing path information instead of assuming the topology specific to Realtek codecs. This is also implicitly a fix for some amp values on output pins where the old parser missed (e.g. ALC260 output pins). The same function alc_auto_set_output_and_unmute() can be used now for the multi-io activation, since the output selection means nothing but activating the given output path. And, finally at this stage, we can get rid of alc_go_down_to_selector() and other functions that are codec really specifically to Realtek codecs. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Reduce vol/mute ctl lookups at parsing codecTakashi Iwai1-90/+78
So far, Realtek codec driver evaluates the NIDs for volume and mute controls twice, once while parsing the DACs and evaluating the assignment, and another while creating the mixer elements. This is utterly redundant and even fragile, as it's assuming that the ctl element evaluation is identical between both parsing DACs and creating mixer elements. This patch simplifies the code flow by doing the volume / mute controls evaluation only once while parsing the DACs. The patch ended up in larger changes than expected because of some cleanups became mandatory. As a gratis bonus, this patch also fixes some cases where the stereo channels are used wrongly for mono amps. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda - Fix mono amp values in proc outputTakashi Iwai1-6/+7
The mono widget is always connected to the left channel, thus the left channel amp value also should be referred for mono widgets instead of the right channel. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Manage mixer controls in out_path listTakashi Iwai1-99/+131
As we parse the output paths more precisely now, we can use this path list for parsing the widgets for volume and mute mixer controls. The spec->vol_ctls[] and sw_ctls[] bitmasks are replaced with the ctls[] in each output path instance. Interestingly, this move alone automagically fixes some bugs that the conflicting volume or mute NIDs weren't properly detected. Also, by parsing the whole path, there are more chances to get a free widget for volume/mute controls. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Add output path parserTakashi Iwai1-11/+128
Add the output path parser to Realtek codec driver as we already have in patch_via.c. The nid_path struct represents the complete output path from a DAC to a pin. The alc_spec contains an array of these paths, and a new path is added at each time when a new DAC is assigned. So far, this path list is used only in limited codes: namely in this patch, only alc_is_dac_already_used() checks the list instead of dac arrays in all possible outputs. In the later development, the path list will be referred from more places, such as the mixer control assignment / check, the mute/unmute of active routes, etc. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - List up all available DACsTakashi Iwai1-28/+48
In the probing phase, create a list of all available DACs in the codec and use it for checking the single DAC connections. This list will be used in more other places in the later commits, too. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda/realtek - Simplify alc_auto_is_dac_reachable()Takashi Iwai1-11/+1
Use the helper function snd_hda_get_conn_index() instead of open codes. This also improves the detection of some routes to DAC on ALC260 (although the difference doesn't influence on the end results of the mapping). Signed-off-by: Takashi Iwai <[email protected]>
2013-01-10ALSA: hda - Add support of new codec ALC284Kailang Yang1-1/+23
Added the support for a new codec ALC284, which is compatible with ALC269. Also add more codec variants to handle the SSID check properly. Signed-off-by: Kailang Yang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-01-09ALSA: hdspm - Fix wordclock status on AES32Andre Schramm1-5/+12
Use correct bitmask for AES32 cards to determine wordclock lock state, add missing bitmask for sync check and make output of the corresponding control and /proc coherent. Signed-off-by: Andre Schramm <[email protected]> Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-01-09ALSA: hda - Allow power_save_controller option override DCAPSTakashi Iwai1-2/+4
Change the power_save_controller option to bint from bool so that user can override the runtime PM capability bit and force to enable or disable the runtime PM. Signed-off-by: Takashi Iwai <[email protected]>
2013-01-09Revert "ALSA: hda - Shut up pins at power-saving mode with Conexnat codecs"David Henningsson1-16/+0
This reverts commit 697c373e34613609cb5450f98b91fefb6e910588. The original patch was meant to remove clicking, but in fact caused even more clicking instead. Thanks to c4pp4 for doing most of the work with this bug. BugLink: https://bugs.launchpad.net/bugs/886975 Signed-off-by: David Henningsson <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-01-09ALSA: hda - Disable runtime D3 for Intel CPT & coTakashi Iwai1-5/+8
We've got a few bug reports that the runtime D3 results in the dead HD-audio controller. It seems that the problem is in a deeper level than the sound driver itself, so as a temporal solution, disable the feature for these controllers again. Reported-and-tested-by: Vincent Blut <[email protected]> Reported-and-tested-by: Maurizio Avogadro <[email protected]> Cc: <[email protected]> [v3.7] Signed-off-by: Takashi Iwai <[email protected]>
2013-01-08ALSA: hda - print power state for AFG node in proc fileDavid Henningsson1-0/+2
It seems useful, and power states are required for AFG nodes, so I see no reason not to print it. As a bonus, also print the AFG nid. Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-01-07ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)David Henningsson1-0/+30
The mute LED is in this case connected to the Mic1 VREF. The machine also exposes the following string in BIOS: "HP_Mute_LED_0_A", so if more machines are coming, it probably makes sense to try to do something more generic, like for the IDT codec. Cc: [email protected] BugLink: https://bugs.launchpad.net/bugs/1096789 Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-01-07ALSA: au88x0: fix incorrect left shiftNickolai Zeldovich1-1/+1
vortex_wt_setdsout performs bit-negation on the bit position (wt&0x1f) rather than on the resulting bitmask. This code is never actually invoked (vortex_wt_setdsout is always called with en=1), so this does not currently cause any problem, and this patch is simply cleanup. Signed-off-by: Nickolai Zeldovich <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-01-03ALSA: hda - Switch "On" and "Off" for "Mute-LED Mode" kcontrolDavid Henningsson1-1/+1
The vmaster hook sends 1 for enabled/unmuted and 0 for disabled/muted, but "Mute-LED Mode" being "On" refers to the LED being on, not the volume being on. Therefore "On" and "Off" should be switched. Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-20Merge tag 'sound-3.8' of ↵Linus Torvalds4-19/+38
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "This update contains overall only driver-specific fixes. Slightly large LOC are seen in usb-audio driver for a couple of new device quirks and cs42l71 ASoC driver for enhanced features. The others are a few small (regression) fixes HD-audio, and yet other small / trival ASoC fixes." * tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Support for Digidesign Mbox 2 USB sound card: ALSA: HDA: Fix sound resume hang ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pins ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixup ALSA: hda - Set codec->single_adc_amp flag for Realtek codecs ASoC: atmel-ssc: change disable to disable in dts node ASoC: Prevent pop_wait overwrite ALSA: usb-audio: ignore-quirk for HP Wireless Audio ALSA: hda - Always turn on pins for HDMI/DP ALSA: hda - Fix pin configuration of HP Pavilion dv7 ASoC: core: Fix splitting of log messages ASoC: cs42l73: Change VSPIN/VSPOUT to VSPINOUT ASoC: cs42l73: Add DAPM events for power down. ASoC: cs42l73: Add DMIC's as DAPM inputs. ASoC: sigmadsp: Fix endianness conversion issue ASoC: tpa6130a2: Use devm_* APIs
2012-12-18ALSA: HDA: Fix sound resume hangDaniel J Blueman1-2/+2
Resuming a switcheroo'd HDA controller hangs since the completion is one-shot (thus works the first time). Fix by using completions that explictly need rearming, so remain fired before. Signed-off-by: Daniel J Blueman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-18ALSA: hda - bug fix for invalid connection list of Haswell HDMI codec pinsMengdong Lin1-0/+28
Haswell HDMI codec pins may report invalid connection list entries, which will cause failure to play audio via HDMI or Display Port. So this patch adds fixup for Haswell to workaround this hardware issue: enable DP1.2 mode and override the pins' connection list entries with proper value. Signed-off-by: Mengdong Lin <[email protected]> Signed-off-by: Xingchao Wang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-17ALSA: hda - Fix the wrong pincaps set in ALC861VD dallas/hp fixupTakashi Iwai1-2/+2
The workaround to force VREF50 for dallas/hp model with ALC861VD was introduced in commit 8fdcb6fe4204bdb4c6991652717ab5063751414e, but it contained wrong pincap override bits. This patch fixes to exclude VREF80 pincap bit correctly. Cc: <[email protected]> [v3.2+] Signed-off-by: Takashi Iwai <[email protected]>
2012-12-17ALSA: hda - Set codec->single_adc_amp flag for Realtek codecsTakashi Iwai1-0/+1
It turned out that Realtek codecs (ALC260, etc) with input amps in audio-input widgets don't handle the multiple individual input amps. Thus we need to set codec->single_adc_amp flag for them in general. Signed-off-by: Takashi Iwai <[email protected]>
2012-12-14ALSA: hda - Always turn on pins for HDMI/DPTakashi Iwai1-14/+4
We've seen the broken HDMI *video* output on some machines with GM965, and the debugging session pointed that the culprit is the disabled audio output pins. Toggling these pins dynamically on demand caused flickering of HDMI TV. This patch changes the behavior to keep the pin ON constantly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51421 Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-13Merge branch 'for-linus' of ↵Linus Torvalds4-4/+4
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial branch from Jiri Kosina: "Usual stuff -- comment/printk typo fixes, documentation updates, dead code elimination." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) HOWTO: fix double words typo x86 mtrr: fix comment typo in mtrr_bp_init propagate name change to comments in kernel source doc: Update the name of profiling based on sysfs treewide: Fix typos in various drivers treewide: Fix typos in various Kconfig wireless: mwifiex: Fix typo in wireless/mwifiex driver messages: i2o: Fix typo in messages/i2o scripts/kernel-doc: check that non-void fcts describe their return value Kernel-doc: Convention: Use a "Return" section to describe return values radeon: Fix typo and copy/paste error in comments doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c various: Fix spelling of "asynchronous" in comments. Fix misspellings of "whether" in comments. eisa: Fix spelling of "asynchronous". various: Fix spelling of "registered" in comments. doc: fix quite a few typos within Documentation target: iscsi: fix comment typos in target/iscsi drivers treewide: fix typo of "suport" in various comments and Kconfig treewide: fix typo of "suppport" in various comments ...
2012-12-13ALSA: hda - Fix pin configuration of HP Pavilion dv7Takashi Iwai1-1/+1
Fix the quirk entry for HP Pavilion dv7 in order to make the bass speaker working. Reported-and-tested-by: Tomas Pospisek <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-12ALSA: hda - Move runtime PM check to runtime_idle callbackTakashi Iwai1-5/+14
The runtime_idle callback is the right place to check the suspend capability, but currently we do it wrongly in the runtime_suspend callback. This leads to a kernel error message like: pci_pm_runtime_suspend(): azx_runtime_suspend+0x0/0x50 [snd_hda_intel] returns -11 and the runtime PM core would even repeat the attempts. Reported-and-tested-by: Borislav Petkov <[email protected]> Cc: <[email protected]> [v3.7] Signed-off-by: Takashi Iwai <[email protected]>
2012-12-12ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522Takashi Iwai1-0/+1
Acer Aspire One 522 has the infamous digital mic unit that needs the phase inversion fixup for stereo. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=715737 Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-12ALSA: hda - Avoid doubly suspend after vga switcherooTakashi Iwai1-0/+6
The HD-audio driver artificially calls the suspend and the resume code path in the VGA switcheroo state changes. When a machine goes to suspend, it tries to suspend the device again, and it stalls at snd_power_wait(). This patch adds checks whether the devices were already in (forced) suspend in PM callbacks for avoiding the doubly suspend. Reported-by: Daniel J Blueman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-12ALSA: hda - Check validity of CORB/RIRB WP readsTakashi Iwai1-2/+12
When the HD-audio controller is disabled (e.g. via vga switcheroo) but the driver is still accessing it, it spews floods of "spurious response" kernel messages. It's because CORB/RIRB WP reads 0xff, and the driver tries to fill up until this number. This patch changes the CORB/RIRB WP reads to word instead of byte, and add the check of the read value. If it's 0xffff, the controller is supposed to be disabled, so the further action will be skipped. Signed-off-by: Takashi Iwai <[email protected]>
2012-12-12ALSA: hda - use usleep_range in link reset and change timeout checkMengdong Lin1-9/+11
Reducing the time on HDA link reset can help to reduce the driver loading time. So we replace msleep with usleep_range to get more accurate time control and change the value to a smaller one. And a 100ms timeout is set for both entering and exiting the link reset. Signed-off-by: Xingchao Wang <[email protected]> Signed-off-by: Mengdong Lin <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-10ALSA: HDA: VIA: Add support for codec VT1808.Lydia Wang1-0/+8
Add support for new codec VT1808, which is similiar with VT1705CF. Signed-off-by: Lydia Wang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-10ALSA: HDA: VIA Add support for codec VT1705CF.Lydia Wang1-0/+151
Add support for new codec VT1705CF. When power on/off Audio output converter of VT1705CF, the stream tag will be cleared. But driver caches the value. So when power on Audio output converter, the update_conv_power_state() will restore the saved stream tag of it. Signed-off-by: Lydia Wang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-07ALSA: Remove the rest of __devinit* in commentsTakashi Iwai2-6/+6
Remove the leftover __devinit* in comments. They have been commented out because they couldn't fit with __dev* although they should have matched. Signed-off-by: Takashi Iwai <[email protected]>
2012-12-07ALSA: hda - Remove superfluous DELAYED_INIT*_MARKTakashi Iwai1-15/+7
Since __devinit* have been removed completely, DELAYED_INIT*_MARK in hda_intel.c became NOP. Let's rip them off. Signed-off-by: Takashi Iwai <[email protected]>
2012-12-07ALSA: oxygen: remove __dev* attributesBill Pemberton5-16/+16
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <[email protected]> Acked-by: Clemens Ladisch <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-07ALSA: bt87X: remove __dev* attributesBill Pemberton1-11/+11
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <[email protected]> Acked-by: Clemens Ladisch <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-07ALSA: ad1889: remove __dev* attributesBill Pemberton1-9/+9
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <[email protected]> Cc: Thibaut Varene <[email protected]> Cc: [email protected] Signed-off-by: Takashi Iwai <[email protected]>
2012-12-07ALSA: pci: remove __dev* attributesBill Pemberton105-1005/+1014
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-05ALSA: hda: Add PCI device prefix for clarityDaniel J Blueman1-61/+64
When printing, use a prefix of the PCI domain, bus, device and function as in other drivers, to differentiate multiple devices. Important for reporting and debugging. A future step is to tidy this up with dev_printk et al. v2: Move conversion specifier into call site, preventing build issues v3: Refactor for Takashi's for-next branch Signed-off-by: Daniel J Blueman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2012-12-04ALSA: hda - Fix yet another race of vga_switcheroo registrationTakashi Iwai1-29/+32
The recent fix for vga switcheroo race in commit 128960a9 opened yet another race. At the time the audio driver starts probing, user may turn off D-GPU off. But at this moment, the audio driver still doesn't register the vga switcheroo client, thus the switching isn't notified. Then the hardware gets off out of sudden, resulting in invalid reads and lots of "spurious response" error messages. For solving this situation, the following changes have been done in this patch: - Move again vga switcheroo registration to the very early stage of the probing; this also requires to set pci drvdata properly before registration - Introduce the completion to synchronize the driver probe at vga switcheroo callbacks; this assures that the whole probing finished before executing the callbacks Reported-by: Daniel J Blueman <[email protected]> Tested-by: Daniel J Blueman <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>