- 20 3月, 2013 1 次提交
-
-
由 Takashi Iwai 提交于
There is a typo in convert_to_spdif_status() about checking the emphasis IEC958 status bit. It should check the given value instead of the resultant value. Reported-by: NMartin Weishart <martin.weishart@telosalliance.com> Cc: <stable@vger.kernel.org> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 12 3月, 2013 1 次提交
-
-
由 Takashi Iwai 提交于
In the connection list expansion in hda_codec.c and hda_proc.c, the value returned from snd_hda_get_num_raw_conns() is used as the array size to store the connection list. However, the function returns simply a raw value of the AC_PAR_CONNLIST_LEN parameter, and the widget list with ranges isn't considered there. Thus it may return a smaller size than the actual list, which results in -ENOSPC in snd_hda_get_raw_conections(). This patch fixes the bug by parsing the connection list correctly also for snd_hda_get_num_raw_conns(). Reported-and-tested-by: NDavid Henningsson <david.henningsson@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 07 3月, 2013 2 次提交
-
-
由 Mengdong Lin 提交于
If the new control cannot be created, this function will return to avoid snd_hda_ctl_add dereferencing a NULL control pointer. Signed-off-by: NMengdong Lin <mengdong.lin@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Mengdong Lin 提交于
If the SPDIF control array cannot be reallocated, the function will return to avoid dereferencing a NULL pointer. Signed-off-by: NMengdong Lin <mengdong.lin@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 13 2月, 2013 1 次提交
-
-
由 Takashi Iwai 提交于
The commit [dcda5806: ALSA: hda - Add workaround for conflicting IEC958 controls] introduced a workaround for cards that have both SPDIF and HDMI devices for giving device=1 to SPDIF control elements. It turned out, however, that this workaround doesn't work well - - The workaround checks only conflicts in a single codec, but SPDIF and HDMI are provided by multiple codecs in many cases, and - ALSA mixer abstraction doesn't care about the device number in ctl elements, thus you'll get errors from amixer such as % amixer scontrols -c 0 ALSA lib simple_none.c:1551:(simple_add1) helem (MIXER,'IEC958 Playback Switch',0,1,0) appears twice or more amixer: Mixer hw:0 load error: Invalid argument This patch fixes the previous broken workaround. Instead of changing the device number of SPDIF ctl elements, shift the element indices of such controls up to 16. Also, the conflict check is performed over all codecs found on the bus. HDMI devices will be put to dev=0,index=0 as before. Only the conflicting SPDIF device is moved to a different place. The new place of SPDIF device is supposed by the updated alsa-lib HDA-Intel.conf, respectively. Reported-by: NStephan Raue <stephan@openelec.tv> Reported-by: NAnssi Hannula <anssi.hannula@iki.fi> Cc: <stable@vger.kernel.org> [v3.8] Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 08 2月, 2013 2 次提交
-
-
由 Mengdong Lin 提交于
A codec may allow software to hide some unused pin/cvt widgets. Sometimes BIOS does not enable the hidden widgets properly although they are needed for the board. Thus the driver need to enable them as a board-specific fixup and the whole tree will change. This patch implements a common code for rereading codec widgets. So the fixup code can call it after enabling the hidden widgets. Signed-off-by: NMengdong Lin <mengdong.lin@intel.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Currently we set the max number of connections to be 32, but there seems codec that gives longer connection lists like AD1988, and we see errors in proc output and else. (Though, in the case of AD1988, it's a list of all codecs connected to a single vendor widget, so this must be something fishy, but it's still valid from the h/w design POV.) This patch tries to remove this restriction. For efficiency, we still use the fixed size array in the parser, but takes a dynamic array when the size is reported to be greater than that. Now the fixed array size is found only in patch_hdmi.c, but it should be fine, as the codec itself can't support so many pins. Reported-by: NRaymond Yau <superquad.vortex2@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 25 1月, 2013 3 次提交
-
-
由 Takashi Iwai 提交于
... for small refactoring. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Put the power state synchronization at the end of the parsing of codec. This is necessary when the power filter is changed during the codec probe. Since the first power-up sequence is performed without the special filter, all widgets are supposed to be ON at this point. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Add a hook to struct hda_codec for filtering the target power state of each widget when powering up/down. The current hackish EAPD check is implemented as the default hook pointer, too. This allows codec drivers to implement own power filter. In the upcoming changes, the generic parser will have the better power filter based on the active paths. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 23 1月, 2013 1 次提交
-
-
由 Takashi Iwai 提交于
The commit [26a6cb6c: ALSA: hda - Implement a poll loop for jacks as a module parameter] introduced the polling jack detection code, but it also moved the call of snd_hda_jack_set_dirty_all() in the resume path after resume/init ops call. This caused a regression when the jack state has been changed during power-down (e.g. in the power save mode). Since the driver doesn't probe the new jack state but keeps using the cached value due to no dirty flag, the pin state remains also as if the jack is still plugged. The fix is simply moving snd_hda_jack_set_dirty_all() to the original position. Reported-by: NManolo Díaz <diaz.manolo@gmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 22 1月, 2013 1 次提交
-
-
由 Takashi Iwai 提交于
Since both snd_hda_codec_flush_amp_cache() and snd_hda_codec_flush_cmd_cache() are called usually at the same time, we can simply combine them to a single function, snd_hda_codec_flush_cache(). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 15 1月, 2013 1 次提交
-
-
由 David Henningsson 提交于
Obvious copy-paste error. Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 12 1月, 2013 15 次提交
-
-
由 Takashi Iwai 提交于
The pincfgs, init_verbs and hints set by sysfs or patch might be changed dynamically on the fly, thus we need to protect it. Add a simple protection via a mutex. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Check more strictly about the validity of pinctl values in snd_hda_set_pin_ctl() and correct the wrong bits automatically. Also provide the helper function to correct pinctl bits to codec drivers. This automatically fixes the invalid pinctl writes that are found in a few Realtek fixups for NID 0x0f amp like ASUS A6Rp. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
We already have the list of whole pin widgets and there is an unused space in the list; let's use it for caching the current pinctl value. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
We don't have to set up a stream that has been already set up previously. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Manage the connection list cache using linked lists instead of snd_array, and revive snd_hda_get_conn_list() again, so that we don't have to keep the expanded values locally. This will reduce the stack usage by recursive call of snd_hda_get_conn_index() or parse_nid_path() of the generic parser. The list management doesn't include any mutex protection, thus the caller needs to take care of race appropriately. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Old codecs like AD1986A tend to have long paths as they were just made to be the way like AC97. The current max depth 5 can be too short for such devices. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The access to a cache array element could be invalid outside the mutex, so copy locally for the later references. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The dirty entry has to be checked at the beginning in the loop, not in the inner loop for channels. This caused a regression that the right channel isn't properly written. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Add an overflow check of CORB in HD-audio controller and codec drivers so that flood of sequential writes would work properly. In the controller side, add a check of CORB read-pointer to make returning -EAGAIN when it's full. Meanwhile in the codec side, when -EAGAIN error is received, it retries the write after flushing the pending verbs (calling get_response() essentially does it). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
These functions are supposed to be called at finishing the cached sequential writes, so clear the flag properly for lazy developers who often forget details. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
When verbs or amps are actually written to the hardware, we can clear dirty flag so that the later snd_hda_codec_resume_*() calls can skip these verbs / amps. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
The commit [2e9bf247: ALSA: hda_codec: Check for invalid zero connections] trims the whole connection list when an invalid value is reported by the hardware. But some codecs (at least AD1986A) may give a zero NID in the middle of the connection list, so dropping the whole list isn't good for such cases. In this patch, as a workaround, allow a single zero NID in the read connection list. If it hits zero twice, it's handled as an error, so that we can avoid "too many connections" errors. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
Since the fixup code is used commonly, it's worth to move it to the common place, struct hda_codec, instead of keeping in hda_gen_spec. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
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: NTakashi Iwai <tiwai@suse.de>
-
由 Takashi Iwai 提交于
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: NTakashi Iwai <tiwai@suse.de>
-
- 03 1月, 2013 1 次提交
-
-
由 David Henningsson 提交于
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: NDavid Henningsson <david.henningsson@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 07 12月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
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: NTakashi Iwai <tiwai@suse.de>
-
- 01 12月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
The same type of code is being used in multiple places in various codec drivers, so put it as a core library. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 28 11月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
This is a preliminary patch for introducing a protection to access races of snd_array instances. Call snd_array_init() appropriately at the initialization time and don't call it twice. Also the allocations of codec-spec structs are cleaned up by helper functions in patch_sigmatel.c and patch_analog.c. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 24 11月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
I forgot this again... codec->in_pm is in #ifdef CONFIG_PM Reported-by: NMarkus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 23 11月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
Since we keep the pin default config values anyway internally, we don't have to set the values in the codec. This patch removes the code writing the pincfg values. As a gratis bonus, we can remove also the code restoring the original pincfg values at PM resume or module free. This will give us more benefit, as it can reduce the unnecessary power-up of codecs. This won't change the driver functionality. The only difference would be that the codec proc file will show the original pincfg values instead of the actually referred values. The actually referred values can be determined from sysfs *_pin_configs files. (Also hda-emu was updated to follow this change.) Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 19 11月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
When the bus reset is performed during the suspend/resume (including the power-saving too), it calls snd_hda_suspend() and snd_hda_resume() again, and deadlocks eventually. For avoiding the recursive call, add a new flag indicating that the PM is being performed, and don't go to the bus reset mode when it's on. Reported-and-tested-by: NJulian Wollrath <jwollrath@web.de> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 09 11月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
When 2.1 speakers are detected, use the corresponding channel map instead of the standard map with front+rear surrounds. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 04 11月, 2012 1 次提交
-
-
由 Laurence Darby 提交于
Starting audio or seeking in various music players causes setup_dig_out_stream() to be called, which resets the SPDIF stream, which caused one DAC (but not another) to make a clicking noise every time. This patch ensures the reset only happens when it needs to, which is when the format changes, and makes the code a little more readable. Signed-off-by: NLaurence Darby <ldarby@tuffmail.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 17 10月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
When both an SPDIF and an HDMI device are created on the same card instance, multiple IEC958 controls are created with indices=0, 1, ... But the alsa-lib configuration can't know which index corresponds actually to which PCM device, and both the SPDIF and the HDMI configurations point to the first IEC958 control wrongly. This patch introduces a (hackish and ugly) workaround: the IEC958 controls for the SPDIF device are re-labeled with device=1 when HDMI coexists. The device=1 corresponds to the actual PCM device for SPDIF, so it's anyway a better representation. In future, HDMI controls should be moved with the corresponding PCM device number, too. Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 15 10月, 2012 1 次提交
-
-
由 David Henningsson 提交于
Now that we have a generic unsol mechanism, we can implement a generic poll loop, which can be used for debugging, or if a codec's unsol mechanism is broken. Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com> Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-
- 10 10月, 2012 1 次提交
-
-
由 Takashi Iwai 提交于
Better to add a sanity check as I tend to forget something (especially during crazy midsummer nights). Signed-off-by: NTakashi Iwai <tiwai@suse.de>
-