summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2015-04-11ALSA: emu10k1: handle dock disconnectsMichael Gernoth
When the dock on an E-mu 1010 card is disconnected, all outputs get muted by the hardware. Add logic to detect a disconnect and unmute. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11ALSA: hda - Add dock support for ThinkPad X250 (17aa:2226)Yves-Alexis Perez
This model uses the same dock port as the previous generation. Signed-off-by: Yves-Alexis Perez <corsac@debian.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-11ALSA: seq: fill client ID in return value of pool operationTakashi Sakamoto
The returned value of 'get/seq client pool' operation has zeroed value for its client ID, against requested client ID. This commit fix the bug by filling it with index value of referred client object. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10ASoC: Intel: Use the generic IPC/mailbox APIs in BroadwellJin Yao
Use the generic IPC/mailbox APIs to replace the original processing code for Broadwell platform. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: Intel: Use the generic IPC/mailbox APIs in BaytrailJin Yao
Use the generic IPC/mailbox APIs to replace the original processing code for Baytrail platform. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: Intel: Refactor common IPC/mailbox code into generic APIsJin Yao
Currently in Intel SST driver, some similar IPC/mailbox processing code are used in different platforms (e.g. in baytrail/broadwell). This patch extracts the common code and creates new files (sst-ipc.c/sst-ipc.h) to contain the common code and provide the generic APIs for IPC/mailbox processing. Signed-off-by: Jin Yao <yao.jin@linux.intel.com> Acked-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: fsl: Add the audio interface acronyms in Kconfig textFabio Estevam
To keep consistency with the other Kconfig entries, use the audio interface acronyms (SSI and SPDIF) in the Kconfig menu text. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: core: call snd_soc_runtime_set_dai_fmt() before soc_new_pcm()Kuninori Morimoto
Current snd_soc_runtime_set_dai_fmt() is called after soc_probe_link_dais(). this means snd_soc_dai_set_fmt() will be called after soc_new_pcm(). Before appling 1efb53a220b78fdfdbb97b726a2156713e75bdab (ASoC: simple-card: Remove support for setting differing DAI formats) simple-card user had (1) snd_soc_dai_set_fmt() -> soc_new_pcm(), but, after that it is (2) soc_new_pcm() -> snd_soc_dai_set_fmt(). At least rsnd driver is assuming (1) pattern. This patch move snd_soc_dai_set_fmt() into soc_probe_link_dais() after the dai_link->init section to solve this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10Merge branch 'topic/dapm-dt' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
2015-04-10Merge branch 'topic/delay' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
2015-04-10ASoC: fsl_ssi: Use devm_ioremap_resource()Fabio Estevam
Using platform_get_resource() and devm_ioremap_resource() can make the code a bit simpler. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ALSA: emu10k1: don't deadlock in proc-functionsMichael Gernoth
The functions snd_emu10k1_proc_spdif_read and snd_emu1010_fpga_read acquire the emu_lock before accessing the FPGA. The function used to access the FPGA (snd_emu1010_fpga_read) also tries to take the emu_lock which causes a deadlock. Remove the outer locking in the proc-functions (guarding only the already safe fpga read) to prevent this deadlock. [removed superfluous flags variables too -- tiwai] Signed-off-by: Michael Gernoth <michael@gernoth.net> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10ASoC: fsl_ssi: Use devm_snd_soc_register_component()Fabio Estevam
Using devm_snd_soc_register_component() can make the code shorter and cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ASoC: ak4642: fixup channels_minKuninori Morimoto
ak4642 doesn't have Mono record, ak4643 have it, but not supported. This patch fixes channel mismatch Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-10ALSA: hda/realtek - Fix a typoTakashi Iwai
A comma was used instead of a semicolon, which may lead to a build error. Fixes: cffd39668177 ('ALSA: hda/realtek - Fix the regression by widget power-saving') Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-10ALSA: ctl: evaluate macro instead of numerical valueTakashi Sakamoto
SNDRV_CTL_TLV_OP_XXX is defined but not used in core code. Instead, raw numerical value is evaluated. This commit replaces these values to these macros for better looking. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: usb - Creative USB X-Fi Pro SB1095 volume knob supportDmitry M. Fedin
Adds an entry for Creative USB X-Fi to the rc_config array in mixer_quirks.c to allow use of volume knob on the device. Adds support for newer X-Fi Pro card, known as "Model No. SB1095" with USB ID "041e:3237" Signed-off-by: Dmitry M. Fedin <dmitry.fedin@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/via - Add missing stream_pm ops setupTakashi 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: Takashi Iwai <tiwai@suse.de>
2015-04-09ASoC: Don't try to register debugfs entries if the parent does not existLars-Peter Clausen
If the registration of a debugfs directory fails this is treated as a non-fatal error in ASoC and operation continues as normal. This means we need to be careful and check if the parent debugfs directory exists if we try to register a debugfs file or sub-directory. Otherwise we might end up passing NULL for the parent and the file or directory will be registered in the top-level debugfs directory. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09ASoC: Make soc_dpcm_debugfs_add() non-fatalLars-Peter Clausen
Failing to register the debugfs entries is not fatal and will not affect normal operation of the sound card. Don't abort the card registration if soc_dpcm_debugfs_add() fails. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09ASoC: rt286: Restore default in probeBard Liao
RT286 can't do register reset. If the hardware power is still existing in power off, rt286 will keep the register settings. So, we need to restore the default register value in probe to make sure the cache value is the same as the real register value. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09ASoC: Create card debugfs directory earlierLars-Peter Clausen
Create the card debugfs directory at the begining of the initilization rather then the end as various steps in the initilization sequence will try to register files and sub-directories in the card directory. Fixes: 4e2576bd36a1 ("ASoC: soc-core: initialize debugfs in snd_soc_instantiate_card()") Reported-by: Fabio Estevam <festevam@gmail.com> Reported-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09Merge tag 'v4.0-rc7' into asoc-coreMark Brown
Linux 4.0-rc7
2015-04-09ALSA: hda/realtek - Fix the regression by widget power-savingTakashi 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: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09ASoC: Intel: do cast earlier in sst_cdev_tstamp()Dan Carpenter
My static checker complains about these because it looks like the multiply can overflow and then we cast to a larger data type. I don't think this is a problem, but it's also harmless to do the cast earlier so let's silence the static checker warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-09ALSA: hda/generic - Don't override power_filter when power_save_node is setTakashi 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: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/generic - Make snd_hda_gen_path_power_filter() always applicableTakashi 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: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/generic - Fix wrong initial power state for fixed pinsTakashi 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: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda/generic - Check power state cap at updating the widget powerTakashi 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: Takashi Iwai <tiwai@suse.de>
2015-04-09ALSA: hda - Always allow access for POWER_STATE verbs via regmapTakashi Iwai
The hdac regmap code checks whether the codec is powered on while accessing, but there must be an exception -- the verbs to control the power state. Currently HD-audio driver doesn't access them via regmap, so this patch doesn't fix any current behavior, but it's just for future. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-09Merge branch 'iocb' into for-davemAl Viro
trivial conflict in net/socket.c and non-trivial one in crypto - that one had evaded aio_complete() removal. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-04-08ASoC: tegra_wm9712: Use card DAPM context to access widgetsLars-Peter Clausen
The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: tegra_wm8903: Use card DAPM context to access widgetsLars-Peter Clausen
The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: tegra_rt5677: Use card DAPM context to access widgetsLars-Peter Clausen
The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: tegra_alc5632: Use card DAPM context to access widgetsLars-Peter Clausen
The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08Merge branch 'topic/jack' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-tegra
2015-04-08ALSA: hda - Fix headphone pin config for Lifebook T731Takashi 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 [03ad6a8c93b6: 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: Taylor Smock <smocktaylor@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ASoC: wm8804: Enable runtime PMCharles Keepax
Currently both the oscillator and the PLL are powered up in set_bias_level. This can be problematic when using output clocks from the wm8804 for other devices. The snd_soc_codec_set_pll API defines that a clock should be available once the call returns, however, with all the clocking controlled in set_bias_level this is not currently the case. This patch enables pm_runtime for the wm8804, enabling both the regulators and the oscillator when the chip resumes, and enabling the PLL in the snd_soc_codec_set_pll call. Naturally the enabling the PLL will also cause the chip to resume. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: wm8804: Add DAPM widgets for SPDIF/AIFSapthagiri Baratam
This change converts the driver to use DAPM to control the power for the various blocks on the chip. As part of this change the existing controls "TX Playback Switch" (controlled power for the SPDIF TX block) and "AIF Playback Switch" (controlled power for the AIF block) are both removed, as they are now redundant since the power state of those blocks is controlled automatically by DAPM. There are several benefits of this change, the most important of which is this change adds support for powering down the SPDIF RX block. The RX block will automatically assume control of the PLL on the chip when it is receiving a signal, so leaving this enabled all the time as was currently done in the driver can be problematic. An incoming SPDIF signal that is not being used can completely destroy the clocking for an in use TX signal. But this change ensures that the RX block will only be powered when the user intends to be receiving data, thus avoiding this issue. Additional benefits include the chip being simpler to operate as the power no longer needs to be manually controlled between use-cases and a small power saving (although it is acknowledged that this is likely unimportant in the typical use-cases for this chip). Signed-off-by: Sapthagiri Baratam <sapthagiri.baratam@incubesol.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: max98090: add shutdown callback for max98090Caesar Wang
To fix pop noise when shutdown,the pop noise during shutdown is the pmic cutoff power of codec without any notice. Signed-off-by: jay.xu <xjq@rock-chips.com> Signed-off-by: zhengxing <zhengxing@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ASoC: Intel: remove unused functionsSudip Mukherjee
these functions were never called by anyone. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ALSA: bebob: fix to processing in big-endian machine for sending cueTakashi Sakamoto
Some M-Audio devices require to receive bootup command just after powering on, while codes in BeBoB driver doesn't work properly in big-endian machine because the command should be aligned by little-endian. This commit fixes this bug. This fix should go to stable kernel. Cc: Takayuki Shiroma <t.shiroma.oki@gmail.com> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda - Work around races of power up/down with runtime PMTakashi 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=96271 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ASoC: Intel: Fix a buffer overflow issueJie Yang
0day robot reported a buffer overflow issue: ... sound/soc/intel/haswell/sst-haswell-pcm.c:1107 hsw_pcm_probe() error: buffer\ overflow 'hsw_dais' 4 <= 4 sound/soc/intel/haswell/sst-haswell-pcm.c:1109 hsw_pcm_probe() error: buffer\ overflow 'hsw_dais' 4 <= 4 ... Fix it by initializing the index(i) to correct value. Signed-off-by: Jie Yang <yang.jie@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-04-08ALSA: hda - Create AFG sysfs node at lastTakashi Iwai
... so that user-space can know that the whole nodes have been created. Unfortunately, this can't be implemented easily in race-free way, so it's a kind of compromise. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda/realtek - Support Dell headset mode for ALC288Kailang 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: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda/realtek - Support headset mode for ALC286/288Kailang Yang
Support headset mode for ALC286 and ALC288 platforms. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08Merge branch 'for-linus' into for-nextTakashi Iwai
Back merge HD-audio quirks to for-next branch, so that we can apply a couple of more quirks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-08ALSA: hda/realtek - Make more stable to get pin sense for ALC283Kailang 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: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-07ALSA: hda_intel: add AZX_DCAPS_I915_POWERWELL for SKL and BSWLibin 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: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>