Interrupt statistics of fsl_ssi are mainly for debugging purpose. Most
of those interrupts show error states, e.g. under/overflow.
The stats should be exposed via debugfs instead of sysfs.
This patch moves the statistics file to debugfs.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch fixes the error handling in the fsl-ssi probe function.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Both patch_realtek.c and patch_conexant.c contain the fairy same code
snippet for supporting Thinkpad ACPI LED controls. Split them into
thinkpad_helper.c and include it from both places. Although this
isn't the best approach from the code size POV, the probability for
coexistence of both Realtek and Conexant codecs on a single machine is
pretty low, thus it'll end up with less memory footprint than
splitting to yet another module.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
SSM260x also supports 16kHz with external master clocks of 12.000MHz,
12.288MHz and 18.432MHz.
Add matching coefficients, update constraints and announced rates.
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
To avoid another lookup for the twl4030_priv in there.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
There's no other users of this functionality, the code can be moved inside
of twl4030_write.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Over time the multi line alignment got messed up. Correct them in one go
so the code will look consistent.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Depend on the regmap reg cache implementation for register caching done in
the twl-core driver.
The local register cache can be removed and we can keep only shadow copies
of certain ctl registers for pop noise reduction.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Few registers need to be cached in the codec driver level. These registers
should only be written when the path is active to avoid pop noise on the
given path.
This patch adds an array which covers the range where the sensitive registers
are located and uppon loadinf the driver the ctl cache will be initialized.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The register states now tracked by the regmap implementation in the core which
makes the reset registers functionality 'redundant' since we know the state
of the registers now all the time.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
No need to keep the check defaults functionality anymore.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Simplifies the code a bit and prepares it to the removal of local caching.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Fixes the following sparse warning:
sound/soc/ux500/ux500_msp_i2s.c:649:5: warning:
symbol 'ux500_msp_i2s_of_init_msp' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
The driver defines ADAU1701_SEROCTL_WORD_LEN_16 as 0x10 while it should be b10,
so 0x2. This patch fixes it.
Reported-by: Magnus Reftel <magnus.reftel@lockless.no>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
Connect the DAPM graph through each BE DAI link to the componnent(s) on the
other side of the BE DAI link. This allows the graph to be walked on
both sides of the link when graph changes are made.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Provide a quick way to tell if a DAI is a dummy DAI or a regular DAI.
This is for internal DAPM usage only and is used to determine whether to
insert a DAI link connection into the DAPM graph.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
AD1986A mic pins (0x1d and 0x1f) share the same widget for controlling
the loopback volume/mute, but the generic parser didn't check it.
This ended up with the duplicated controls for the same effect.
This patch adds the check of the duplication for avoiding it.
After this fix, there will be only one control although it affects
both paths; this remaining issue should be fixed later in a different
patch.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The 3stack pin configs for AD1986A codec had incorrect values that
resulted in broken mic and line-in.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=66621
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some tags used in the firmware patch file are inconsistent with hwdep
sysfs file names, such as, the firmware patch takes [hint] tag while
sysfs file is */hints. This makes even me referring back to the
document often. Let's provide the same tag names as sysfs for
reducing confusions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Just a code refactoring: the need_codec flag in hda_patch_item struct
can be removed by checking the current mode instead. No functional
change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It turned out that some AMD HDMI controllers still don't provide
proper values in GCAP register (all zero), and the driver assigns only
one stream in that case, although the connected codec chip supports
more than one stream.
In this patch, the default max number of streams for AMD HDMI
controllers is increased to 8, which should suffice for most use
cases. The overhead by this increase is more azx_dev struct and BDL
allocations, so it's negligible. Of course, if the controller
provides a proper GCAP register, the register value would be used.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some BE DAIs can be "dummy" (when the DSP is controlling the DAI) and as such
wont have set a minimum number of playback or capture channels required for BE
DAI registration (to establish supported stream directions).
Force machine drivers to explicitly set whether they support playback and capture
stream directions for every BE DAIs.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
When the platform driver has no ops, the platform function
bespoke_trigger() is no more called.
The problem was introduced by the commit c5914b0aae
"ASoC: pcm: Check for ops before deferencing them"
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
Even though we might not have rigor rule for the simple card property names,
according to the existing ones, they are all in a same pattern:
[simple-audio-card,]XXX;
Rename simple-audio-routing to simple-audio-card,routing, and make the simple
card's properties has one unified name.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
We no longer have a means to differentiate between MSP devices at probe
time, mainly because we don't really have to. So rather than have an over-
sized static data structure in place, where the only difference between
devices is the ID and name (which are unused), we'll just create one
succinct, statically assigned and shared one instead.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
If booting with full DT support (i.e. DMA too, the last piece of the
puzzle), then we don't need to use the compatible_request_channel call
back or require some of the historical bumph which probably isn't
required by a platform data start-up now either. This will also be
ripped out in upcoming commits.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
In this patch we do two things. Firstly, instead of open coding the
store of DMA data in to the DAI for later use, we use the API provided.
Secondly we create and store similar DMA data for the DT case, only
this time we use 'struct snd_dmaengine_dai_dma_data' which is provided
by the core for this very reason.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Soon we will strip out pdata support from the Ux500 set of ASoC drivers.
When this happens it will have to supply a DMA slave_config to the
dmaengine. At the moment a great deal of this comes from pdata via
AUXDATA. We need to become independent of this soon. This patch starts
the process by allocating memory for the associated data structures and
fetches the MSP id used for const struct indexing.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
In preparation for full Device Tree enablement we must differentiate
between the two varying ways DMA data can be held in the DAI store. If
we're booting with Device Tree the provided 'snd_dmaengine_dai_dma_data'
data structure shall be used, whereas in order to avoid breaking legacy
platform data we also need to be able to translate DMA data stored using
the UX500 specific 'ux500_msp_dma_params' method.
Once we move over to solely use Device Tree, we can enforce the use of
'snd_dmaengine_dai_dma_data' and this code can be removed altogether.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
The Slave Config's addr_width attribute is populated by data_width of
dma_cfg, which in turn is derived from dma_params' data_size attribute
and that comes from the slot_width which is always 16 bits (2 Bytes).
We're cutting out the middle man here and just setting the DMA Slave
Config directly.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
We're getting closer to fully enabling the Ux500 ASoC driver for Device
Tree. When we switch over from using AUXDATA we'll need to match platform
by only Device Tree nodes. In this patch we NULL out the platform_name,
and supply nodes for each platform device.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
These drivers will not work without platform specific data, which is
passed in via Device Tree or Platform Data. To avoid the chance of
NULL pointer dereferencing and alike, let's ensure we have at least
one of the methods in play before continuing.
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Since commit 7b11304 ("dma: mxs-dma: Report correct residue for cyclic DMA")
the mxs dmaengine driver has support for residue reporting. So there is no need
to specify the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag anymore. This allows a
finer grained resolution for the PCM pointer as well as avoids the race
condition that can occur with the period counting that is used when the
dmaengine driver does not support residue reporting.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Commit 6873ee464a (ASoC: fsl_ssi: Fix printing return code on clk error) caused
the following build warning:
sound/soc/fsl/fsl_ssi.c: In function 'fsl_ssi_probe':
sound/soc/fsl/fsl_ssi.c:1196:6: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat]
Fix it by using '%ld' to print the 'long int' format.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Allow PCMs that do not impose any restrictions on the supported formats to set
the formats field to 0, Instead of assuming that this means that the PCM does
not support any formats (which doesn't make much sense), assume that it supports
all formats. This brings the behavior of DPCM closer to that of non-DPCM.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
We have the same code for initializing the runtime pcm on both the playback and
the capture path. Factor this out into a common helper function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This is a trivial cleanup: remove useless variable mc13xxx and
extra spaces. No functional changes.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
There are no users of this driver without pdata, so stop using
constant assignment of ADC and DAC ports.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
mc13783-codec is probed only by MC13XXX MFD core driver so
use module_platform_driver_probe().
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
commit f0e9c080 - "ALSA: compress: change the way sample rates are sent to
kernel" changed the way sample rates are sent. So now we don't need to check for
PCM_RATE_xxx in kernel
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The lack of comma leads to the wrong channel for an SPDIF channel.
Unfortunately this wasn't caught by compiler because it's still a
valid expression.
Reported-by: Alexander Aristov <aristov.alexander@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev;
@@
pci_set_power_state(pdev,
- 3
+ PCI_D3hot
)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This motherboard seems to have a flaky jack detection - when the
front HP is not present, the jack state quickly switches on and off.
This has been reported by three people in the bug, so I doubt it's
a user error this time.
BugLink: https://bugs.launchpad.net/bugs/1248116
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Not a lot going on framework wise, partly due to Christmas at least in
the case of the work I've been doing, but there's been quite a lot of
cleanup activity going on and the usual trickle of new drivers:
- Update to the generic DMA code to support deferred probe and managed
resources.
- New drivers for BCM2835 (used in Raspberry Pi), Tegra with MAX98090
and Analog Devices AXI I2S and S/PDIF controller IPs.
- Device tree support for the simple card, max98090 and cs42l52.
- Conversion of the Samsung drivers to native dmaengine, making them
multiplatform compatible and hopefully helping keep them more modern
and up to date.
- More regmap conversions, including a very welcome one for twl6040
from Peter Ujfalusi.
- A big overhaul of the DaVinci drivers also from Peter Ujfalusi.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQIcBAABAgAGBQJSxaXVAAoJELSic+t+oim9q3IP/jc8A8dHx75Jur5oMfDREmlp
wSkqDF4Euc7JbWCGcxQnLlSCo7Z+SQX88S8QJfU2UqYxngwESvgf4VafXN/Kt64x
Y4bO8UPslGvmErck8ZQENn6rD5HyHyqGyZA2E1e5OcQjwvcYv9IO+q7gTJskq/Io
ouQ6SLeX7eSekRHYtPYg0vzwoLAsJH2Kjn+wpUq0iDfq2/MF1BzNWGAPZJEY1EXw
pBHYnRNqDuNPUG6LCvrkRcMF8Z+dA/EA0jI/3CwWirXEs9meCE9cH7d1WJJ1wrFy
wsns/8wghZYozO0d2m1KpRp+8NwoKKTaApJh/B+wssKFVrdvRpvUli8bq4lg3EIf
oQIqUTxvH1XSWYYP+cj46bQeEiY6Msf1XdhSYOP/TX7XM0xYjBwfKUez6XgllD1r
SZBe4uS82zB35lf7PyC9c854zokblNna+czDI82LtC0jI9mMZ2Q1bjkcOTH+Yk9n
WD6K8W+N2x0oD0yWVo8vZ0VSRg0HE+j+ZIZPFBxmK4fllZIESjJ9HjVUYbIoi6hm
y/860xUZBLSc82MqU6zZqQPXxWuH0g52gb3oo/ue6h4r13JyEwK4TlhJYCHv8mWo
tqheM+SqOapi1Yd92GoAseZaP1ulpz8uEMossrOksPiQO+oM4C9OxIdujCwor2/p
x8eyf47w7tAogy9caBXk
=jhuo
-----END PGP SIGNATURE-----
Merge tag 'asoc-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.14
Not a lot going on framework wise, partly due to Christmas at least in
the case of the work I've been doing, but there's been quite a lot of
cleanup activity going on and the usual trickle of new drivers:
- Update to the generic DMA code to support deferred probe and managed
resources.
- New drivers for BCM2835 (used in Raspberry Pi), Tegra with MAX98090
and Analog Devices AXI I2S and S/PDIF controller IPs.
- Device tree support for the simple card, max98090 and cs42l52.
- Conversion of the Samsung drivers to native dmaengine, making them
multiplatform compatible and hopefully helping keep them more modern
and up to date.
- More regmap conversions, including a very welcome one for twl6040
from Peter Ujfalusi.
- A big overhaul of the DaVinci drivers also from Peter Ujfalusi.
ffs() returns the bit position from 1, while the ssm2158 driver code
assumes it being 0-based. Also, the bit mask computation of the two
channel slots are incorrect; it must have worked just casually.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Try to get the device's module clock if the dt has no clocks and
system-clock-frequency properties.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This is a quick fix for the below two issues when building spdif as modules.
1) If modprobing modules in order: (Step 1) snd-soc-fsl-spdif -> (Step 2)
snd-soc-imx-spdif -> (Step 3) snd-soc-spdif-tx/rx, we will fail to create
imx-spdif card and dai link unless we rmmod snd-soc-imx-spdif and modprobe
it again due to the execution platform_driver_unregister() in probe() when
meeting -EPROBE_DEFER at Step 2.
2) After "imx-spdif sound-spdif.17: dit-hifi <-> 2004000.spdif mapping ok",
'rmmod snd-soc-imx-spdif' would cause kernel dump with warning:
WARNING: CPU: 0 PID: 1301 at /home/rmk/git/linux-rmk/fs/sysfs/dir.c:915 sysfs_hash_and_remove+0x84/0x90()
sysfs: can not remove 'dapm_widget', no directory
This should be caused by disordered resourse releasing of the whole link.
And trying to unregister the card and then CODEC dev can't fix this issue.
Thus this patch just provides a simple fix to these two bugs by using the
snd-soc-dummy in the core instead of seperate snd-soc-spdif-tx/rx so that
there's no need to handle the registering and unregistering of CODEC or
CODEC dai any more.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
From "ASoC: make snd_soc_dai_link more symmetrical", can we see that
the name of CPU DAI maybe omitted. If the DAI name is omitted, try to
use the component name instead.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch adds SRC support to Renesas sound driver.
SRC converts sampling rate between codec <-> cpu.
It needs special codec chip,
or very simple DA/AD converter to use it.
This patch was tested via ak4554 codec,
and supports Gen1 only at this point.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Renesas sound has SRC (= Sampling Rate Converter),
but, the HW implementation depends on its generation.
It was part of SRU on Gen1, and SCU on Gen2.
This SCU needs DMA transfer to use it.
Current rsnd driver is using it as DMA transfer buffer
(= no rate convert), and Gen1 is only supported at this point.
This patch cleanup it with focusing about SRC and Gen2 part.
ssi clock which is calculated from rsnd_ssi_master_clk_start()
should have flexibility since Renesas sound has
SRC (= Sampling Rate Converter).
But current implementation is using runtime->rate directly.
This patch tidyup rsnd_ssi_master_clk_start() parameter
as preparation of future SRC support
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Renesas sound has SRC (= Sampling Rate Converter),
but, the HW implementation depends on its generation.
It was part of SRU on Gen1, and SCU on Gen2.
This SCU needs DMA transfer to use it.
Current rsnd driver is using it as DMA transfer buffer
(= no rate convert), and Gen1 is only supported at this point.
This patch cleanup it with focusing about SRC and Gen2 part.
rsnd_scu_set_hpbif() is renamed to rsnd_scu_rate_ctrl(),
since its naming doesn't indicate the function meaning.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
INT_ENABLE is needed only Gen2.
rsnd_mod_write() do nothing on Gen1, but it is confusable.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Renesas sound has SRC (= Sampling Rate Converter),
but, the HW implementation depends on its generation.
It was part of SRU on Gen1, and SCU on Gen2.
This SCU needs DMA transfer to use it.
Current rsnd driver is using it as DMA transfer buffer
(= no rate convert), and Gen1 is only supported at this point.
This patch cleanup it with focusing about SRC and Gen2 part.
SRC_CTRL/BUSIF_MODE are used for transfer start.
This patch adds rsnd_scu_transfer_start() and merge these
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Renesas sound has SRC (= Sampling Rate Converter),
but, the HW implementation depends on its generation.
It was part of SRU on Gen1, and SCU on Gen2.
This SCU needs DMA transfer to use it.
Current rsnd driver is using it as DMA transfer buffer
(= no rate convert), and Gen1 is only supported at this point.
This patch cleanup it with focusing about SRC and Gen2 part.
rsnd_scu_set_route() is needed only Gen1.
This patch renames it to rsnd_scu_set_route_if_gen1()
and it adds comment to rsnd_reg member
in order to clarify it is used for Gen1.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This driver is assuming that
RBGA is used as source clock of 44.1kHz category, and
RBGB is used as source clock of 48kHz category.
This patch clarifies the variable name.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Use correct register name which appears in the datasheet
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
we can check rsnd_ssi_init(), not, rsnd_ssi_start()
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch adds rsnd_adg_set_ssi_clk() to access to
AUDIO_CLK_SEL0/1/2, and removes last user of
rsnd_write/read/bset which is very low level function.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
When call snd_soc_register_card, it will set driver data to this
device through dev_set_drvdata, then in driver, no need to call
platform_set_drvdata again, so remove it.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Revert the SAI's endianess for fifo data to/from DMA engine.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This is maybe one bug or a limitation of the hardware that the {T,R}CR2's
Synchronous Mode bits must be set as late as possible, or the SAI device
maybe hanged up, and there has not any explaination about this limitation
in the SAI Data Sheet.
And the {T,R}CR2's Synchronous Mode bits must be set at the same time whether
for Tx or Rx stream.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Enables/Disables the corresponding data channel for tx/rx operation.
A channel must be enabled before its FIFO is accessed, and then disable
it when tx/rx is stopped or idle.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
commit 5d229ce569 ("ASoC: samsung: move plat/ headers to local directory")
moved the header files but forgot to clean the pointers to their old locaton.
Remove them now.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Because we cannot make sure which one of _dai_fmt() and _dai_sysclk()
will be firstly called. So move the RCSR/TCSR and TCR1/RCR1's
initialization to _dai_probe(), and this can make sure that before any
of {T,R}CR{1~5} register to be set the RCSR/TCSR's RE/TE bit has been
cleared for the hareware limitation.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
The Vaughan device support the 352800 rate and not
the 352000
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Generally we would write code for local variable like:
static new_func()
{
struct xxx *yyy;
...
int ret;
}
But this driver only follows this pattern for some functions, not all.
Thus this patch sorts the local variable in the general way.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Since using dev_err() there's no need to mention SAI any more, it will
print the full name of the driver -- fsl_sai.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
We can save this ret to make the code neater.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
SAi only supports two data channels on hardware level and the driver also does
register the min->1 and max->2, so no need to check channels.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Use common helper function snd_pcm_format_width() to make code neater.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
There are two functions haven't clk_disable_unprepare() if having error.
Thus fix them.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The name of cpu DAI maybe omitted, and then strlen() will lead
kernel panic.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
There is no need of this function and makes the code slightly shorter
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The ASoC core assumes that the PCM component of the ASoC card transparently
moves data around and does not impose any restrictions on the memory layout or
the transfer speed. It ignores all fields from the snd_pcm_hardware struct for
the PCM driver that are related to this. Setting these fields in the PCM driver
might suggest otherwise though, so rather not set them.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Plantronics Gamecom 780 headset has a firmware problem, and when the
FU 0x09 volume is changed, it results in either too loud or silence
except for a very narrow range. This patch provides a workaround,
ignoring the node, initialize the volume in a sane value and keep
untouched.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=65251
Signed-off-by: Takashi Iwai <tiwai@suse.de>
In this case, there are two DACs, and DAC 0x03 is mono. In order
to make headphones and front speaker use DAC 0x02, and subwoofer use
DAC 0x03, we artificially cut the connection from nodes 0x14 and 0x15
to node 0x03, so they can only use DAC 0x02.
In addition, the 5460 and 5470 differs in the sense that 5470 also
needs a headset mic patch, whereas 5460 has individual detection for
headphone and headset mic.
BugLink: https://bugs.launchpad.net/bugs/1211920
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
CONFIG_ACPI dependent code should include <linux/acpi.h> instead of
directly including <acpi/acpi.h>. This patch cleans up such wrong
inclusions for Thinkpad ACPI users.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We can rely on mfd driver to manage the register caching via regmap. The
driver still need to cache some registers associated with DL1/2 routes.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The MFD core takes care of the restore via standard regmap API, no need to
do this anymore here.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Introduce a small register cache for registers which needs special caching
to reduce pop noise:
TWL6040_REG_HSLCTL, TWL6040_REG_HSRCTL, TWL6040_REG_EARCTL, TWL6040_REG_HFLCTL
and TWL6040_REG_HFRCTL.
Switch over and use the new small cache for these registers instead of the
main reg_cache.
This is in preparation to remove the local ASoC reg_cache from the driver.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
This patch adds three main functions for DAI master mode: set_dai_fmt(),
set_dai_sysclk() and set_dai_tdm_slot(), and one essential baud clock
accordingly. After appending this patch, the fsl_ssi driver on i.MX series
has the ability to derive LRCLK and BCLK from baud clock source so as to
support some audio Codecs which can only be used in slave mode.
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The kernel as a number of cases of gendered language. The majority of these
refer to objects that don't have gender in English, and so I've replaced
them with "it" and "its". Some refer to people (developers or users), and
I've replaced these with the singular "they" variant. Some are simply
typos that I've fixed up.
I've left cases where gendered language was used to refer to specific
individuals, was a quote or is part of license text.
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
When a Kconfig of a codec driver doesn't match with the controller
(CONFIG_SND_HDA_INTEL), it'll result in the non-working automatic
probing. Unfortunately kbuild can't give such a restriction, but at
least, it's possible to show a warning if such a condition is found.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
So far, CONFIG_SND_HDA_CODEC_* kconfigs have been booleans due to
historical reasons. The major reason was that the automatic codec
driver probing wouldn't work if user sets a codec driver as a module
while the controller driver as a built-in. And, another reason was to
avoid exporting symbols of the helper codes when all drivers are built
in.
But, this sort of "kindness" rather confuses people in the end,
especially makes the config refinement via localmodconfig unhappy.
Also, a codec module would still work if you re-bind the controller
driver via sysfs (although it's no automatic loading), so there might
be a slight use case.
That said, better to let people fallen into a pitfall than being too
smart and restrict something. Let's make things straightforward: now
all CONFIG_SND_HDA_CODEC_* become tristate, and all symbols exported
unconditionally.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The fixes here are all driver specific ones, none of which particularly
stand out but all of which are useful to users of those drivers.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQIcBAABAgAGBQJSstRwAAoJELSic+t+oim9zPcP/3bbMKIGKrRhnkGrYWrJQqBS
NVj327bouHo8TwvW/PDrApY9QOXMxv9Z5GMeazJJ4Y6rOZ/zYVOpO1kU6vwGZ+so
GMtMGFzV5+aF0Rvud+YAKFFV6uj/hkP08YKt9tDFAXBia/Ff8MVdvCW1xt1a6wO4
En+tmZKenhELKjtbnhpfCZClcFLYZxmtYR94Tr3NvzaIDMG0cdR5hKF8V93Wr66v
mCyBG8AblRoWklKNoB2UXJup9/xDR1yggaCq8ObSRbNfs8Zxso6fN7LrqjWuNz7w
Yvh/UiRNqWjcrmihaqRvt0KayEXF5ZSvTUB0U7InYmeZZArITMIJ2Z/BXzi1SazG
/kCg9qkNigeUYMpJPDOm71SKjvzSB1mL+Eol/5wC/GxmdFMEriKf5ob7D3Kq1zR+
c83bZZqK+663OXTdmASTB5wDAyDqwHBFVdOQlY4s8L11nP/bHDgeiRAcni4wdfOW
xovgyPY+PMGFJBfqqvoXShNtDsp2gMDhWYDrH9vUvwUQAhdikPbfEU9KhlOfEpiv
/HMD3r0VKbsstBhE9CE5dnmketQNHPDBkBCzhoFmKOQPKhR9lBwNkLiLQEYfvWaB
omg0vPUubTb+EN6lechRoPYI/s6+mZ+nBaj3skI3MUcqfsegL7QLl6O4RNlCOFD9
S83sp2o6MK1qHspj1MP4
=pOaJ
-----END PGP SIGNATURE-----
Merge tag 'asoc-v3.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.13
The fixes here are all driver specific ones, none of which particularly
stand out but all of which are useful to users of those drivers.
Makes the code slightly shorter.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Add support for configuring the sample rate on the SYSCLK side of the
ASRC.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Currently, the driver only supports configuration of the lower sample
rate (FSL) on the ISRCs. With the higher rate being fixed a SYSCLK, this
patch adds support for configuring the higher sample rate (FSH).
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Certain use-cases require the DRE to be disabled so expose controls for
the enables.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
spear_pcm_request_chan() is almost identical to
dmaengine_pcm_compat_request_channel(), with the exception that the
latter:
a) Assumes that the DAI DMA data is a struct snd_dmaengine_dai_dma_data
pointer rather than some custom type.
b) dma_data->filter_data rather than dma_data should be passed to
snd_dmaengine_pcm_request_channel() as the filter data.
Make minor changes to the SPEAr DAI drivers so that those two conditions
are met. This allows removal of the custom .compat_request_channel().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Modify the SPEAr PCM driver so that it's a utility library that can be
registered on each DAI, rather than a separate struct device. This is
more in line with how many recent DT-converted platforms operate, and
avoids the need for yet another struct device.
This is also required as a pre-cursor to removing
spear_pcm_request_chan().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
ep93xx_compat_request_channel() is almost identical to
dmaengine_pcm_compat_request_channel(), with the exception that the
latter:
a) Assumes that the DAI DMA data is a struct snd_dmaengine_dai_dma_data
pointer rather than some custom type.
b) dma_data->filter_data rather than dma_data should be passed to
snd_dmaengine_pcm_request_channel() as the filter data.
Make minor changes to the ep93xx DAI drivers so that those two conditions
are met. This allows removal of the custom .compat_request_channel().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Modify the ep93xx PCM driver so that it's a utility library that can be
registered on each DAI, rather than a separate struct device. This is
more in line with how many recent DT-converted platforms operate, and
avoids the need for yet another struct device.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Function sgtl5000_enable_regulators() is somehow odd in handling the
optional external VDDD supply. The driver can only enable this supply
on SGTL5000 chip before revision 0x11, and of course when this external
VDDD is present. It currently does something like below.
1. Check if regulator_bulk_get() on VDDA, VDDIO and VDDD will fail. If
it fails, VDDD must be absent and it falls on internal LDO by calling
sgtl5000_replace_vddd_with_ldo(). Otherwise, VDDD is used. And in
either case, regulator_bulk_enable() will be called to enable
3 supplies.
2. In case that SGTL5000 revision is later than 0x11, even if external
VDDD is present, it has to roll back the 'enable' and 'get' calls
with regulator_bulk_disable() and regulator_bulk_free(), and starts
over again by calling sgtl5000_replace_vddd_with_ldo() and
regulator_bulk_enable().
Such back and forth calls sequence is complicated and unnecessary.
Also, since commit 4ddfebd (regulator: core: Provide a dummy regulator
with full constraints), regulator_bulk_get() will always succeeds
because of the dummy regulator. Thus the VDDD detection is broken.
The patch changes the flow to something like the following, which should
be more reasonable and clear, and also fix the VDDD detection breakage.
1. Check if we're running a chip before revision 0x11, on which an
external VDDD can possibly be an option.
2. If it is an early revision, call regulator_get_optional() to detect
whether an external VDDD supply is available.
3. If external VDDD is present, call sgtl5000_replace_vddd_with_ldo() to
update sgtl5000->supplies info.
4. Drop regulator_bulk_get() call in sgtl5000_replace_vddd_with_ldo(),
and call it in sgtl5000_enable_regulators() no matter it's an
external VDDD or internal LDO.
5. Call regulator_bulk_enable() to enable these 3 regulators.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
This adds Freescale SAI ASoC Audio support.
This implementation is only compatible with device tree definition.
Features:
o Supports playback/capture
o Supports 16/20/24 bit PCM
o Supports 8k - 96k sample rates
o Supports master and slave mode.
Signed-off-by: Alison Wang <b18965@freescale.com>
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
The kernel as a number of cases of gendered language. The majority of these
refer to objects that don't have gender in English, and so I've replaced
them with "it" and "its". Some refer to people (developers or users), and
I've replaced these with the singular "they" variant. Some are simply
typos that I've fixed up.
I've left cases where gendered language was used to refer to specific
individuals, was a quote or is part of license text.
Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
On the Dell machines with codec whose Subsystem Id is 0x10280640,
no external microphone can be detected when plugging a 3-ring headset.
Using ALC255_FIXUP_DELL1_MIC_NO_PRESENCE can fix this problem.
The codec (Vendor ID: 0x10ec0255) on the machine belongs to alc_269
family.
BugLink: https://bugs.launchpad.net/bugs/1260303
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: stable@vger.kernel.org
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When wm8904 work in DSP mode B, we still need to configure it to
work in DSP mode. Or else, it will work in Right Justified mode.
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
Some devices are getting very close to the limit whilst polling the RAM
start, this patch adds a small delay to this loop to give a longer
startup timeout.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
When the process is sleeping at the SNDRV_PCM_STATE_PAUSED
state from the wait_for_avail function, the sleep process will be woken by
timeout(10 seconds). Even if the sleep process wake up by timeout, by this
patch, the process will continue with sleep and wait for the other state.
Signed-off-by: JongHo Kim <furmuwon@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch fixes the rates declared in the CPU DAI parameters:
- SNDRV_PCM_RATE_KNOT and the discrete rates SNDRV_PCM_RATE_xxx should
not be used with SNDRV_PCM_RATE_CONTINUOUS,
- SNDRV_PCM_RATE_CONTINUOUS asks for rate_min and rate_max,
- the device may do streaming down to 5512Hz.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
Matching works completely based on the cpu of_node.
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Reported-by: Kyung-Kwee Ryu <kyung-kwee.ryu@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
use snd_dmaengine_pcm_prepare_slave_config to set slave config,
and remove the max_burst_size = 4 hard code.
select SND_SOC_GENERIC_DMAENGINE_PCM for mmp-pcm.
Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
When writing the patch write to the device asynchronously, allowing better
performance when used with a bus like SPI which supports this by
minimising the need to context switch back to the driver to get the
next bit of data.
Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
When writing the patch write to the device asynchronously, allowing better
performance when used with a bus like SPI which supports this by
minimising the need to context switch back to the driver to get the
next bit of data.
Signed-off-by: Mark Brown <broonie@linaro.org>
Tested-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
When writing the patch write to the device asynchronously, allowing better
performance when used with a bus like SPI which supports this by
minimising the need to context switch back to the driver to get the
next bit of data.
Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Where possible write to the device asynchronously, allowing better
performance when used with a bus like SPI which supports this by
minimising the need to context switch back to the driver to get the
next bit of data.
Signed-off-by: Mark Brown <broonie@linaro.org>
Tested-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Because the "ASoC: dmaengine-pcm: Provide default config" has provided
us one defualt config of DMA. When using this, the config parameter of
devm_snd_dmaengine_pcm_register() will be NULL, so here we need to have
a check before using it.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>