aboutsummaryrefslogtreecommitdiff
path: root/sound/pci
AgeCommit message (Collapse)AuthorFilesLines
2013-07-29ALSA: hda - jack poll once if jackpoll_interval==0Wang Xingchao1-2/+4
With jackpoll_interval != 0, it's used to poll jack event periodically in a delayed work. if it's 0, give the caller chance to probe jack status but will not restart the delayed work. In the next patch which enable WAKEEN feature, HDA controller was able to wake up system when it's in D3, it's useful to detect Jack hotplug event and notify userspace. By default the jackpoll_interval=0, this patch let jack poll once without starting the delayed work. Signed-off-by: Wang Xingchao <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-29ALSA: hda - Clearing jackpoll_interval avoid pending workWang Xingchao1-1/+1
Clearing jackpoll_interval before calling cancel_delayed_work_sync(), otherwise the work will be triggered again and cause impact in hda_jackpoll_work(). The next patch will poll jack once even with jackpoll_interval=0. Signed-off-by: Wang Xingchao <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-24ALSA: hda - use azx_writew() for 16-bit length registerWang Xingchao1-4/+4
Register STATESTS is 16-bit length, use correct API for read/write. Signed-off-by: Wang Xingchao <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-24ALSA: hda - Fix the noise after suspend on ALC283 codecKailang Yang1-1/+36
When the power state of ALC283 codec goes to D3, it gives a noise via headphone output. This is because the driver tries to clear all pins via snd_hda_shutup_pins(). Setting the mic pin to zero triggers such a noise. Define a new shutup call specific to this codec and control the pins there more precisely. Also, add the power-save enable/disable sequences in the resume and the new shutup calls. Signed-off-by: Kailang Yang <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-24ALSA: hda/realtek - Selectively call snd_hda_shutup_pins()Takashi Iwai1-4/+4
Instead of calling snd_hda_shutup_pins() unconditionally, allow it be called in spec->shutup callback. In this way, we can avoid calling this function if it causes a problem like we see in the next patch following this. Signed-off-by: Takashi Iwai <[email protected]>
2013-07-21ALSA: replace strict_strto*() with kstrto*()Jingoo Han1-3/+3
The usage of strict_strto*() is not preferred, because strict_strto*() is obsolete. Thus, kstrto*() should be used. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-21ALSA: hda - Add snd_hda_jack_detect_state() helper functionTakashi Iwai3-10/+29
snd_hda_jack_detect() function returns a boolean value for a jack plugged in or not, but it also returns always true when the corresponding pin is phantom (i.e. fixed). This is OK in most cases, but it makes the generic parser misbehaving about the auto-mute or auto-mic switching, e.g. when one of headphone pins is a fixed. Namely, the driver decides whether to mute the speaker or not, just depending on the headphone plug state: if one of the headphone jacks is seen as active, then the speaker is muted. Thus this will result always in the muted speaker output. So, the problem is the function returns a boolean, after all, although we need to think of "phantom" jack. Now a new function, snd_hda_jack_detect_state() is introduced to return these tristates. The generic parser uses this function for checking the headphone or mic jack states. Meanwhile, the behavior of snd_hda_jack_detect() is kept as is, for keeping compatibility in other driver codes. Acked-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-19ALSA: hda - Remove NO_PRESENCE bit override for Dell 1420n LaptopTakashi Iwai1-1/+1
The quirk for Dell laptops with STAC9228 overrides the pin default config of NID 0x0f to the value with AC_DEFCFG_MISC_NO_PRESENCE bit on. I'm not quite sure why this was done so, but can guess that this was introduced for avoiding this to be muted by another headphone plug. Now, after transition to the generic parser, this workaround rather causes a problem (notably as unexpected speaker mutes) because the pin is seen as if it's always plugged in. Since the generic parser can handle multiple headphone plugging gracefully, we can get rid of this override now. Reported-and-tested-by: Eric Shattow <[email protected]> Cc: <[email protected]> [v3.9+] Signed-off-by: Takashi Iwai <[email protected]>
2013-07-19ALSA: hda - Fix EAPD GPIO control for Sigmatel codecsTakashi Iwai1-5/+6
The EAPD GPIO is dynamically turned on/off for some machines with Sigmatel codecs, but this didn't work as expected, and it resulted in spontaneous lost of speaker outputs per HP plugging or power-saving. This patch fixes the bug by simply including spec->eapd_mask into spec->gpio_mask and spec->gpio_data bits. Reported-and-tested-by: Eric Shattow <[email protected]> Cc: <[email protected]> [v3.9+] Signed-off-by: Takashi Iwai <[email protected]>
2013-07-16ALSA: hda - Headphone mic support for an Asus/Conexant deviceDavid Henningsson1-1/+78
This Conexant codec has a single jack that can be used as either headphone or mic (but not headset). The existing hp_mic functionality does not apply here, because the mic and the HP are on separate pins. Hence make a lighter version of what has been earlier done for Realtek codecs. BugLink: https://bugs.launchpad.net/bugs/1198030 Tested-by: Franz Hsieh <[email protected]> Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-16ALSA: hda - Add new GPU codec ID to snd-hdaAaron Plattner1-0/+2
Vendor ID 0x10de0060 is used by a yet-to-be-named GPU chip. Reviewed-by: Andy Ritger <[email protected]> Signed-off-by: Aaron Plattner <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-15ALSA: atiixp: Fix unlocked snd_pcm_stop() callTakashi Iwai2-0/+4
snd_pcm_stop() must be called in the PCM substream lock context. Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-15ALSA: asihpi: Fix unlocked snd_pcm_stop() callTakashi Iwai1-0/+3
snd_pcm_stop() must be called in the PCM substream lock context. Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-15ALSA: hdspm - remove unneeded semicolonFengguang Wu1-1/+1
sound/pci/rme9652/hdspm.c:1110:2-3: Unneeded semicolon Generated by: coccinelle/misc/semicolon.cocci Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-15Merge branch 'for-3.12' into for-nextTakashi Iwai2-4578/+715
2013-07-11Merge tag 'sound-3.11' of ↵Linus Torvalds2-5/+26
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few small fixes (and cleanups) for HD-audio, USB-audio and ASoC" * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: fix regression for fixed stream quirk ALSA: hda - Keep halting ALC5505 DSP ASoC: wm8962: fix NULL pdata pointer ASoC: imx-sgtl5000: return E_PROBE_DEFER if ssi/codec not found ASoC: Samsung: Remove redundant comment ALSA: hda - Fix EAPD vmaster hook for AD1884 & co ASoC: samsung: Remove obsolete GPIO based DT pinmuxing ASoC: mxs: register saif mclk to clock framework
2013-07-10Merge branch 'topic/hda-ad-remove-static' into for-3.12Takashi Iwai1-4351/+177
2013-07-09Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds5-17/+192
Pull drm updates from Dave Airlie: "Okay this is the big one, I was stalled on the fbdev pull req as I stupidly let fbdev guys merge a patch I required to fix a warning with some patches I had, they ended up merging the patch from the wrong place, but the warning should be fixed. In future I'll just take the patch myself! Outside drm: There are some snd changes for the HDMI audio interactions on haswell, they've been acked for inclusion via my tree. This relies on the wound/wait tree from Ingo which is already merged. Major changes: AMD finally released the dynamic power management code for all their GPUs from r600->present day, this is great, off by default for now but also a huge amount of code, in fact it is most of this pull request. Since it landed there has been a lot of community testing and Alex has sent a lot of fixes for any bugs found so far. I suspect radeon might now be the biggest kernel driver ever :-P p.s. radeon.dpm=1 to enable dynamic powermanagement for anyone. New drivers: Renesas r-car display unit. Other highlights: - core: GEM CMA prime support, use new w/w mutexs for TTM reservations, cursor hotspot, doc updates - dvo chips: chrontel 7010B support - i915: Haswell (fbc, ips, vecs, watermarks, audio powerwell), Valleyview (enabled by default, rc6), lots of pll reworking, 30bpp support (this time for sure) - nouveau: async buffer object deletion, context/register init updates, kernel vp2 engine support, GF117 support, GK110 accel support (with external nvidia ucode), context cleanups. - exynos: memory leak fixes, Add S3C64XX SoC series support, device tree updates, common clock framework support, - qxl: cursor hotspot support, multi-monitor support, suspend/resume support - mgag200: hw cursor support, g200 mode limiting - shmobile: prime support - tegra: fixes mostly I've been banging on this quite a lot due to the size of it, and it seems to okay on everything I've tested it on." * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (811 commits) drm/radeon/dpm: implement vblank_too_short callback for si drm/radeon/dpm: implement vblank_too_short callback for cayman drm/radeon/dpm: implement vblank_too_short callback for btc drm/radeon/dpm: implement vblank_too_short callback for evergreen drm/radeon/dpm: implement vblank_too_short callback for 7xx drm/radeon/dpm: add checks against vblank time drm/radeon/dpm: add helper to calculate vblank time drm/radeon: remove stray line in old pm code drm/radeon/dpm: fix display_gap programming on rv7xx drm/nvc0/gr: fix gpc firmware regression drm/nouveau: fix minor thinko causing bo moves to not be async on kepler drm/radeon/dpm: implement force performance level for TN drm/radeon/dpm: implement force performance level for ON/LN drm/radeon/dpm: implement force performance level for SI drm/radeon/dpm: implement force performance level for cayman drm/radeon/dpm: implement force performance levels for 7xx/eg/btc drm/radeon/dpm: add infrastructure to force performance levels drm/radeon: fix surface setup on r1xx drm/radeon: add support for 3d perf states on older asics drm/radeon: set default clocks for SI when DPM is disabled ...
2013-07-08ALSA: hda - Keep halting ALC5505 DSPTakashi Iwai1-2/+17
ALC5505 DSP is enabled even though we don't use the features yet at all. This results in the unnecessarily high power consumption, more than 100mV higher. Until we implement the DSP support, better to bypass DSP for saving more power. Reported-by: Mengdong Lin <[email protected]> [Patch modified by Mengdong to cal alc5505_dsp_init() with extra acl5505_dsp_halt().] Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Added some comments and control register documentationMartin Dausel1-7/+99
Signed-off-by: Martin Dausel <[email protected]> Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Use snd_ctl_enum_info() in snd_hdspm_info_autosync_refAdrian Knoth1-20/+4
Also use snd_ctl_enum_info() to fill the autosync text fields on AES32 and MADI cards (only users of snd_hdspm_info_autosync_ref). Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Use snd_ctl_enum_info() for texts_autosyncAdrian Knoth1-19/+10
Also use snd_ctl_enum_info() to fill the autosync enumerated controls. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Use snd_ctl_enum_info for most text arraysAdrian Knoth1-31/+19
Use snd_ctl_enum_info() to fill most of the enumerated controls. More non-trivial occurrences will follow in separate commits. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Enable TCO supportAdrian Knoth1-0/+1
This patch finally enables TCO support on RME AES(32) cards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Report external sample rate to userspaceAdrian Knoth1-3/+8
This patch adds a new ALSA control to read the external sample rate from userspace on RME AES(32) cards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Introduce hdspm_external_rate_to_enum() helper functionAdrian Knoth1-11/+17
This patch refactors the code to query the external sample rate and its translation into the corresponding enum into a helper function to prevent future code duplication. A later commit will make use of this new helper function. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Include TCO and Sync-In in proc outputAdrian Knoth1-0/+7
Also report TCO status and Sync-In via /proc/ on AES(32) cards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Enable TCO/Sync-In in snd_hdspm_put_sync_ref()Adrian Knoth1-7/+8
This patch enables the user to select "TCO" and "Sync In" as a preferred sync reference on RME AES(32) cards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Enable TCO input in hdspm_external_sample_rate()Adrian Knoth1-9/+28
This patch adds support to read the TCO sample rate in hdspm_external_sample_rate() on RME AES(32) cards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Ignore float/int format bitAdrian Knoth1-0/+10
As mentioned in the comment, the AES32 cards must not set the format bit, since it is used to indicate the preferred sync setting instead. We hence simply skip the corresponding part in the hw_params function. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Enable AES32 in hdspm_get_tco_sample_rateAdrian Knoth1-0/+3
This patch adds AES32 specific code to hdspm_get_tco_sample_rate to query the TCO sample rate. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Enable AES32 in hdspm_get_wc_sample_rateAdrian Knoth1-0/+3
This patch adds AES32 specific code to hdspm_get_wc_sample_rate() to query the wordclock frequency. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Add prototype declarationsAdrian Knoth1-4/+12
This patch only introduces prototype declarations, no real change. The functions themselves are already present. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Introduce hdspm_get_aes_sample_rate()Adrian Knoth1-0/+17
Helper function to return the AES sample rate class. This class needs to be translated via HDSPM_bit2freq() to get the more common representation. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Add TCO and Sync-In text entriesAdrian Knoth1-4/+7
Provide the text for the two new clock options "TCO" and "Sync In" on AES32 cards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AIO: Drop superfluous HDSPM_AUTOSYNC_REFAdrian Knoth1-1/+0
The HDSPM_AUTOSYNC_REF macro is only implemented for MADI and AES32 cards, so it doesn't make sense to call it on AIO boards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Cosmetics, no real changeAdrian Knoth1-5/+7
This patch does nothing, it's sole intent is to clean up the code. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - AES32: Fix TCO sync check reportingAdrian Knoth1-7/+18
HDSPM_tco_lock and HDSPM_tcoLock were too close, so the previous code didn't honour the difference between the two. Let's be more verbose and use HDSPM_tcoLockMadi for MADI cards, HDSPM_tcoLockAes for AES(32) and fix the code that makes use of both. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Create TCO readout functionAdrian Knoth1-60/+77
This patch separates the TCO bits from snd_hdspm_proc_read_madi(), so the new function can later be shared between MADI and AES32 cards. It's essentially only moving code around, no new functionality. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Fix S/PDIF Sync status and frequency on RME AIOAdrian Knoth1-2/+3
This is a left-over mistake from old code, the correct register offset is provided in kcontrol->private_value, not in the index. Cf. RayDAT case, where it has already been corrected. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Add support for AEBs on RME AIOAdrian Knoth1-17/+37
AIO cards allow to use AEB (Analogue Expansion Boards) to add four input and/or output channels. This patch adds the necessary code to detect and enable the additional I/O channels. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Enable AD/DA/PH gains and S/PDIF-Input select on AIOAdrian Knoth1-1/+5
This patch uses the newly introduced HDSPM_CONTROL_TRISTATE functions to create and expose the following ALSA controls: - Gain selection for Input, Output and Phones (HiGain, +4dBu, -10dbV) - S/PDIF Input select (Coaxial, Optical, Internal) Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Introduce generic AIO tristate controlAdrian Knoth1-0/+78
AIO cards offer at least four individual settings options with three states each. Those settings are represented as two bits in the settings register with the following meaning: 0*some_base_bit --> Option value 0 1*some_base_bit --> Option value 1 2*some_base_bit --> Option value 2 3*some_base_bit --> mask to select the two involved bits This patch adds a generic ALSA control macro for such a value-to-bit pattern mapping. It will be used in a later commit to expose four new controls. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Refactor ENUMERATED_CTL_INFO into functionAdrian Knoth1-8/+14
ENUMERATED_CTL_INFO is a macro, so the binary code is generated multiple times. To avoid code duplication, refactor the involved functionality into a function and make ENUMERATED_CTL_INFO a call to this function. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Add S/PDIF, XLR, WCK48 and ADAT-in controls for RME AIO cardsAdrian Knoth1-1/+6
This commit adds the following ALSA controls: - S/PDIF Out Optical to switch S/PDIF Out from coaxial to optical - S/PDIF Out Professional to send the Pro bit in the output stream - ADAT-Internal to enable ADAT/TDIF Expansion Board (AEB/TEB) - XLR Breakout Cable if analogue I/O uses the XLR breakout cable - WCK48 to force WordClock to the 32-48kHz range (single speed) if the card is operating at higher frequencies Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Add S/PDIF and WCK48 controls for RME RayDATAdrian Knoth1-1/+3
This commit adds new ALSA controls to send single-speed WordClock and S/PDIF-Professional on RME RayDAT cards. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Drop duplicate code in hdspm_set_system_clock_mode()Adrian Knoth1-20/+5
hdspm_set_system_clock_mode() is almost a one-by-one copy of hdspm_set_toggle_setting(). To improve code quality, remove the duplication. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Augment HDSPM_TOGGLE_SETTING for AIO/RayDATAdrian Knoth1-4/+23
The HDSPM_TOGGLE_SETTING functions alter the control_register on older cards. On newer cards (AIO/RayDAT), they have to operate on the settings_register instead. This patch augments the existing functions to work with AIO/RayDAT, too. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Introduce hdspm_is_raydat_or_aio()Adrian Knoth1-2/+7
RME RayDAT and AIO cards are new designs with different register settings. Since we need to distinguish them from older cards multiple times in the driver, refactor the code into a separate helper function. No functional change intended. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-05ALSA: hdspm - Add missing defines for RME AIO and RayDATAdrian Knoth1-0/+19
The driver did not support all possible configurations. These defines will be used by later commits to add the missing functionality. Signed-off-by: Adrian Knoth <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>