summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - Refactor quirk picking and change quirk priorityDavid Henningsson2014-07-221-0/+1
| | | | | | | | | | | | Previously, calling one quirk function first and another later would make the latter one take priority, this is now changed to make the former take priority. By adding two special values for fixup_id we can also get rid of the fixup_forced flag. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix invalid function call in snd_hda_add_vmaster()Takashi Iwai2014-06-301-2/+7
| | | | | | | | | | The recent commit [6194b99d: ALSA: hda - Kill the rest of snd_print*() usages] changed the callback map_slaves(), but one call was forgotten to be replaced due to the cast, which leads to kernel Oops due to invalid function. This patch replaces it with a proper function. Fixes: 6194b99de9f5 ('ALSA: hda - Kill the rest of snd_print*() usages') Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Kill the rest of snd_print*() usagesTakashi Iwai2014-06-251-14/+21
| | | | | | | Pass the codec object so that we can replace all the rest of snd_print*() usages with the proper device-specific print helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix registration of beep input deviceTakashi Iwai2014-02-281-1/+7
| | | | | | | | | | | | | | | | | | The beep input device is registered via input_register_device(), but this is called in snd_hda_attach_beep_device() where the sound devices aren't registered yet. This leads to the binding to non-existing object, thus results in failure. And, even if the binding worked (against the PCI object), it's still racy; the input device appears before the sound objects. For fixing this, register the input device properly at dev_register ops of the codec object it's bound with. Also, call snd_hda_detach_beep_device() at dev_disconnection so that it's detached at the right timing. As a bonus, since it's called in the codec's ops, we can get rid of the further call from the other codec drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Replace with standard printkTakashi Iwai2014-02-251-69/+68
| | | | | | | | | | | | Use dev_err() and co for messages from HD-audio controller and codec drivers. The codec drivers are mostly bound with codec objects, so some helper macros, codec_err(), codec_info(), etc, are provided. They merely wrap the corresponding dev_xxx(). There are a few places still calling snd_printk() and its variants as they are called without the codec or device context. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add sysfs to codec object, tooTakashi Iwai2014-02-251-3/+8
| | | | | | | | | | | | We have currently sysfs attributes for each hwdep, but basically these should belong to the codec itself, per se. Let's add them to the codec object while keeping them for hwdep as is for compatibility. While we are at it, split the sysfs-related stuff into a separate source file, hda_sysfs.c, and keep only the stuff necessary for hwdep in hda_hwdep.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Create own device struct for each codecTakashi Iwai2014-02-251-3/+33
| | | | | | | | | | | | | | | As the HD-audio is treated individually in each codec driver, it's more convenient to assign an own struct device to each codec object. Then we'll be able to use dev_err() more easily for each codec, for example. For achieving it, this patch just creates an object "hdaudioCxDy". It belongs to sound class instead of creating a new bus, just for simplicity, at this stage. No pm ops is implemented in the device struct level but currently it's merely a container. The PCM and hwdep devices are now children of this codec device. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Manage each codec instance individuallyTakashi Iwai2014-02-251-11/+25
| | | | | | | | Now each snd_hda_codec instance is managed via the device chain, the registration and release are done by its callback instead of calling from bus. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Create sysfs attribute files via groupsTakashi Iwai2014-02-251-16/+0
| | | | | | | | | | | | Instead of calling each time device_create_file(), create the groups of sysfs attribute files at once in a normal way. Add a new helper function, snd_get_device(), to return the associated device object, so that we can handle the sysfs addition locally. Since the sysfs file addition is done differently now, snd_add_device_sysfs_file() helper function is removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add QEMU codec vendor IDTakashi Iwai2014-02-191-0/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove superfluous inclusion of linux/pci.hTakashi Iwai2014-02-151-1/+0
| | | | | | Some codec drivers still have it since using PCI_VENDOR_ID_*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix undefined symbol due to builtin/module mixupTakashi Iwai2014-02-101-15/+15
| | | | | | | | | | | | | | | | | | Even after the fix for leftover kconfig handling (commit f8f1becf), the current code still doesn't handle properly the builtin/module mixup case between the core snd-hda-codec and other codec drivers. For example, when CONFIG_SND_HDA_INTEL=y and CONFIG_SND_HDA_CODEC_HDMI=m, it'll end up with an unresolved symbol snd_hda_parse_hdmi_codec. This patch fixes the issue. Now codec->parser points to the parser object *only* when a module (either generic or HDMI parser) is loaded and bound. When a builtin symbol is used, codec->parser still points to NULL. This is the difference from the previous versions. Fixes: f8f1becfa4ac ('ALSA: hda - Fix leftover ifdef checks after modularization') Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix leftover ifdef checks after modularizationTakashi Iwai2014-02-071-3/+3
| | | | | | | | | | | | | Since the commit [595fe1b702c3: ALSA: hda - Make CONFIG_SND_HDA_CODEC_* tristate], the kconfig variables for the generic parser and codec drivers can be "m" instead of boolean, but some codes are left unchanged to check only #ifdef CONFIG_SND_HDA_CODEC_XXX, which is no longer true for modules. This patch fixes them by replacing with IS_ENABLED() macros. Fixes: 595fe1b702c3 ('ALSA: hda - Make CONFIG_SND_HDA_CODEC_* tristate') Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70161 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Apply codec power_filter to FG nodesTakashi Iwai2014-01-131-3/+9
| | | | | | | Apply the codec->power_filter to the FG nodes in general for reducing hackish set_power_state ops override in patch_sigmatel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Kill EXPORT_SYMBOL_HDA()Takashi Iwai2013-12-191-107/+107
| | | | | | Replace all with the standard EXPORT_SYMBOL_GPL(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Clean up async codec PM using standard async infrastructureTakashi Iwai2013-12-061-45/+19
| | | | | | | This simplifies lots of codes indeed. Tested-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - allow a codec to define its own depop delay timeMengdong Lin2013-11-291-2/+5
| | | | | | | | | | | | This patch adds 'depop_delay' to struct hda_codec, to indicate a depop delay time in ms when power-down, in function set_power_state() to D3. Default value is -1, for a default delay time. Machine fixup can set a suitable value according to the codec chip and HW audio design. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - resume codecs in parallelMengdong Lin2013-11-271-6/+23
| | | | | | | | | | | | | To reduce driver resume time, this patch resumes the codecs in parallel if there are multiple codecs on the bus. - The PM workqueue of bus is also used to parallel resuming multiple codecs. - The work item 'pm_work' is renamed to 'suspend_work' to parallel suspending codecs. - Add a work item 'resume_work' to parallel resuming codecs. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - suspend codecs in parallelMengdong Lin2013-11-271-2/+45
| | | | | | | | | | | | | | The time to suspend a single codec may be several hundreds of ms. When runtime power saving is disabled, driver suspend time can be long especially when there are more than one codec on the bus. To reduce driver suspend time, this patch creates a work queue for the bus, and suspends the codecs in parallel if there are multiple codecs on the bus. [fixed cosmetic issues by tiwai] Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Disable runtime PM when EPSS is unavailableTakashi Iwai2013-11-261-2/+5
| | | | | | | | | | | According to Mengdong, we shouldn't enable runtime PM when a codec doesn't support EPSS, based on the experiences on Windows. We have already this check in HDMI codec drivers, but now apply it in general in hda_codec.c. Credit goes to Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Refactor pm notification in hda_codec.cTakashi Iwai2013-11-261-23/+14
| | | | | | | | | | | | | | | | | No functional change. - codec->pm_down_notified flag is renamed to codec->pm_up_notified flag (and takes the reversed meaning), which is managed solely in hda_call_pm_notify() now. - The explicit call of hda_call_pm_notify() is moved into hda_keep_power_on(). - Removed a redundant call of hda_call_pm_notify() in snd_hda_power_up(), as it's called in hda_call_codec_resume() anyway. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Bind with HDMI codec parser automaticallyTakashi Iwai2013-11-261-0/+27
| | | | | | | | | If a codec contains only the digital outputs, it's very likely a HDMI/DP codec, which isn't supported by the generic parser but via HDMI codec parser code. Detect such a case and bind with the proper parser object if available. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Split the generic parser as an individual moduleTakashi Iwai2013-11-261-18/+49
| | | | | | | | Drop the hard dependency on the generic parser code and load / unload the generic parser code dynamically if built as a module. This allows us to avoid the generic parser if only HDMI/DP codecs are found. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix unbalanced runtime PM notification at resumeTakashi Iwai2013-11-201-0/+4
| | | | | | | | | | | | | | | | | | When a codec is resumed, it keeps the power on while the resuming phase via hda_keep_power_on(), then turns down via snd_hda_power_down(). At that point, snd_hda_power_down() notifies the power down to the controller, and this may confuse the refcount if the codec was already powered up before the resume. In the end result, the controller goes to runtime suspend even before the codec is kicked off to the power save, and the communication stalls happens. The fix is to add the power-up notification together with hda_keep_power_on(), and clears the flag appropriately. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Don't clear the power state at snd_hda_codec_reset()Takashi Iwai2013-11-131-3/+0
| | | | | | | | | | | | | snd_hda_codec_reset() is called either in resetting the whole setup at error paths or hwdep clear/reconfig sysfs triggers. But all of these don't assume that the power has to be off, rather they want to keep the power state unchanged (e.g. reconfig_codec() calls the power up/down by itself). Thus, unconditionally clearing the power state in snd_hda_codec_reset() leads to the inconsistency, confuses the further operation. This patch gets rid of the lines doing that bad thing. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add sanity check of vmaster slave dB stepsTakashi Iwai2013-11-051-4/+12
| | | | | | | Check whether all vmaster slaves have the same dB steps. Otherwise the behavior would become inconsistent. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix possible zero-divisionTakashi Iwai2013-11-051-2/+7
| | | | | | | | Check the TLV db scale result before actually dividing in vmaster slave init code. Also mask TLV_DB_SCALE_MUTE bit so that the right value is obtained even if this bit is set by the codec driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove locally dead codesTakashi Iwai2013-10-291-2/+1
| | | | | | Reported by coverity. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2013-10-261-2/+2
|\
| * ALSA: hda - Fix unbalanced runtime PM refcount after S3/S4Takashi Iwai2013-10-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | When a machine goes to S3/S4 after power-save is enabled, the runtime PM refcount might be incorrectly decreased because the power-down triggered soon after resume assumes that the controller was already powered up, and issues the pm_notify down. This patch fixes the incorrect pm_notify call simply by checking the current value properly. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Treat zero connection as non-errorTakashi Iwai2013-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The zero-length connection list happens so often on Haswell HDMI, and it results in warning messages like ALSA: hda_codec: invalid CONNECT_LIST verb 5[1]:0 at each time the codec resumes from the power-save, which is fairly annoying. Since this is no real error, make it shown only in the verbose debug mode. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Enable surround speakers (when line out is also present)David Henningsson2013-10-101-5/+14
|/ | | | | | | | | | | | In the case where we have both line out and more than stereo speakers, the speaker DACs will end up in extra_out_nid. In fact, AFAIU, speakers are the only ones that can end up in extra_out_nid, and if we have several of those, they should be surround outputs rather than copy front. BugLink: https://bugs.launchpad.net/bugs/1236965 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - add flags and routines to get devices selection info for DP1.2 MSTMengdong Lin2013-08-271-0/+58
| | | | | | | | | | | | | | | | This patch adds flags and routines to get device list & selection info on a pin. To support Display Port 1.2 multi-stream transport (MST) over single DP port, a pin can support multiple devices. Please refer to HD-A spec Document Change Notificaton HDA040-A. A display audio codec can set flag "dp_mst" in its patch, indicating its pins can support MST. But at runtime, a pin may not be multi-streaming capable and report the device list is empty, depending on Gfx driver configuration. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - jack poll once if jackpoll_interval==0Wang Xingchao2013-07-291-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 <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' of ↵Linus Torvalds2013-07-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "The usual stuff from trivial tree" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits) treewide: relase -> release Documentation/cgroups/memory.txt: fix stat file documentation sysctl/net.txt: delete reference to obsolete 2.4.x kernel spinlock_api_smp.h: fix preprocessor comments treewide: Fix typo in printk doc: device tree: clarify stuff in usage-model.txt. open firmware: "/aliasas" -> "/aliases" md: bcache: Fixed a typo with the word 'arithmetic' irq/generic-chip: fix a few kernel-doc entries frv: Convert use of typedef ctl_table to struct ctl_table sgi: xpc: Convert use of typedef ctl_table to struct ctl_table doc: clk: Fix incorrect wording Documentation/arm/IXP4xx fix a typo Documentation/networking/ieee802154 fix a typo Documentation/DocBook/media/v4l fix a typo Documentation/video4linux/si476x.txt fix a typo Documentation/virtual/kvm/api.txt fix a typo Documentation/early-userspace/README fix a typo Documentation/video4linux/soc-camera.txt fix a typo lguest: fix CONFIG_PAE -> CONFIG_x86_PAE in comment ...
| * treewide: relase -> releaseGeert Uytterhoeven2013-06-281-1/+1
| | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | ALSA: hda - Don't take unresponsive D3 transition too seriousTakashi Iwai2013-06-061-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a codec is powered off, some systems don't respond properly after D3 FG transition, while the driver still expects the response and tries to fall back to different modes (polling and single-cmd). When the fallback happens, the driver stays in that mode, and falling back to the single-cmd mode means it'll loose the unsol event handling, too. The unresponsiveness at D3 isn't too serious, thus this fallback is mostly superfluous. We can gracefully ignore the error there so that the driver keeps the normal operation mode. This patch adds a new bit flag for codec read/write, set in the power transition stage, which is notified to the controller driver via a new bus->no_response_fallback flag. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Introduce bit flags to snd_hda_codec_read/write()Takashi Iwai2013-06-061-21/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_hda_codec_read(), snd_hda_codec_write() & co take the argument "direct" that indicates whether the given NID is a direct reference or an indirect reference. However, the indirect reference is practically unimplemented and never exists. And moreover, we don't need the indication of indirect reference at this high level, as NID can be represented in 16bit values at this point. Meanwhile, there are some cases where it'd be nice to give some operational options to these functions. So, we can reuse this argument as a new bit flag! Pretty frugal, eh? All callers so far pass zero to this argument, thus there is no behavior change by this replacement. The real usage of this new bit option will be added in the following patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Drop hard dependency on CONFIG_SND_DYNAMIC_MINORSTakashi Iwai2013-06-061-4/+15
|/ | | | | | | | | | | | | | Currently HDMI codec driver sets the hard dependency (reverse selection) on CONFIG_SND_DYNAMIC_MINORS because the recent codecs may support more than two PCMs. But, this doesn't mean that we need always this option, since there can be a single PCM stream even with the modern codecs. This patch drops the hard dependency again but give more sensible error message when no enough PCMs are available due to the lack of this option. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Revert "ALSA: hda - Don't set up active streams twice"Takashi Iwai2013-05-101-2/+2
| | | | | | | | | | | | This reverts commit affdb62b815b38261f09f9d4ec210a35c7ffb1f3. The commit introduced a regression with AD codecs where the stream is always clean up. Since the patch is just a minor optimization and reverting the commit fixes the issue, let's just revert it. Reported-and-tested-by: Michael Burian <michael.burian@sbg.at> Cc: <stable@vger.kernel.org> [v3.9+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Fix Oops caused by dereference NULL pointerWang YanQing2013-05-071-0/+3
| | | | | | | | | | | | | | | | | | | The interrupt handler azx_interrupt will call azx_update_rirb, which may call snd_hda_queue_unsol_event, snd_hda_queue_unsol_event will dereference chip->bus pointer. The problem is we alloc chip->bus in azx_codec_create which will be called after we enable IRQ and enable unsolicited event in azx_probe. This will cause Oops due dereference NULL pointer. I meet it, good luck:) [Rearranged the NULL check before the tracepoint and added another NULL check of bus->workq -- tiwai] Signed-off-by: Wang YanQing <udknight@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Disable the sanity check in snd_hda_add_pincfg()Takashi Iwai2013-04-181-0/+6
| | | | | | | | | | | | When pin default configs are overridden via patch option, these are evaluated before fixups are applied. Since some fixups change the whole codec trees and/or add pins dynamically, this sanity check might not pass when pins aren't present at the time the function is called. We may reorder the execution, but an easier fix is simply to disable this sanity check. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Don't call vmaster hook when bus->shutdown is setTakashi Iwai2013-04-171-0/+5
| | | | | | | | | | | | | | | | The flag bus->shutdown implies that the control elements might have been already destroyed. When a codec is resumed at this state and tries to call vmaster hook (e.g. in snd_hda_gen_init()), it would refer to a non-existing object, resulting in Oops in the end. This patch just adds a check of the flag in the caller side for avoiding such a crash. Though, the best would be to clear hook->sw_kctl by the destructor of the corresponding ctl element, but vmaster uses its own private_free, it can't be done easily. So let it be for a while. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'asoc-v3.10' of ↵Takashi Iwai2013-04-151-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.10 A bunch of changes here, the most interesting one subsystem wise being Morimoto-san's work to create snd_soc_component which doesn't do much for now but will be pretty important going forwards: - Add a new component object type which will form the basis of moving to a more generic handling of SoC and off-SoC components, contributed by Kuninori Morimoto. - A fairly large set of cleanups for the dmaengine integration from Lars-Peter Clausen, starting to move towards being able to have a generic driver based on the library. - Performance optimisations to DAPM from Ryo Tsutsui. - Support for mixer control sharing in DAPM from Stephen Warren. - Multiplatform ARM cleanups from Arnd Bergmann. - New CODEC drivers for AK5385 and TAS5086 from Daniel Mack.
| * ALSA: hda - fix typo in proc outputDavid Henningsson2013-04-041-1/+1
| | | | | | | | | | | | | | | | Rename "Digitial In" to "Digital In". This function is only used for proc output, so should not cause any problems to change. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2013-03-221-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | Merge back for-linus branch for the badness table adjustment for VIA codecs * for-linus: ALSA: hda - Fix DAC assignment for independent HP ALSA: hda - Fix abuse of snd_hda_lock_devices() for DSP loader ALSA: hda - Fix typo in checking IEC958 emphasis bit ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls() ALSA: snd-usb: mixer: propagate errors up the call chain ALSA: usb: Parse UAC2 extension unit like for UAC1 ALSA: hda - Fix yet missing GPIO/EAPD setup in cirrus driver
| * ALSA: hda - Fix typo in checking IEC958 emphasis bitTakashi Iwai2013-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | 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: Martin Weishart <martin.weishart@telosalliance.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2013-03-181-12/+23
|\ \ | |/ | | | | Back-merged for refactoring beep stuff.
| * ALSA: hda - Fix snd_hda_get_num_raw_conns() to return a correct valueTakashi Iwai2013-03-121-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - check NULL pointer when creating SPDIF PCM switchMengdong Lin2013-03-071-2/+7
| | | | | | | | | | | | | | | | 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: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud