Some Arizona chips have a higher frequency for the FLL VCO, support this
in the common code.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch adds input selection of main codec clock - from what pin.
Both registers set same value since codec uses clock divider or pll at one time.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch adds AGC target level and times settings for TLV320AIC3x.
Enums uses small arrays of two channels left and right since it uses different registers.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
From Kukjin Kim <kgene.kim@samsung.com>:
Here is updating DMA common operation for Samsung SoCs.
Since some DMA client driver such as spi needs to change the configuration
after dma_request() so this branch adds dma_config() can configure DMA
transmit option which is included in dma_request() after that.
Note, according to the changes, needs to update spi and ASoC drivers
for Samsung SoCs and only got the ack from Mark Brown not Grant Likely
and as I know, he is busy for moving. But I think, the spi change has
no problem and it is simple.
* 'next/devel-dma-ops' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
ARM: SAMSUNG: Fix compiler warning in dma-ops.c file
ASoC: follow the updated samsung DMA common operations
spi/s3c64xx: Add the use of DMA config operation
ARM: SAMSUNG: Add config() function in DMA common operations
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This patch adds missing deemphasis switch.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The analogue PGA shifts were used; this makes no practical difference as
the values are the same.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
From Stephen Warren <swarren@wwwdotorg.org>:
This branch contains numerous changes required as a baseline in order to
convert Tegra to the common clock framework. The intention was to also
include patches to actually convert Tegra to the common clock framework.
However, those patches appeared late in the kernel cycle and currently
cause regressions on some boards, so were dropped for now.
* 'for-3.6/common-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra:
ARM: tegra: Provide clock for only one PWM controller
ARM: tegra: Fix PWM clock programming
ARM: tegra: dma: rename driver name for clock to "tegra-apbdma"
ARM: tegra: Remove second instance of uart clk
crypto: add clk_prepare/clk_unprepare
ASoC: tegra: add clk_prepare/clk_unprepare
staging: nvec: add clk_prepare/clk_unprepare
spi/tegra: add clk_prepare/clk_unprepare
Input: tegra-kbc - add clk_prepare/clk_unprepare
USB: ehci-tegra: add clk_prepare/clk_unprepare
mmc: tegra: add clk_prepare/clk_unprepare
i2c: tegra: Add clk_prepare/clk_unprepare
ARM: tegra: add clk_prepare/clk_unprepare
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
The MODULE_ALIAS() was missing from the driver.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since we're now relying on DAPM for things like enabling clocks when we
reparent the clocks for widgets we need to either use conditional routes
(which are expensive) or remove routes at runtime. Add a route removal
API to support this use case.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
If we add a new route at runtime then we'll need to recheck the connections
to the affected widgets.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Some userspace will open a PCM device and then configure mixers
for routing before triggering. This patch allows userspace to do
this sequence.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix spelling mistake in "High-Performance" option of twl6040 power mode.
Signed-off-by: Simon Wilson <simonwilson@google.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Make sure we set the bias level for all DAPM contexts when
changing level.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use dev_ style logging throughout soc_new_pcm()
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Codec shutdown performs a DAPM power sequence that might cause conflicts
and/or race conditions if another stream power event is running simultaneously.
Use card's dapm mutex to protect any potential race condition between them.
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
In the new PCM streaming logic, the interface number is assigned to
usb stream instance (subs->interface) after the format and rate setups
are succeeded, but some codes are still passing subs->interface as the
reference to helper functions. This leads to initializing with an
invalid iface number (-1).
This patch replaces the wrong references with the ones from the target
fmt correctly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If an audio interface is configured to use ASYNCCLK then update the
asynchronous sample rate rather than one of our primary sample rates.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
mx27pdk board also has a mc13783 codec.
Add support for it and do a run-time machine type check to perform the correct
audiomux settings.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we don't set IMX_AUDMUX_V2_PTCR_TCLKDIR in the AUDMUX PTCR
register (means Tx clock pin is input), we don't need to set
IMX_AUDMUX_V2_PTCR_TCSEL as well. Since both i.MX35, i.MX51 and
i.MX6 datasheet says "When Tx clock pin set as an input, the TCSEL
settings are ignored".
Signed-off-by: Hui Wang <jason77.wang@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
They aren't modified by the core so the drivers can declare them const.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With the model parsers out of the way, we have no custom unsol
events to worry about, we can therefore simplify the code.
In addition, this fixes a bug on the ASUS TC710, which has only
a headphone jack and a mic jack, but no internal mic or speakers.
Therefore the unsol_event pointer was not set, and as a result,
the jack kcontrols were not correctly updated.
BugLink: https://bugs.launchpad.net/bugs/1021192
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Allow any BCLK which can be divided down to generate LRCLK, not just the
lowest possible BCLK to clock out the samples.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Allow the user to select which of the system clocks each AIF is referenced
to and constran the DAI to the set of frequencies which can be generated
from that clock.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
They're the rates for the BCLK, not for the sample rate, so rename so that
we don't confuse ourselves.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch implements the spdif out driver for ST peripheral. This
peripheral implements IEC60958 standard
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The STA529 is a digital stereo class-D audio amplifier. It includes an
audio DSP, an ST proprietary high-efficiency class-D driver and CMOS
power output stage. It is intended for high-efficiency
digital-to-power-audio conversion for portable applications.
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Adds missing register default values to cache.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Adds register and bit shift definitions in header file.
Changes are for TLV320AIC310x based on data sheet.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Leave it up to the machine driver to disable accessory detection if
desired, the common pattern is to have accessory detection be a wake
source.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since most new drivers are expected to use regmap and since frequently the
only thing we need to do in the CODEC probe function is configure the I/O
try to initialise the register I/O using regmap if the driver hasn't done
so after probe().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
dapm_set_path_status() sets connect incorrectly in the case max > 1 with invert.
In that case, the raw disconnect value should be max, which corresponds to the
userspace value 0.
This use case currently does not appear upstream, but it could break
SOC_DAPM_SINGLE() or SOC_DAPM_SINGLE_TLV() elsewhere or in the future.
This patch completes commit 3a9abe8.
Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: <alsa-devel@alsa-project.org>
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use the dmaengine based Tegra APB DMA driver for
data transfer between SPI fifo and memory in
place of legacy Tegra APB DMA.
Because generic soc-dmaengine-pcm uses the DMAs API
based on dmaengine, using the exported APIs provided
by this generic driver.
The new driver is selected if legacy driver is not
selected and new dma driver is enabled through config
file.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stereo is not yet supported by dapm widgets, so remove stereo code from
snd_soc_dapm_get_volsw(), and warn if stereo controls are detected.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Current method for machine driver to register with the ASoC core is to use
snd_soc_register_card() instead of creating a "soc-audio" platform device.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Just a few driver-specific fixes for ASoC and HD-audio.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iQIcBAABAgAGBQJP8utuAAoJEGwxgFQ9KSmkG9kQAI3mh986pLpPCnSQq76KOvRJ
1zPk+X+zAAGKJjbPGidZjH1zt5CrYpH40PX/X6/mteCRY6nHdeIL0NQwfThAQvxs
+7xwjf35tlpS9+atvGTlSEWkDB3XgQ+llUixfuN5dZ5QAdA1hDABHlJqZNxuNHa0
NBgQ0UghAWUvSZ3ibf2Tv6d3CH4IRAvyATEqaTz20m6bnv3kUFBfCtuT9BbMg0Wm
Y7dPWylSgr8ERjHpSGIov/hpi9+AtJgxudRS4bOMgUarDqmGLoA2GMlH6wTQ8lHW
HSZywRBJFXlYYhBvKbM+hf48ghN0CeLlRXKmHmOBoEafPTYso+B6+cvloK2g07qo
V+R65jCgXqTu2eaRvSkzn+t1p+K0ZwWqcfniFJ4n7RKi2nx+yKztBDDG0ZdciH+Y
AlKDyRvRoqavSTajrpr9Ii90Q1bm6yVRguQj0AwFpeCPpmvBHtr/uHafwWYuZVF2
7oVAHKt39YsYxJYGiEARRieBUSHkwLDOqzys1z1+0fc+widO91nHh52aVZ+eALOi
BIi7W86eLoQt7ltM817P7jaz0R61Cg/PsRHt8ZbpySkTJELINS8A2Kuqnf/nYchx
o1c1vbcoTjWUnHJBmdbI13WrmOu+tOT8X+YwHdMTgtLt4BVKq/+oJ1hB8Om+QXpe
V8qtG0RII+Hxt7ecQrcC
=iN3h
-----END PGP SIGNATURE-----
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Just a few driver-specific fixes for ASoC and HD-audio."
* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix no sound from ALC662 after Windows reboot
ASoC: tlv320aic3x: Fix codec pll configure bug
ASoC: wm2200: Add missing BCLK rate
Call cancel_work_sync() when turning off the beep switch so that the
mute call is executed in a proper order.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It's no longer necessary since beep_mode=2 option was dropped.
It can be checked simply via codec->beep != NULL.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move snd_hda_mixer_amp_switch_put_beep() to hda_beep.c as a clean up
to remove one more ifdef.
Also add the corresponding get callback to return consistently the
digital beep state independently from the mixer amp value.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The beep_mode=2 option was introduced to make the beep mixer
controlling the beep input allocation/deallocation dynamically, so
that a user can switch between HD-audio codec digital beep and the
system beep only via mixer API. This was necessary because the
keyboard driver took only the first input beep instance at that time.
However, the recent keyboard driver already processes the multiple
input instances, thus there is no point to keep this mode.
Let's remove it.
Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is a bit clean up of public sound header directory.
Some header files in include/sound aren't really necessary to be
located there but can be moved to their local directories gracefully.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Straightforward conversion to the new pm_ops from the legacy
suspend/resume ops.
Since we change vx222, vx_core and vxpocket have to be converted,
too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
From Shawn Guo <shawn.guo@linaro.org>, this makes it possible to use
sparse irqs with mach-imx.
* 'imx/sparse-irq' of git://git.linaro.org/people/shawnguo/linux-2.6:
ARM: imx: enable SPARSE_IRQ for imx platform
ARM: fiq: change FIQ_START to a variable
tty: serial: imx: remove the use of MXC_INTERNAL_IRQS
ARM: imx: remove unneeded mach/irq.h inclusion
i2c: imx: remove unneeded mach/irqs.h inclusion
ARM: imx: add a legacy irqdomain for mx31ads
ARM: imx: add a legacy irqdomain for 3ds_debugboard
ARM: imx: pass gpio than irq number into mxc_expio_init
ARM: imx: leave irq_base of wm8350_platform_data uninitialized
dma: ipu: remove the use of ipu_platform_data
ARM: imx: move irq_domain_add_legacy call into avic driver
ARM: imx: move irq_domain_add_legacy call into tzic driver
gpio/mxc: move irq_domain_add_legacy call into gpio driver
ARM: imx: eliminate macro IRQ_GPIOx()
ARM: imx: eliminate macro IOMUX_TO_IRQ()
ARM: imx: eliminate macro IMX_GPIO_TO_IRQ()
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
The mioa701 board code is converted to the snd_soc_register_card()
and snd_soc_unregister_card() APIs.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
As all irqchips on imx have been changed to allocate their irq_descs,
and all unneeded mach/irqs.h inclusions on imx have been cleaned up,
now it's time to select SPARSE_IRQ for imx/mxc.
The SPARSE_IRQ support forces irqs allocation starting from 16. All
those static irq number definition for SoCs need to shift 16 to keep
non-DT boot works.
With all those static IRQ number and start definitions removed from
mach/irqs.h, the header becomes just a container of a couple of
mach-imx specific irq/fiq calls. Since mach/irqs.h is not included
by asm/irq.h now, the users of mxc_set_irq_fiq needs to explicitly
include mach/irqs.h themselves.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Windows use hidden register to control EAPD.
Linux use verb to control EAPD.
If windows reboot to Linux, it must change the EAPD control to verb
control.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In sound/soc/codecs/tlv320aic3x.c
data = snd_soc_read(codec, AIC3X_PLL_PROGA_REG);
snd_soc_write(codec, AIC3X_PLL_PROGA_REG,
data | (pll_p << PLLP_SHIFT));
In the above code, pll-p value is OR'ed with previous value without
clearing it. Bug is not seen if pll-p value doesn't change across
Sampling frequency.
However on some platforms (like AM335x EVM-SK), pll-p may have different
values across different sampling frequencies. In such case, above code
configures the pll with a wrong value.
Because of this bug, when a audio stream is played with pll value
different from previous stream, audio is heard as differently(like its
stretched).
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Without this very high BCLKs will be configured incorrectly.
Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
snd_soc_dapm_put_volsw() sets connect incorrectly in the case max > 1 with
invert. In that case, the raw disconnect value should be max, which corresponds
to the userspace value 0.
This use case currently does not appear upstream, but it could break
SOC_DAPM_SINGLE() or SOC_DAPM_SINGLE_TLV() elsewhere or in the future.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Otherwise we fail to link when building as modules due to multiple
init/exit functions.
Reported-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch adds the support for spdif in audio codec.
Signed-off-by: vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Here you find quite a few changes for HD-audio and a copule of quirk
additions for USB-audio. All reasonably small and/or trivial.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQIcBAABAgAGBQJP6tBMAAoJEGwxgFQ9KSmkhUsQAJcwhnQb27EB9eBnhjcZvmPS
2K02VNVhoh7kVVjQQ92znpeu+5WFdpFyiBzRPkAzkRR29k7KAtYQRrKg0En7qOL7
RN6CuZAhIr0D7r8QhpeiJ1ZqpOTzPpycBscYUWZGJR07+iBOZIGIuly4hcWWy2WQ
ntwcaeDk/n6PWYCwaMxsGdarOZEBh+dcB/8m7QpRtLEOs72IbzpFGyvXpK/Cv+Fd
8rxVL4JYeDq3bRpHlDQhiPejOW1OnX9H5FkUz28Z38AMAECYGoQ6gIpCybBXNgl3
Ck+xlL7LeVw8S1ZwpZeNnCLG4qzbUDD6e879X0MtvskaDbE04RD68qWSZVgUD37k
A/zIJdP2hJNnNdXr5nXn9EqF+hIfndUNnBUjtAp8yJm6PJSOGac5fDk34DD8crM8
/1/bwyGrGjSfALxL78dZjSDK3LFa/q6llKqoCFf+oxpcNnevuf13ZWyYeM7ol6lC
q8j6lvNCpDdvCULmnNaTUF2wOpyGKwwFfsiFawhDZf86IqJ44FvDo0ybgbS7IkeO
UdAjInzFovVJ0jGmKAY5B2Saic8Aem21Z4PAerOfkMAvxGE6P0QvSHPnCMcfWbtI
dFVBSG6vSpM02Htwn1yU+a99qMRN2n13xedPq0SfZTGM0sCFecCaNU8jpQ9hqBwv
PEREXZGsaG8JIAESxuM3
=V/+z
-----END PGP SIGNATURE-----
Merge tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai:
"Here you find quite a few changes for HD-audio and a copule of quirk
additions for USB-audio. All reasonably small and/or trivial."
* tag 'sound-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
ALSA: hda - Fix power-map regression for HP dv6 & co
ALSA: hda - Initialize caches at codec reconfiguration
ALSA: hda - Fix memory leaks at module unload
ALSA: hda - Fix memory leaks in Realtek & Conexant codec parsers
ALSA: hda - Add Realtek ALC280 codec support
ALSA: hda - Remove obsoleted CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS
ASoC: wm8994: remove duplicate code
ALSA: usb-audio: add BOSS GT-100 support
ALSA: HDA: Add inverted internal mic quirk for Lenovo S205
ALSA: hda - Fix ALC272X codec detection
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam Pro for Notebooks
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam E3500
This 3-pin jack was labeled "Headphone Jack", but it could also be
used as a mic jack just by switching "Input Source". Therefore we need
to call the jack something else, to make sure PulseAudio can use the
speaker together with the external mic. (PulseAudio might mute the
speaker if it detects a headphone being plugged in.)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some ASUS device has a single 3-pin jack that can either be a mic or
a headphone, but the pin does not have VREF capabilities. We've been
told by Realtek to instead enable VREF on pin 0x18 in that case.
BugLink: https://bugs.launchpad.net/bugs/1018262
Tested-by: Chih-Hsyuan Ho <chih.ho@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* v4l_for_linus: (44 commits)
[media] smia: Fix compile failures
[media] Fix VIDIOC_DQEVENT docbook entry
[media] s5p-fimc: Fix control creation function
[media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
[media] s5p-mfc: Fix setting controls
[media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
[media] v4l/s5p-mfc: corrected encoder v4l control definitions
[media] v4l: mem2mem_testdev: Fix race conditions in driver
[media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
[media] cxd2820r: Fix an incorrect modulation type bitmask
[media] em28xx: Show a warning if the board does not support remote controls
[media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
[media] USB: Staging: media: lirc: initialize spinlocks before usage
[media] Revert "[media] media: mx2_camera: Fix mbus format handling"
[media] bw-qcam: driver and pixfmt documentation fixes
[media] cx88: fix firmware load on big-endian systems
[media] cx18: support big-endian systems
[media] ivtv: fix support for big-endian systems
[media] tuner-core: return the frequency range of the correct tuner
[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
...
Conflicts:
Documentation/DocBook/media/v4l/vidioc-create-bufs.xml
drivers/media/video/em28xx/em28xx-cards.c
Fixes the following warning:
CC [M] sound/usb/caiaq/device.o
sound/usb/caiaq/device.c: In function ‘snd_probe’:
sound/usb/caiaq/device.c:500:16: warning: ‘card’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The recent fix for power-map controls (commit b0791dda81) caused
regressions on some other HP laptops. They have fixed pins but these
pins are exposed as jack-detectable. Thus the driver tries to control
the power-map dynamically per jack detection where it never gets on.
This patch adds the check of connection and it assumes the no jack
detection is available for fixed pins no matter what pin capability
says.
BugLink: http://bugs.launchpad.net/bugs/1013183
Reported-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Pull media fixes from Mauro Carvalho Chehab.
Trivial conflict due to new USB HID ID's being added next to each other
(Baanto vs Axentia).
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (44 commits)
[media] smia: Fix compile failures
[media] Fix VIDIOC_DQEVENT docbook entry
[media] s5p-fimc: Fix control creation function
[media] s5p-mfc: Fix checkpatch error in s5p_mfc_shm.h file
[media] s5p-mfc: Fix setting controls
[media] v4l/s5p-mfc: added image size align in VIDIOC_TRY_FMT
[media] v4l/s5p-mfc: corrected encoder v4l control definitions
[media] v4l: mem2mem_testdev: Fix race conditions in driver
[media] s5p-mfc: Bug fix of timestamp/timecode copy mechanism
[media] cxd2820r: Fix an incorrect modulation type bitmask
[media] em28xx: Show a warning if the board does not support remote controls
[media] em28xx: Add remote control support for Terratec's Cinergy HTC Stick HD
[media] USB: Staging: media: lirc: initialize spinlocks before usage
[media] Revert "[media] media: mx2_camera: Fix mbus format handling"
[media] bw-qcam: driver and pixfmt documentation fixes
[media] cx88: fix firmware load on big-endian systems
[media] cx18: support big-endian systems
[media] ivtv: fix support for big-endian systems
[media] tuner-core: return the frequency range of the correct tuner
[media] v4l2-dev.c: fix g_parm regression in determine_valid_ioctls()
...
This chip looks very similar to ALC269 and ALC27* variants. The bug reporter
has verified that sound was working after this patch had been applied.
Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/1017017
Tested-by: Richard Crossley <richardcrossley@o2.co.uk>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It seems that the code duplication was added at a merge operation.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The patches for stubbing out the generic clock API still haven't been
applied so we need to either add ifdefs here or add a dependency until
someone decides to actually apply them.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This gets the registers set up as early as possible, mainly useful for the
GPIOs to ensure that they're in the correct mode.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
There is only one caller and this allows us to cleanly leave the CODEC
with the internal LDO powered down which is the default state we're
looking for and means that we can robustly disable the register cache
only when we either disable the LDO or power down the external
regulators.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Get it done as early as possible, it's neater and minimises the time the
pins aren't configured as requested.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Even though the WM8904 is able to use idle_bias_off during both probe
and resume we were needlessly leaving the device in standby mode. Instead
power the device down as soon as we've confirmed that we can talk to it
and don't manage the bias level at all over suspend and resume, the core
will take us down to our minimum power level.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
iQEcBAABAgAGBQJP53AxAAoJEHm+PkMAQRiGs2QH/RaqkXz96fwjhDcyiKpDqA3c
kGuS5mz5cOhnqKSmR88HFm6pwuhLux/qSJzeAmoQy1MC8a0ACx7AnANW0lfN3/qe
/HGYz8h60yCL/fhn8/bUYtdt9xsoDqoDcq/ooFl9mcsJGWbC6WeMSZU5dAUYqviE
qFrp5zjY07FG53CRGT0hFpezQNwNL+VLH30CF9LD+fJLPVEYum2zBNGXWM42rcw5
fxzGL/6SO8YqA/Upic1ht6HAd6s5LOrlST7qvnyXUMvRXN5z/Y92ueYJZefkS1Om
ohuLIKM2bv9/dJS67H8N2baSKGCzBdfSe5/5WaHdLYW9MiVju0wRl6HPJtAMrkk=
=H8t8
-----END PGP SIGNATURE-----
Merge tag 'v3.5-rc4' into for-3.6
Linux 3.5-rc4 contains some bug fixes which overlap with new features.
For convenience, add "inv-dmic" model string for enabling the inverted
internal mic workaround to possible Realtek codecs, so far,
ALC882-variants, ALC262, ALC268, ALC269-variants, and ALC662-variants.
Also, the model strings for hardware inv-dmic workarounds,
"alc269-dmic" and "alc271-dmic", are added for ALC269(VA) and ALC271
codecs as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some laptops are equipped with ForteMedia digital mics that give the
differential input. With such devices, summing stereo streams into a
mono (like PulseAudio does) results in almost silence.
This patch provides a workaround for this bug by adding a new mixer
switch to turn on/off the right channel of digital mic, just like a
similar fix for Conexant codecs.
When the new switch "Inverted Internal Mic Capture Switch" is off and
the current input source is the digital mic, the right channel of the
recording stream is muted. When another input source is selected, the
right channel is restored.
Tested-by: Eliot Blennerhassett <eliot@blennerhassett.gen.nz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The WM5102 is a highly-integrated low-power audio system for smartphones,
tablets and other portable audio devices based on the Arizona platform.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The Wolfson Arizona series of audio hub CODECs can share a large amount
of their driver code as the result of a common register map. This patch
adds some of this core support, providing a basis for the initial WM5102
audio driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We may as well print as many errors as we can in one go rather than
requiring developers to iterate through all their typos.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
This patch implements the spdif IN driver for ST peripheral
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch add support for the SPEAr ASoC pcm layer in ASoC
framework. The pcm layer uses common snd_dmaengine framework.
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch add support for synopsys I2S controller as per the ASoC
framework.
Signed-off-by: Rajeev Kumar <rajeev-dlh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
After cancel_delayed_work_sync returns, the power down work either never
started (power_on == 1) or finished (power_on == 0). In the former case
there is no need to power up again.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The Lenovo Ideapad S205 has an internal mic where the right channel
is phase inverted.
BugLink: https://bugs.launchpad.net/bugs/884652
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The codec ALC272X is a special codec for some Dell machines, and its
detection got broken in the recent kernel because SSID check (required
by ALC272X check) was moved to the later point. Now we need to move
this codec check to the right place, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In the recent code, the value shown there is a tag number, and it's no
longer same as the pin nid. Correct the message to avoid confusion.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
VIA codecs seem not returning the event tag in the unsolicited events,
thus the current code relying on the tag value doesn't work.
Since simple_hdmi stuff has only a single pin, we can use simply
snd_hda_jack_set_dirty_all() to activate the pin-detection
independently from the tag value.
Tested-by: Annie Liu <AnnieLiu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The simple_hdmi stuff is designed only for a single pin and a single
converter (thus a single PCM stream), and no need for loops.
Let's flatten the code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Currently the sound dmaengine pcm helper functions implement the pcm_pointer
callback by trying to count the number of elapsed periods. This is done by
advancing the stream position in the dmaengine callback by one period.
Unfortunately there is no guarantee that the callback will be called for each
elapsed period. It may be possible that under high system load it is only called
once for multiple elapsed periods. This patch addresses the issue by
implementing support for querying the current stream position directly from the
dmaengine driver. Since not all dmaengine drivers support reporting the stream
position yet the old period counting implementation is kept for now.
Furthermore the new mechanism allows to report the stream position with a
sub-period granularity, given that the dmaengine driver supports this.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Currently the sound dmaengine pcm helper functions implement the pcm_pointer
callback by trying to count the number of elapsed periods. This is done by
advancing the stream position in the dmaengine callback by one period.
Unfortunately there is no guarantee that the callback will be called for each
elapsed period. It may be possible that under high system load it is only called
once for multiple elapsed periods. This patch renames the current implementation
and documents its shortcomings and that it should not be used anymore in new
drivers.
The next patch will introduce a new snd_dmaengine_pcm_pointer which will be
implemented based on querying the current stream position from the dma device.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by Vinod Koul <vinod.koul@linux.intel.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The codes to initialize work struct or create a proc interface should
be called only once and never although it's called many times through
the init callback. Move that stuff into patch_generic_hdmi() so that
it's called only once.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This driver enables i2s mode support on blackfin bf6xx platform.
We reuse bf5xx-i2s-pcm.c as its i2s pcm driver because it's the same
for both bf5xx and bf6xx soc.
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The SPORT(Serial Port) module on bf6xx soc has a totally different ip
comparing to bf5xx soc. An individual SPORT module consists of two
independently configurable SPORT halves with identical functionality.
Each SPORT half can be configured for either transmitter or receiver.
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This fixes the regression introduced by the commit d0b1252d for
refactoring simple_hdmi*(). The pin NID wasn't assigned correctly.
Reported-by: Annie Liu <annieliu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch removes the last usage of linux/ac97_codec.h by
re-defining used AC97 registers.
We can't use sound/ac97_codec.h here, since it is an OSS driver.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
add LTC (linear timecode) read function via proc interface to the pcxhr driver
Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
fix a counter wrap to avoid resynchronization of stream positions every several
minutes. The resynchronization may create stream position jitter
Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This webcam works mostly ok, exept with skype.
Skype sends lots of ctrl messages to dynamically ajust
record level. If for some reasons it pokes some error
every thing goes broken:
- first pulseaudio blocks sound for all apps
- then video is reseted
- then skype freez
dmesg has lots of messages like:
cannot set freq 16000 to ep 0x86"
Setting ignore_ctl_error=1 fixes this problem.
Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
if this cam is pluged in, pulse audio can't initiate capture
device.
dmesg has lots of messages like:
"cannot set freq 16000 to ep 0x86"
Setting ignore_ctl_error=1 fixes this problem.
Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch uses config() function to configure DMA
transmit options.
Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Set the new capability flags in G_TUNER and return ENODATA if no channels
were found.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
MED3931 card did not work (failed with "OPTI chip not found") because
snd-opti9xx gets mc_indir_index from pnp by adding 2 to the pnp-reported port.
It probably works for some cards but not for this one. Datasheet says that
the port is always at 0xe?e so just force the lowest nibble to be 0xe.
Also this card powers up with (ugly) 3D sound enabled. As there's no mixer
control for this, just disable it.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is essentially the reverse of snd_pcm_rate_to_rate_bit().
This is generally useful as the Compress API uses the rate bit
directly and it helps to be able to map back to the actual sample
rate.
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This addresses an issue encountered when a pcm is opened while
transitioning to low power state (codec->power_on == 1 &&
codec->power_transition == -1). Add snd_pcm_power_up_d3wait to
hda_codec. This function is used to power up from azx_open as opposed
to snd_hda_power_up used from codec_exec_verb. When powering up from
azx_open, wait for pending power downs to complete, avoiding the power
up continuing in parallel with the power down on the work queue.
The specific issue seen was with the CS4210 codec, it powers off the ADC
and DAC nid in its suspend handler. If it is re-opened before the
~100ms power down process completes, the ADC and DAC nid are initialized
while powered down and audio is lost until another suspend/resume cycle.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix a bogus sanity check for sync pipe in pcm.c. This flaw was
introduced during the streaming logic refactorization.
While at it, improve the error messages that are generated in such cases.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reported-and-tested-by: <ben@b1c1l1.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
All driver specific and fairly small. The pxa-ssp changes are larger
than I'd like but they're build failures and are pretty clear to
inspection.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAABAgAGBQJP3kOeAAoJEBus8iNuMP3dpf0QAJLZjq1Ttzcm2ZrtYkr6edgm
axHhApj6ptOlLqb16zCJ+zjgmjUy/GteJg766KZqAkvMJxWSPRaPr/aTQnWlxUAE
CU/WjdywbVPKIkn5/r+jpEOifsHNTzj14/gF1Cn9V+58pN6YgflmfElV2vFe3rdX
IrNxGfRBHDgHwqDbHTi2OL8xUTE4oJnnhQZxk7FcsYKiwpwB2hVkbrTTKGNBPL4d
DoV8Xcy+Zb12iDQwh9BvzYAznQTQwCjGsF11UVAb0ChTV14XExQTABNZnAL3hgfj
AhBtm/coDmym61AvQMddsbg8Hrlp/d9Qzmr+0Fxj9HBb+SGVt9XlHY3ETePBM4hQ
wIjhedCed4Pv/Jb9IYDzQ1wJD/9iDG+Xuyj1iQC1QQKaoKg6eI9QgTLoVwRHCssg
DVTzFPOFEFiIfI+eH2cLyZZZlWL1LDbeVmH+KvWthb6+mbfOXo/VPlely2Odl+b7
NErfdjbggoc4Oy8o4Lo0XMb/6HxE7tHd/AzbKHdeHjNk8BCn5NCrdOLSuJb3xrr5
8fLP/0T9Z955R6YsHNg88rhQ74QhWSLGvs9TjUw7sRHN9xkC4gQIwcJ5i0dZcXjC
zIdP0Lj8XB0FdDGYNALdy2B48jU1uKs0cGW+xV/Z0uA0QllB0pfFy+O49z+jRKzJ
d/cIeM8hsxyOHWS4y+BJ
=67R8
-----END PGP SIGNATURE-----
Merge tag 'asoc-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for 3.5
All driver specific and fairly small. The pxa-ssp changes are larger
than I'd like but they're build failures and are pretty clear to
inspection.
There is a missing mutex_unlock() here. The cleanup path also has more
debug output.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add machine-driver for ST-Ericsson U8500 platform, including
support for the AB8500-codec.
Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ATI and Nvidia HDMI codecs have also the pin-detection capability,
so let's enable the jack-detecion for them, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The code refactoring using the same helper functions for sharing the
codes among ATI, Nvidia and VIA simple_hdmi* stuff. Except for that
spec->pcm_playback is no longer pointer, the functionality doesn't
change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds the hotplug unsol event handling to simple_hdmi*().
It works on VIA VX900. If AMD or Nvidia chips support the
pin-detection similarly, it can be added easily, too.
Reported-by: Annie Liu <annieliu@viatech.com.cn>
Tested-by: Annie Liu <annieliu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch activates the COMBO position_fix for recent Intel client chipsets.
COMBO mode is the recommended setting for Intel chipsets and eliminates HD
audio warnings in dmesg. This patch has been tested on Lynx Point, Panther
Point, and Cougar Pont.
Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
PulseAudio sometimes have difficulties knowing that there is a
"Speaker" or "Internal Mic", if they have no individual volume
controls or selectors. As a result, only e g "Headphone" might
be created for a laptop, but no "Speaker".
To help out, create phantom jacks (that are always present,
at least for now) for "Speaker", "Internal Mic" etc, in case we
detect them.
The naming convention is e g "Speaker Phantom Jack".
In order not to pollute the /dev/input namespace with even more
devices, these are added to the kcontrols only, not the input devices.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
During the split to the auto-parser helper functions, the actual call
of init verbs was lost.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43366
Signed-off-by: Takashi Iwai <tiwai@suse.de>
soc_probe_dai_link() currently inter-mixes the probing of CODECs,
platforms, and DAIs. This can lead to problems such as a CODEC's DAI
being probed before the CODEC, if that DAI is used as the CPU-side of
a DAI link without any other of the CODEC's DAIs having been used as
the CODEC-side of any DAI link that was probed earlier.
To solve this, split soc_probe_dai_link() into soc_probe_link_components()
and soc_probe_link_dais(). The former is used to probe all CODECs and
platforms used by a card first, and then the latter is used to probe all
the DAIs and links later.
A similar change is made to soc_remove_dai_links().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This change simply factors out part of soc_remove_dai_link() into a
standalone function. This makes platform and CODEC removal much more
similar at the call-sites.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When a standalone CPU DAI (one not part of a CODEC) is probed, widgets
are created for it. Add a call to snd_soc_dapm_free() in order to clean
these up when the CPU DAI is removed.
In order for snd_soc_dapm_free() to work, the CPU DAI's DAPM context's
list member must be initialized, since snd_soc_dapm_free() removes that
from the list it's part of. Add it to the card's list of DAPM contexts.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If the CPU-side of a DAI link is a CODEC rather than a standalone DAI,
the codec initialization will call try_module_get() and create the DAI
widgets. Ensure that this isn't duplicated when the CPU DAI itself is
probed, if the CPU DAI is part of a CODEC.
Note that this is not a complete fix on its own, since there's no
guarantee that the CODEC itself will be initialized - currently that only
happens if the CODEC is also used as the CODEC-side of a DAI link, and
that initialization may happen before or after the DAIs within the CODEC
are initialized. However, such a scenario doesn't necessarily currently
work, and I don't think this change alone makes it any worse. This is
fixed in a couple patches time.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
add ttc-dkb machine support for pxa910. It uses 88pm8607 as codec
dai, mmp-pcm as platform and pxa-ssp as cpu dai.
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Adds Alsa audio platform driver for mmp brownstone machine
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Leo Yan <leoy@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The SSPA is a configurable multi-channel audio serial (TDM) interface.
It's configurable at runtime to support up to 128 channels and the
number of bits per sample: 8, 12, 16, 20, 24 and 32 bits. It also
support stereo format: I2S, left-justified or right-justified.
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Leo Yan <leoy@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
mmp-pcm handle audio dma based on soc-dmaengine
Support mmp and pxa910
Signed-off-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Leo Yan <leoy@marvell.com>
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This fixes a leak if snd_soc_register_codec fails.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
GPLv2 -> GPL v2
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use clk_prepare/clk_unprepare as required by the generic clk framework.
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Pin 0x1b was connected to the front panel connector, which according to
the HDA standard should contain a mic and a headphone. In this case,
the headphone was listed as "line out" by BIOS.
Cc: stable@kernel.org
BugLink: https://bugs.launchpad.net/bugs/993162
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
as the start can be called after stop again, we need to reset state
Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
during pause the core should maintain the status-quo on the device and pointers
and not wake up. If app needs it should call DROP explcitly.
Signed-off-by: Namarta Kohli <namartax.kohli@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
If mic detect is left enabled and the WM8903 detects a status change,
the WM8903 driver will make a callback against the free()d jack, which
will cause a crash.
This problem can be triggered by fully initializing an audio card, then
removing and re-inserting the machine driver module.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Also convert to use update_bits() while we're at it. No great need to do
this, it's just a bit neater to do as much as possible in the I2C probe.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
There's no reason to defer requesting of the interrupt until the CODEC
probe and doing so results in more work if we hit an error as we'll have
registered the CODEC with the core. It's neater to acquire as many of the
resources we'll need as we can in the bus probe function.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
There's no urgent need for the interrupt handler to use the ASoC I/O
functions and it'll support a further move in where we request the
interrupt so call the regmap APIs directly.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Ensure that the device pins are configured as soon as possible by moving
the pin configration (including MICBIAS) into the I2C probe() function.
This had been done in the CODEC probe() function when we were relying on
the ASoC register I/O code.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Before this patch the owner field of the /dev/radio# device fops was set to
the snd-tea575x-tuner module itself. Meaning that the module which was using
it could be rmmod-ed while the device is open, and then BAD things happen.
I know, as I found out the hard way :)
Note that there is no need to also somehow increase the refcount of the
snd-tea575x-tuner module itself, since any drivers using it will have
symbolic references to it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
My EU/US 5757 cannot tune below approx 86 Mhz, that is below that it
does not even generate the standard not tuned to anything radio noise anymore,
so clearly the 5757 cannot tune to the Japanese frequencies. This patch
assumes that likewise the 5759 cannot tune to the EU/US frequencies.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
CC: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The Tegra ASoC machine drivers only depend on Tegra architecture support
to compile, not specific board support. Remove Kconfig dependencies on
any particular board. This is required since Kconfig options for boards
are going away given the migration to device tree.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The PCI ID entries of Creative SoundCore3D HD-audio controllers should
be before the wildcard for vendor = Creative.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds support for Dialog DA732x audio codecs.
Signed-off-by: Michal Hajduk <Michal.Hajduk@diasemi.com>
Signed-off-by: Adam Thomson <Adam.Thomson@diasemi.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
They aren't marked as readable and the feature is never used so they'll
never get referenced.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we don't have control over the LDO but do have control over the other
regulators then we may end up trying to write to a powered off device.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We're using demv_regulator_bulk_get() so don't need to manually free and
this is in the CODEC driver not the I2C driver anyway.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Allow mixer controls to be provided clearly in a table, to avoid
quantity of error checking at each use.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is patch supporting the CODECes of HD-Audio function of VIA GFX
cards which support HDMI.
For CODECes 0x9f80/0x9f81, which belong to VX900, since the hardware
is not fully compliant to HD-Audio 1.3, simple_i*() is adopted
temporarily.
Signed-off-by: Annie Liu <annieliu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is patch supporting HD-Audio function of VIA GFX cards which
support HDMI.
Those are integrated graphics of chipsets VX900 and VX11 separately.
Signed-off-by: Annie Liu <annieliu@viatech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add codec-driver for ST-Ericsson AB8500 mixed-signal ASIC.
Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We should be using the regmap API consistently for all the cache only
configuration and we should be going cache only before we power down
the supplies.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We no longer have a flat ASoC cache so can't peer directly into the array
any more but should instead use the register I/O functions to update the
cache.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org (v3.4)
pxa-ssp.c uses API like cpu_is_pxa3xx(), cpu_is_pxa2xx(), which is
defined under arch-pxa architecture, and drivers under mach-mmp
can't find it. so just use ssp->type to replace that API.
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When VGA_SWITCHEROO support is enabled hda_intel initialises the HDMI
audio device on the current VGA device. When it's not enabled it only
initialises the HDMI device on the default VGA adaptor, this means
secondary cards get no audio support which is very unhelpful for
multi-seat!
With this patch, when SUPPORT_VGA_SWITCHEROO is disabled hda_intel
initialises all HDMI audio devices, not just the default VGA.
[minor optimizations by tiwai]
Signed-off-by: Steven Newbury <steve@snewbury.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When VGA-switcheroo is built in but unused on systems with multiple
graphics cards, the initializations of non-default graphics cards are
skipped and never enabled (because the switcheroo is activated only
when the controller supports). The current behavior is for avoiding
the system lockup by accessing the disabled GPU, but due to the recent
change in VGA-switcheroo, it determines the state simply by checking
with the default VGA device. This is the culprit.
Now with the new vga_switcheroo_get_client_state(), we can know the
initial state of the bound GPU, thus can determine the initial audio
client state more correctly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In 3.5 kernel, the endpoint is assigned dynamically for the
substreams, but the PCM assignment still checks the presence of the
endpoint pointer. This ended up in duplicated PCM substream creations
at probing time, resulting in kernel warnings like:
WARNING: at fs/proc/generic.c:586 proc_register+0x169/0x1a6()
Pid: 1152, comm: modprobe Not tainted 3.5.0-rc1-00110-g71fae7e #2
Call Trace:
[<ffffffff8102a400>] warn_slowpath_common+0x83/0x9c
[<ffffffff8102a4bc>] warn_slowpath_fmt+0x46/0x48
[<ffffffff813829ad>] ? add_preempt_count+0x39/0x3b
[<ffffffff811292f0>] proc_register+0x169/0x1a6
[<ffffffff8112962e>] create_proc_entry+0x74/0x8c
[<ffffffffa018eb63>] snd_info_register+0x3e/0xc3 [snd]
[<ffffffffa01fde2e>] snd_pcm_new_stream+0xb1/0x404 [snd_pcm]
[<ffffffffa024861f>] snd_usb_add_audio_stream+0xd2/0x230 [snd_usb_audio]
[<ffffffffa0241d33>] ? snd_usb_parse_audio_format+0x252/0x34f [snd_usb_audio]
[<ffffffff810d6b17>] ? kmem_cache_alloc_trace+0xab/0xbb
[<ffffffffa0248c29>] snd_usb_parse_audio_interface+0x4ac/0x567 [snd_usb_audio]
[<ffffffffa023f0ff>] snd_usb_create_stream+0xe9/0x125 [snd_usb_audio]
[<ffffffffa023f9b1>] usb_audio_probe+0x62a/0x72c [snd_usb_audio]
.....
This patch fixes the regression by checking the fixed endpoint number
for each substream instead of the endpoint pointer.
Reported-and-tested-by: Jamie Heilman <jamie@audible.transient.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
codec may reject power state transition requests(reporting PS-ERROR set),
in that case we re-issue a power state setting and check error bit again.
Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This allows the module to automatically load when instantiated from
device tree.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Stop open-coding the caching of the ctrl registers; instead, use
regmap_update_bits() to update parts of the register from different
places. The removal of the open-coded cache will allow controls to be
created which touch registers, which will be necessary if any of these
modules are converted to CODECs.
Get rid of tegra*_read/write; just call regmap_read/write directly.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is the actual device of the I2S or SPDIF controller reporting the
problem. If a future change converts these controllers to be CODECs, then
there may be no pcm associated with the substream, so this change avoids
a crash.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
rtd->codec_dai->codec can be used instead.
This is a slight step along the way to not needing the rtd->codec field
any more.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Define the DAI format statically in the dai_link, rather than executing
code to set it each time the hw params are set.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is certainly required if the I2S and SPDIF controllers are converted
to be CODECs, and is probably good practice irrespective.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Rather than having varying timeouts depending on the transition always
use a 4s timeout. This provides better diagnostics for clocking errors
and ensures compatibility with current calibration firmwares.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We should set "isabelle_regmap" before using it. GCC complains.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We should only add source widgets to the input list.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Make sure that the dpcm_get_be() only returns BE DAI links.
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
snd_hda_param_read() return value -1 means error, others are responses
Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>