aboutsummaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2013-07-29ASoC: bfin-ac97: Fix prototype error following AC'97 refactoringMark Brown1-1/+0
As part of the multiplatform refactoring for AC'97 the AC'97 bus ops were staticised meaning that the prototype (which was never needed) conflicts with the declaration causing build failures. Signed-off-by: Mark Brown <[email protected]> Acked-by: Lars-Peter Clausen <[email protected]>
2013-07-29ALSA: hda - Fix invalid multi-io creation on VAIO-Z laptopsTakashi Iwai3-5/+14
VAIO-Z laptops need to use the specific DAC for the speaker output by some unknown reason although the codec itself supports the flexible connection. So we implemented a workaround by a new flag, no_primary_hp, for assigning the speaker pin first. This worked until 3.8 kernel, but it got broken because the driver learned for a better multi-io pin mapping, and not it can assign two mic pins for multi-io. Since the multi-io requires to be the primary output, the hp and two mic pins are assigned in prior to the speaker in the end. Although the machine has two mic pins, one of them is used as a noise- canceling headphone, thus it's no real retaskable mic jack. Thus, at best, we can disable the multi-io assignment and make the parser behavior back to the state before the multi-io. This patch adds again a new flag, no_multi_io, to indicate that the device has no multi-io capability, and set it in the fixup for VAIO-Z. The no_multi_io flag itself can be used generically, added via a helper line, too. Reported-by: Tormen <[email protected]> Reported-by: Adam Williamson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-29ASoC: wm_adsp: Simplify kcontrol handlingDimitris Papastamos2-73/+32
Get rid off the wm_coeff struct and the wm_coeff_add_kcontrol() function. We are now using the snd_soc_card_kcontrol() function to get the kcontrol pointers. No need to call into ALSA code to register the kcontrols. Signed-off-by: Dimitris Papastamos <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-29ASoC: core: Add snd_soc_card_get_kcontrol()Dimitris Papastamos1-0/+16
This is useful for drivers who want to grab a pointer to snd_kcontrol outside of the kcontrol callbacks. Signed-off-by: Dimitris Papastamos <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-29ALSA: hda - Remove analog mic pin override from STAC9228 dell-bios quirkTakashi Iwai1-2/+12
The current fixup for dell-bios model with STAC9228 codec contains the override of pin 0x0c for analog mic. But this is actually just adding a bogus pin and confuses the parser. Better to remove it for the auto-mic switching. Meanwhile, for a possible regression, keep the old configuration as model=dell-bios-amic, so that people can test it again quickly. Tested on Dell 1420n laptop. Reported-and-tested-by: Eric Shattow <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-29ALSA: hda - WAKEEN feature enabling for runtime pmWang Xingchao1-0/+24
With runtime power save feature enabled, Headphone hotplug event will not be detected while controller/codec in D3. HDA has feature WAKEEN to let codec wake up system if controller is in D3 or system in S3.(HDA Spec 4.5.9.2/3). Codec can send out INT or wake up controller depending on whether CIE or GIE enabled.(Figure 4, Interupt structure). The controller must be in RESET mode after enter runtime-suspend, otherwise it will not be waken up even if codec send out wake-up event. And STATESTS will be cleared after controller brought out of RESET mode. This patch only enable WAKEEN for runtime-suspend(Controller D3) mode, not for system S3 mode. with tool "evtest", Headphone hotplug events could be cought and reported successfully. [fixed an unused variable warning by tiwai] Signed-off-by: Wang Xingchao <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
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-29ALSA: usx2y: remove an unneeded checkDan Carpenter1-5/+3
The test here is always true because S[i].urb is an array not a pointer. Also it's bogus because the intent was to test: if (S->urb[i]) { instead of: if (S[i].urb) { Anyway, usb_kill_urb() and usb_free_urb() accept NULL pointers so we can just remove this. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-29ALSA: compress: fix the return value for SNDRV_COMPRESS_VERSIONVinod Koul1-1/+1
the return value of SNDRV_COMPRESS_VERSION always return default -ENOTTY as the return value was never updated for this call assign return value from put_user() Reported-by: Haynes <[email protected]> CC: [email protected] Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-28ASoC: add Renesas R-Car SSI featureKuninori Morimoto5-3/+639
Renesas R-Car series sound circuit consists of SSI and its peripheral. But this peripheral circuit is different between R-Car Generation1 (E1/M1/H1) and Generation2 (E2/M2/H2) (Actually, there are many difference in Generation1 chips) As 1st protype, this patch adds SSI feature on this driver. But, it is PIO sound playback support only at this point. The DMA transfer, and capture feature will be supported in the future Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: add Renesas R-Car ADG featureKuninori Morimoto5-3/+285
Renesas R-Car series sound circuit consists of SSI and its peripheral. But this peripheral circuit is different between R-Car Generation1 (E1/M1/H1) and Generation2 (E2/M2/H2) (Actually, there are many difference in Generation1 chips) This patch adds ADG feature which controls sound clock Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: add Renesas R-Car SCU featureKuninori Morimoto5-2/+248
Renesas R-Car series sound circuit consists of SSI and its peripheral. But this peripheral circuit is different between R-Car Generation1 (E1/M1/H1) and Generation2 (E2/M2/H2) (Actually, there are many difference in Generation1 chips) This patch adds SCU feature on this driver. But, it defines SCU style only, does nothing at this point. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: add Renesas R-Car Generation featureKuninori Morimoto4-2/+259
Renesas R-Car series sound circuit consists of SSI and its peripheral. But this peripheral circuit is different between R-Car Generation1 (E1/M1/H1) and Generation2 (E2/M2/H2) (Actually, there are many difference in Generation1 chips) The main difference between Gen1 and Gen2 are 1) register offset, 2) data path In order to control Gen1/Gen2 by same method, this patch adds gen.c. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: add Renesas R-Car module featureKuninori Morimoto2-0/+126
Renesas R-Car series sound circuit consists of SSI and its peripheral. But this peripheral circuit is different between R-Car Generation1 (E1/M1/H1) and Generation2 (E2/M2/H2) (Actually, there are many difference in Generation1 chips) Gen1 series consists of SRU/SSI/ADG, and Gen2 series consists of SCU/SSIU/SSI/ADG. In order to control these by same method, these are treated as "mod" on this driver. Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: add Renesas R-Car core featureKuninori Morimoto5-0/+660
Renesas R-Car series sound circuit consists of SSI and its peripheral. But this peripheral circuits are different between R-Car Generation1 (E1/M1/H1) and Generation2 (E2/M2/H2). (Actually, there are many difference in Generation1 chips) Basically, for the future, Renesas R-Car series will use Gen2 style sound circuit, but driver should care Gen1 also. The main differences between Gen1 and Gen2 peripheral are 1) register offset, 2) data path. This patch adds basic (core) feature for R-Car series sound driver as prototype Signed-off-by: Kuninori Morimoto <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: lm4857: Convert to regmapLars-Peter Clausen1-59/+26
Use regmap for IO for the lm4857 driver instead of open-coding the IO read/write functions. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: lm4857: Use table based setup for DAPM and controlsLars-Peter Clausen1-19/+7
Let the ASoC core take care of registering the DAPM widget and routes as well as the controls. This makes the code a bit shorter. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-28ASoC: compress: use soc_xxx handlers for metadataVinod Koul1-4/+4
the compress metadata handlers were wrongly named sst_xxx Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-26[media] tea575x-tuner: move HW init to a separate functionOndrej Zary1-6/+13
Move HW initialization to separate function to allow using the code without the v4l parts. This is needed for use in the bttv driver. Signed-off-by: Ondrej Zary <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
2013-07-26ASoC: adau1701: type bug with ADAU1707_CLKDIV_UNSETDan Carpenter1-1/+1
ADAU1707_CLKDIV_UNSET is always compared against an unsigned int and not an unsigned long. The current tests are always false. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-26ASoC: Samsung: I2S: Modify driver to give more flexibilityPadmavathi Venna2-39/+55
This patch modifies the i2s driver to give flexibility towards register handling. This is a pre requirement for enabling i2s support on Exynos5420. This patch modifies only the required registers as a pre-requirement to support on Exynos5420. Signed-off-by: Padmavathi Venna <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-25ASoC: fsl: Set sdma peripheral type directlyNicolin Chen3-9/+6
Let CPU DAI drivers set SDMA periperal type directly to support more dma types(SPDIF, ESAI) other than only two for SSI. This will easily allow some non-SSI drivers to use the imx-pcm-dma as well. Signed-off-by: Nicolin Chen <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: txx9: don't check resource with devm_ioremap_resourceWolfram Sang1-3/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: pxa: don't check resource with devm_ioremap_resourceWolfram Sang1-3/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: nuc900: don't check resource with devm_ioremap_resourceWolfram Sang1-3/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: ep93xx: don't check resource with devm_ioremap_resourceWolfram Sang2-6/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: au1x: don't check resource with devm_ioremap_resourceWolfram Sang1-3/+0
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Mark Brown <[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-24ASoC: tlv320aic3x: Use snd_soc_dapm_mixer_update_powerLars-Peter Clausen1-33/+16
Use snd_soc_dapm_mixer_update_power() instead of reimplementing its functionality. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: dapm: Add a update parameter to snd_soc_dapm_{mux,mixer}_update_powerLars-Peter Clausen1-2/+8
In order to avoid race conditions the assignment of dapm->update should happen while card->dapm_mutex is being held. To allow CODEC drivers to run a register update when using snd_soc_dapm_mux_update_power() or snd_soc_dapm_mixer_update_power() add a update parameter to these two functions. The update parameter will be assigned to dapm->update while card->dapm_mutex is locked. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: dapm: Run widget updates for shared controls at the same timeLars-Peter Clausen1-94/+68
Currently when updating a control that is shared between multiple widgets the whole power-up/power-down sequence is being run once for each widget. The control register is updated during the first run, which means the CODEC internal routing is also updated for all widgets during this first run. The input and output paths for each widgets are only updated though during the respective run for that widget. This leads to a slight inconsistency between the CODEC's internal state and ASoC's state, which causes non optimal behavior in regard to click and pop avoidance. E.g. consider the following setup where two MUXs share the same control. +------+ A1 ------| | | MUX1 |----- C1 B1 ------| | +------+ | control ---+ | +------+ A2 ------| | | MUX2 |----- C2 B2 ------| | +------+ If the control is updated to switch the MUXs from input A to input B with the current code the power-up/power-down sequence will look like this: Run soc_dapm_mux_update_power for MUX1 Power-down A1 Update MUXing Power-up B1 Run soc_dapm_mux_update_power for MUX2 Power-down A2 (Update MUXing) Power-up B2 Note that the second 'Update Muxing' is a no-op, since the register was already updated. While the preferred order for avoiding pops and clicks should be: Run soc_dapm_mux_update_power for control Power-down A1 Power-down A2 Update MUXing Power-up B1 Power-up B2 This patch changes the behavior to the later by running the updates for all widgets that the control is attached to at the same time. The new code is also a bit simpler since callers of soc_dapm_{mux,muxer}_update_power don't have to loop over each widget anymore and neither do we need to keep track for which of the kcontrol's widgets the current update is. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: dapm: Pass snd_soc_card directly to soc_dpcm_runtime_update()Lars-Peter Clausen2-11/+3
soc_dpcm_runtime_update() operates on a ASoC card as a whole. Currently it takes a snd_soc_dapm_widget as its only parameter though. The widget is then used to look up the card and is otherwise unused. This patch changes the function to take a pointer to the card directly. This makes it possible to to call soc_dpcm_runtime_update() for updates which are not related to one specific widget. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: dapm: Use generic power check for everything except DAIsMark Brown1-4/+4
As noticed by Lars-Peter Clausen since the move to using widgets to hook into the DAIs we no longer directly manage the power of AIF or DAC/ADC widgets from the stream integration so they can just use the generic power checks instead of the custom stream integration ones they currently do. Signed-off-by: Mark Brown <[email protected]>
2013-07-24ASoC: dapm: Fix return value of snd_soc_dapm_put_{volsw,enum_virt}()Lars-Peter Clausen1-3/+2
The ALSA core expect the put callback of a control to return 1 if the value of the control changed and 0 if it did not. Both snd_soc_dapm_put_volsw() and snd_soc_dapm_put_enum_virt() currently always returns 0. For both functions we already have a 'change' variable which either contains 1 or 0 depending on whether the value has changed or not, so just return that. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[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-24Merge tag 'asoc-v3.11-rc2' of ↵Takashi Iwai6-11/+12
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v3.11 A few small updates again, the sgtl5000 one fixes some newly triggered issues due to some probe ordering changes which were introduced in the last merge window.
2013-07-24ALSA: hiface: return correct XRUN indicationEldad Zack1-1/+1
Return SNDRV_PCM_POS_XRUN (snd_pcm_uframes_t) instead of SNDRV_PCM_STATE_XRUN (snd_pcm_state_t) from the pointer function of hiface, as expected by snd_pcm_update_hw_ptr0(). Caught by sparse. Cc: Antonio Ospite <[email protected]> Signed-off-by: Eldad Zack <[email protected]> Cc: <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
2013-07-23Merge remote-tracking branch 'asoc/fix/tegra' into asoc-linusMark Brown2-5/+5
2013-07-23Merge remote-tracking branch 'asoc/fix/sgtl5000' into asoc-linusMark Brown1-0/+3
2013-07-23Merge remote-tracking branch 'asoc/fix/max98088' into asoc-linusMark Brown1-1/+1
2013-07-23Merge remote-tracking branch 'asoc/fix/ep93xx' into asoc-linusMark Brown1-2/+2
2013-07-23ASoC: adau1701: Add adau1702 and adau1401(a) device idsLars-Peter Clausen1-0/+3
Both the adau1702 and the adau1401(a) are register compatible to the adau1701, so add them to adau1701 driver's device id table. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-23ASoC: Build adau1701 when SND_SOC_ALL_CODECS is selectedLars-Peter Clausen1-0/+1
The adau1701 driver was removed from SND_SOC_ALL_CODECS in commit commit ee8c7e9 ("ASoC: Remove adau1701 from SND_SOC_ALL_CODECS due to Sigma dependency") due to the dependency on the SigmaDSP firmware loader which was only available on a limited set of platforms. This was fixed quite some time ago in commit 40216ce7 ("ASoC: Move SigmaDSP firmware loader to ASoC") though, so we can add the driver back again to SND_SOC_ALL_CODECS. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-23ASoC: Remove unused dapm_get_snd_card() and dapm_get_soc_card()Lars-Peter Clausen1-30/+0
These two functions were added two years ago in commit 4805608 ("ASoC: dapm - Add methods to retrieve snd_card and soc_card from dapm context.") but have remained unused so far. Considering that the dapm context actually has a direct pointer to the card the functions also seem to be unnecessary. E.g. the expressions 'dapm_get_soc_card(dapm)' and 'dapm->card' yield the same result. Signed-off-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-22ASoC: tegra: correct playback_dma_data setupRichard Zhao2-5/+5
The errors were caused by copy/paste mistake in below commit since v3.10: 3489d50 ASoC: tegra: Use common DAI DMA data struct It also corrects slave_id initialization in tegra20_ac97 driver. Signed-off-by: Richard Zhao <[email protected]> Acked-by: Stephen Warren <[email protected]> Acked-by: Lucas Stach <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: <[email protected]> # 3.10
2013-07-22ASoC: mxs: Depends on COMMON_CLKMark Brown1-0/+1
The SAIF driver is a clock provider so specifically needs the common clock implementedation. Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Mark Brown <[email protected]> Acked-by: Shawn Guo <[email protected]>
2013-07-22ASoC: wm8962: Use power efficient workqueueMark Brown1-2/+3
The accessory detect debounce work is not performance sensitive so let the scheduler run it wherever is most efficient rather than in a per CPU workqueue by using the system power efficient workqueue. Signed-off-by: Mark Brown <[email protected]> Acked-by: Viresh Kumar <[email protected]>
2013-07-22ASoC: mxs: Remove unneeded mach-types.h inclusionsMark Brown2-2/+0
Signed-off-by: Mark Brown <[email protected]> Acked-by: Shawn Guo <[email protected]>