- 16 4月, 2015 8 次提交
-
-
由 Takashi Iwai 提交于
... and replace with the existing hda-core helper codes. This reduces lots of lines, finally. Since struct hda_bus is now embedded into struct azx, snd_hda_bus_new() is moved and expanded from hda_codec.c to hda_controller.c, accordingly. Also private_free bus ops and private_data field are removed because we no longer need to point azx object from bus (we can use container_of()) The spin locks are consolidated into the single one, bus->reg_lock. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
... including dsp loader helpers. Lots of codes removed. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Embed hdac_stream object into azx_dev, and use a few basic helper functions. The most of helper codes for hdac_stream aren't still used yet. Also this commit disables the tracepoints temporarily due to build problems. It'll be enabled again later. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
One less redirection again. This also requires the change of the call order in the toplevel divers. Namely, the bus has to be created at first before other initializations since the memory allocation ops are called through bus object now. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
One less redirection. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
There is no much merit to keep the HD-audio codec and controller helper codes in separate modules any longer. Let's merge them into a single helper module. This patch just changes Makefile entries to merge two individual modules to one. The only code change is the removal of superfluous MODULE_*() macros in one side. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Copied from the legacy driver code, no transition done yet. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This patch adds the controller helper codes to hda-core library. The I/O access ops are added to the bus ops. The CORB/RIRB, the basic attributes like irq# and iomap address, some locks and the list of streams are added to the bus object, together with the stream object and its helpers. Currently the codes are just copied from the legacy driver, so you can find duplicated codes in both directories. Only constants are removed from the original hda_controller.h. More integration work will follow in the later patches. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 14 4月, 2015 1 次提交
-
-
由 Takashi Iwai 提交于
... and drop bus->rirb_error flag. This makes the code simpler. We treat -EAGAIN from get_response ops as a special meaning: it allows the caller to retry after bus reset. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 13 4月, 2015 1 次提交
-
-
由 Jo-Philipp Wich 提交于
The Lenovo Thinkpad T450 requires the ALC292_FIXUP_TPT440_DOCK as well in order to get working sound output on the docking stations headphone jack. Patch tested on a Thinkpad T450 (20BVCTO1WW) using kernel 4.0-rc7 in conjunction with a ThinkPad Ultradock. Signed-off-by: NJo-Philipp Wich <jow@openwrt.org> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 11 4月, 2015 1 次提交
-
-
由 Yves-Alexis Perez 提交于
This model uses the same dock port as the previous generation. Signed-off-by: NYves-Alexis Perez <corsac@debian.org> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 10 4月, 2015 1 次提交
-
-
由 Takashi Iwai 提交于
A comma was used instead of a semicolon, which may lead to a build error. Fixes: cffd3966 ('ALSA: hda/realtek - Fix the regression by widget power-saving') Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 09 4月, 2015 7 次提交
-
-
由 Takashi Iwai 提交于
Similar like the case for Realtek, VIA codec driver needs this ops as well for making the widget power-save working. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
While enabling the widget power-saving for ALC269 & co, the important setup was forgotten -- stream_pm ops. Without this setup, the paths for PCM won't be powered up at all. Also, the power_filter callbacks used in ALC269 & co need to chain to the default snd_hda_gen_path_power_filter(). Tested-by: NHui Wang <hui.wang@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Currently the generic parser sets codec->power_filter when power_save_node flag is set. But this overrides the existing filter that has been already set by the codec driver, thus it looses some features. Instead, set the default power_filter only when it's not set yet. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Add the check of power_save_node flag at the beginning of the function so that it skips the rest if the flag isn't set. In this way, we can call this function safely no matter whether the widget power-saving is really used or not. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
When the widget power-saving is enabled, the first automute hook invocation checks through the whole pins and it also tries to synchronize the power state. However, this results in a wrong state because it calls unconditionally snd_hda_jack_detect_state(). This patch adds a check of jack detectability before the actual jack detection call. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The new widget power-saving tries to apply the power change no matter whether the node has a power cap or not. It's bad (although most of codecs chip just ignore it). Check the capability properly beforehand. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Some BIOS version of Fujitsu Lifebook T731 seems to set up the headphone pin (0x21) without the assoc number 0x0f while it's set only to the output on the docking port (0x1a). With the recent commit [03ad6a8c: ALSA: hda - Fix "PCM" name being used on one DAC when there are two DACs], this resulted in the weird mixer element mapping where the headphone on the laptop is assigned as a shared volume with the speaker and the docking port is assigned as an individual headphone. This patch improves the situation by correcting the headphone pin config to the more appropriate value. Reported-and-tested-by: NTaylor Smock <smocktaylor@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 08 4月, 2015 4 次提交
-
-
由 Takashi Iwai 提交于
Currently, snd_hdac_power_up()/down() helpers checks whether the codec is being in pm (suspend/resume), and skips the call of runtime get/put during it. This is needed as there are lots of power up/down sequences called in the paths that are also used in the PM itself. An example is found in hda_codec.c::codec_exec_verb(), where this can power up the codec while it may be called again in its power up sequence, too. The above works in most cases, but sometimes we really want to wait for the real power up. For example, the control element get/put may want explicit power up so that the value change is assured to reach to the hardware. Using the current snd_hdac_power_up(), however, results in a race, e.g. when it's called during the runtime suspend is being performed. In the worst case, as found in patch_ca0132.c, it can even lead to the deadlock because the code assumes the power up while it was skipped due to the check above. For dealing with such cases, this patch makes snd_hdac_power_up() and _down() to two variants: with and without in_pm flag check. The version with pm flag check is named as snd_hdac_power_up_pm() while the version without pm flag check is still kept as snd_hdac_power_up(). (Just because the usage of the former is fewer.) Then finally, the patch replaces each call potentially done in PM with the new _pm() variant. In theory, we can implement a unified version -- if we can distinguish the current context whether it's in the pm path. But such an implementation is cumbersome, so leave the code like this a bit messy way for now... Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96271Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Kailang Yang 提交于
Dell create new platform with ALC288 codec. This patch will enable headset mode for Dino platform. [slight code refactoring and compile fix by tiwai] Signed-off-by: NKailang Yang <kailang@realtek.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Kailang Yang 提交于
Support headset mode for ALC286 and ALC288 platforms. Signed-off-by: NKailang Yang <kailang@realtek.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Kailang Yang 提交于
Pin sense will active when power pin is wake up. Power pin will not wake up immediately during resume state. Add some delay to wait for power pin activated. Signed-off-by: NKailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 07 4月, 2015 1 次提交
-
-
由 Libin Yang 提交于
HDMI/DP codec on SKL/BSW is in the power well. The power well must be turned on before probing the HDMI/DP codec. This is a temporary patch, which will power on the powerwell by adding AZX_DCAPS_I915_POWERWELL for SKL and BSW. After restructuring and new flag is added, this patch will be reverted. Signed-off-by: NLibin Yang <libin.yang@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 04 4月, 2015 4 次提交
-
-
由 Sudip Mukherjee 提交于
we are dereferencing pcm first then checking pcm. instead now lets put them in same if condition so that pcm is checked first. Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Kailang Yang 提交于
Dell new platform of ALC256 audio codec. Support headset mode for Dell ALC256 platform. Signed-off-by: NKailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Recent Realtek codecs support the finer power state control on each widget. Let's enable the new feature. Tested-by: NHui Wang <hui.wang@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
So far we assumed that the node attributes like amp values remain during the power state transition of the node itself. While this is true for IDT/STAC codecs I've tested, but some other codecs don't seem behaving in that way. This patch implements a partial sync mechanism specific to the given widget node. Now we've merged the regmap support, and it can be easily written with regcache_sync_region(). Tested-by: NHui Wang <hui.wang@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 26 3月, 2015 2 次提交
-
-
由 Hui Wang 提交于
We have a HP machine which use the codec node 0x17 connecting the internal speaker, and from the node capability, we saw the EAPD, if we don't set the EAPD on for this node, the internal speaker can't output any sound. Cc: <stable@vger.kernel.org> BugLink: https://bugs.launchpad.net/bugs/1436745Signed-off-by: NHui Wang <hui.wang@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Libin Yang 提交于
The total stream number of Sunrise Point's input and output stream exceeds 15, which will cause some streams do not work because of the overflow on SDxCTL.STRM field if using the legacy stream tag allocation method. This patch uses the new stream tag allocation method by add the flag AZX_DCAPS_SEPARATE_STREAM_TAG for Skylake platform. Signed-off-by: NLibin Yang <libin.yang@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 25 3月, 2015 2 次提交
-
-
由 W. Trevor King 提交于
My codec has a beep-generating node: $ cat /proc/asound/card1/codec#0 Codec: VIA VT1802 ... Vendor Id: 0x11068446 Subsystem Id: 0x15587410 Revision Id: 0x100000 ... Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1 Amp-Out vals: [0x0a] Power states: D0 D1 D2 D3 Power: setting=D0, actual=D0 ... But I was missing the: Control: name=... entries that I need to manage this widget from alsamixer. With this patch (based on the similar Mono Amp-Out handling in patch_conexant.c), I get a new: input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card1/hdaudioC1D0/input15 entry in dmesg and controls to manage that beep: $ cat /proc/asound/card1/codec#0 | grep -A5 Beep Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out Control: name="Beep Playback Volume", index=0, device=0 ControlAmp: chs=1, dir=Out, idx=0, ofs=0 Control: name="Beep Playback Switch", index=0, device=0 ControlAmp: chs=1, dir=Out, idx=0, ofs=0 Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1 Amp-Out vals: [0x12] Power states: D0 D1 D2 D3 Power: setting=D0, actual=D0 [rebased and modified for the latest tree by tiwai] Signed-off-by: NW. Trevor King <wking@tremily.us> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Just forgotten to remove. It's now in sound/hdaudio.h. Reported-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 24 3月, 2015 1 次提交
-
-
由 Sebastian Wicki 提交于
This model uses the same dock port as the previous generation. Signed-off-by: NSebastian Wicki <gandro@gmx.net> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 23 3月, 2015 7 次提交
-
-
由 Takashi Iwai 提交于
Like the previous patches, this patch converts also to the regmap, at this time, the cached verb writes are the target. But this conversion needs a bit more caution than before. - In the old code, we just record any verbs as is, and restore them at resume. For the regmap scheme, this doesn't work, since a few verbs like AMP or DIGI_CONVERT are asymmetrical. Such verbs are converted either to the dedicated function (snd_hda_regmap_xxx_amp()) or changed to the unified verb. - Some verbs have to be declared as vendor-specific ones before accessing via regmap. Also, the minor optimization with codec->cached_write flag is dropped in a few places, as this would confuse the operation. Further optimizations will be brought in the later patches, if any. This conversion ends up with a drop of significant amount of codes, mostly the helper codes that are no longer used. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The amp hash table was used for recording the cached reads of some capability values like pin caps or amp caps. Now all these are moved to regmap as well. One addition to the regmap helper is codec->caps_overwriting flag. This is set in snd_hdac_override_parm(), and the regmap helper accepts any register while this flag is set, so that it can overwrite even the read-only verb like AC_VERB_PARAMETERS. The flag is cleared immediately in snd_hdac_override_parm(), as it's a once-off flag. Along with these changes, the no longer needed amp hash and relevant fields are removed from hda_codec struct now. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This patch converts the amp access functions to the regmap helpers. The amp values were formerly cached in the own hash table. Now it's dropped by the regmap's cache. The only tricky conversion is snd_hda_codec_amp_init(). This function shouldn't do anything if the amp was already initialized. For achieving this behavior, a value is read once at first temporarily in the cache-only mode. Only if it returns an error, i.e. the item still doesn't exist in the cache, it proceeds to the update. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Sometimes we need the uncached reads, e.g. for refreshing the tree. This patch provides the helper function for that and uses it for refreshing widgets, reading subtrees and the whole proc reads. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Let's start converting the access functions to regmap. The first one is the simplest, just converting the codec parameter read helper function snd_hda_param_read(). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This patch adds an infrastructure to support regmap-based verb accesses. Because o the asymmetric nature of HD-audio verbs, especially the amp verbs, we need to translate the verbs as a sort of pseudo registers to be mapped uniquely in regmap. In this patch, a pseudo register is built from the NID, the AC_VERB_GET_* and 8bit parameters, i.e. almost in the form to be sent to HD-audio bus but without codec address field. OTOH, for writing, the same pseudo register is translated to AC_VERB_SET_* automatically. The AC_VERB_SET_AMP_* verb is re-encoded from the corresponding AC_VERB_GET_AMP_* verb and parameter at writing. Some verbs has a single command for read but multiple for writes. A write for such a verb is split automatically to multiple verbs. The patch provides also a few handy helper functions. They are designed to be accessible even without regmap. When no regmap is set up (e.g. before the codec device instantiation), the direct hardware access is used. Also, it tries to avoid the unnecessary power-up. The power up/down sequence is performed only on demand. The codec driver needs to call snd_hdac_regmap_exit() and snd_hdac_regmap_exit() at probe and remove if it wants the regmap access. There is one flag added to hdac_device. When the flag lazy_cache is set, regmap helper ignores a write for a suspended device and returns as if it was actually written. It reduces the hardware access pretty much, e.g. when adjusting the mixer volume while in idle. This assumes that the driver will sync the cache later at resume properly, so use it carefully. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
This will be used by the regmap support. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-