| Commit message (Collapse) | Author | Age | Files | Lines |
|\ \
| | |
| | |
| | | |
asoc-next
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit f025d3b9c64e ("ASoC: jack: Add support for GPIO descriptor defined
jack pins") caused build error when CONFIG_GPIOLIB is not set:
sound/include/sound/soc.h:470: multiple definition of `snd_soc_jack_add_gpiods'
sound/soc/soc-core.o:sound/include/sound/soc.h:470: first defined here
make[2]: *** [sound/soc/snd-soc-core.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2
Fix this by marking snd_soc_jack_add_gpiods() as static inline in soc.h.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Clarify struct snd_soc_jack_gpio documentation for the idx and name fields.
Because name is passed as connection ID to gpiod_get_index() when using GPIO
descriptor defined jack pins it is not only used as a label in debugfs but
also as function name lookup in systems that support functions names for
GPIOs.
Clarify also idx since the index is within the function of the GPIO consumer
device and not within the device itself only.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow jack GPIO pins be defined also using GPIO descriptor-based interface
in addition to legacy GPIO numbers. This is done by adding two new fields to
struct snd_soc_jack_gpio: idx and gpiod_dev.
Legacy GPIO numbers are used only when GPIO consumer device gpiod_dev is
NULL and otherwise idx is the descriptor index within the GPIO consumer
device.
New function snd_soc_jack_add_gpiods() is added for typical cases where all
GPIO descriptor jack pins belong to same GPIO consumer device. For other
cases the caller must set the gpiod_dev in struct snd_soc_jack_gpio before
calling snd_soc_jack_add_gpios().
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch does basic GPIO descriptor conversion to soc-jack. Even the GPIOs
are still passed and requested using legacy GPIO numbers the driver
internals are converted to use GPIO descriptor API.
Motivation for this is to prepare soc-jack so that it will allow registering
jack GPIO pins using both GPIO descriptors and legacy GPIO numbers.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is useful if we have a pointer to a DAPM context and know that it is a
CODEC or platform DAPM context and want to get a pointer to the CODEC or
platform.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | | |
| \ \ | |
|\ \ \ \
| | |_|/
| |/| |
| | | | |
'asoc/topic/sgtl5000', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sta350' and 'asoc/topic/tlv320dac33' into asoc-next
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds struct device_node **bitclkmaster and struct device_node **framemaster
function parameters. With the new syntax bitclock-master and frame-master
properties can explicitly indicate the dai-link bit-clock and frame masters
with a phandle. This patch also makes the minimal changes to simple-card
for it to work with the updated snd_soc_of_parse_daifmt(). Simple-card appears
to be the only user of snd_soc_of_parse_daifmt() for now.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | | |
| \ \ | |
|\ \ \ \
| | |/ /
| |/| |
| | | | |
and 'asoc/topic/davinci' into asoc-next
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Simplify error handling and remove repetitive (and rarely executed) code
for unregistration by providing a devm_snd_soc_register_platform()
platform.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since there are no users left, we can remove the deprecated ENUM and MUX macros
which are just alias for other macros.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds support for specifying auxiliary codecs and
codec configuration via device tree phandles.
This change adds new fields to snd_soc_aux_dev and snd_soc_codec_conf
and adds support for the changes to SoC core methods.
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Commit d191bd8de8 ("ASoC: snd_soc_codec includes snd_soc_component") removed the
last user of the num_dai field. Also remove the field itself.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The global card list was removed in commit b19e6e7b7 ("ASoC: core: Use driver
core probe deferral"). The 'list' field of the snd_soc_card struct has been
unused since then. This patch removes the field.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Commit f0fba2ad1 ("ASoC: multi-component - ASoC Multi-Component Support") added
a per card list that keeps track of all the DAIs that have been registered with
the card, but the list has never been used. This patch removes it again.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ \
| | |
| | |
| | | |
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
After moving the IO layer inside ASoC to the component level we can now easily
move the standard control helpers also to the component level. This allows to
reuse the same standard helper control implementations for other components.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We currently have two very similar IO abstractions in ASoC, one for CODECs, the
other for platforms. Moving this to the component level will allow us to unify
those two. It will also enable us to move the standard kcontrol helpers as well
as DAPM support to the component level.
The new component level abstraction layer is primarily build around regmap.
There is a per component pointer for the regmap instance for the underlying
device. There are four new function snd_soc_component_read(),
snd_soc_component_write(), snd_soc_component_update_bits() and
snd_soc_component_update_bits_async(). They have the same signature as their
regmap counter-part and will internally forward the call one-to-one to regmap.
If the component it not using regmap it will fallback to using the custom IO
callbacks. This is done to be able to support drivers that haven't been
converted to regmap yet, but it is expected that this will eventually be removed
in the future once all component drivers have been converted to regmap.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | | |
| | \ | |
| | \ | |
| | \ | |
| |\ \ \ \
| | | |_|/
| | |/| |
| | | | | |
of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-component
|
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add the default regmap I/O setting to snd_soc_register_codec() while
the CODEC is initialising, which will be called by CODEC driver device
probe(), and then we can make XXX_set_cache_io() go away entirely from each
CODEC ASoC probe.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This should obviously be snd_soc_platform * and not snd_soc_codec *
Fixes: f6272ff8a5f4 ("ASoC: Add snd_soc_kcontrol_platform() helper function")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
we need _EXT version for SND_SOC_BYTES so that DSPs can use this to pass data
for DSP modules
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The CODEC's write callback can return a negative error code, make sure to pass
that on correctly.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | | |
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
Conflicts:
sound/soc/soc-core.c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is an increasing amount of code that is very similar between platforms,
CODECS and other components. Making platforms a component will allow us to
share this code. For now the patch just adds component and component_driver
fields to the platform and platform_driver structs and registers the platform as
a component. Followup patches will be used to consolidate code between the
different types of components.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
snd_soc_register_component()
snd_soc_unregister_component() takes the parent device of the component as a
parameter and then looks up the component based on this. This is a problem if
multiple components are registered for the same parent device. Currently drivers
do not do this, but some drivers register a CPU DAI component and a platform for
the same parent device. This will become a problem once platforms are also made
components. To make sure that snd_soc_unregister_component() will not
accidentally unregister the platform in such a case only consider components
that were registered with snd_soc_register_component(). This is only meant as
short term stopgap solution to be able to continue componentisation. Long term
we'll need something different.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are no ASoC drivers left that use them and new drivers are supposed to use
regmap for this.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For platform controls snd_kcontrol_chip() currently returns a pointer to the
platform that registered the control. With the upcoming consolidation of
platform and CODEC controls this will change. Prepare for this by introducing
the snd_soc_kcontrol_platform() helper function that will hide the
implementation details of how the platform for a control can be obtained. This
will allow us to change this easily in the future.
The patch also updates all platforms to use this new helper function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For CODEC controls snd_kcontrol_chip() currently returns a pointer to the
CODEC that registered the control. With the upcoming consolidation of
platform and CODEC controls this will change. Prepare for this by introducing
the snd_soc_kcontrol_codec() helper function that will hide the implementation
details of how the CODEC for a control can be obtained. This will allow us to
change this easily in the future.
The patch also updates all CODEC drivers to use the new helper function.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|/
|
|
|
|
|
|
| |
Change reg's type from unsigned short to unsigned int. So that we can use
32 bits reg value in snd_soc_update_bits.
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a helper function to cast back from a component struct to the CODEC struct
it is embedded in. This is useful in situations where we know that a certain
component is a CODEC and want to get access to some CODEC specific properties.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
so callback could get the context data as needed
Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now that all users have been converted to regmap and the config.reg_bits
and config.val_bits can be setted by each user through regmap core API.
So these two params are redundant here.
Since the only control type that left is SND_SOC_REGMAP, so remove it. Drop
the control params and add struct regmap *regmap to simplify the code.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | | | |
| | \ \ | |
| |\ \ \ \
| | | |/ /
| | |/| |
| | | | | |
'topic/wm8991', 'fix/si476x' and 'fix/88pm860' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-io
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We now no longer have any users of hw_read() in the kernel so remove the
code in order to prevent any new users being added. Users should be using
regmap.
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Now that all users have been converted to regmap we can eliminate the ASoC
level wrapper for I2C I/O reducing the amount of duplicated functionality.
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
All ASoC CODEC drivers that use SPI have now been converted to use regmap
so we can delete SND_SOC_SPI, preventing any new users being added.
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | | | |
| \ \ \ | |
|\ \ \ \ \
| | |/ / /
| |/| | |
| | | | | |
'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For some CPU/CODEC DAI devices the TDM slot infomation maybe needed. This
patch adds the slot parsing from DT supports.
TDM slot properties:
dai-tdm-slot-num : Number of slots in use.
dai-tdm-slot-width : Width in bits for each slot.
For instance:
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <8>;
And for each spcified driver, there could be one .of_xlate_tdm_slot_mask()
to specify a explicit mapping of the channels and the slots. If it's absent
the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
tx and rx masks.
For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
for an active slot as default, and the default active bits are at the LSB of
the masks.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch adds snd_soc_of_parse_audio_simple_widgets() and supports
below style of widgets name on DT:
"template-wname", "user supplied wname"
For instance:
simple-audio-widgets =
"Microphone", "Microphone Jack",
"Line", "Line In Jack",
"Line", "Line Out Jack",
"Headphone", "Headphone Jack",
"Speaker", "Speaker External";
The "template-wname" currently includes: "Microphone", "Line", "Headphone"
and "Speaker".
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
|\ \ \ \ |
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum
Conflicts:
include/sound/soc.h
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
With the upcoming consolidation of normal MUXs and virtual MUXs we need to be
able to distinguish between enums with and without a backing register at the
enum level. Use the same approach as used for virtual mixer controls by setting
the reg field of the enum to SND_SOC_NOPM for enums without a backing register.
This patch adds a set of helper macros that can be used to define such enums.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The implementations for enum and value enum controls are almost identical. The
only difference is that the value enum uses an additional look-up table to map
the control value to the register value, while the enum control uses a direct
mapping. Enums and value enums can easily be distinguished at runtime, for value
enums the values field of the snd_soc_enum struct contains the look-up table,
while for enums it is NULL. This patch adds two new small helper functions
called snd_soc_enum_item_to_val() and snd_soc_enum_val_to_item() which map
between register value and control item. If the items field of the snd_soc_enum
struct is NULL the function will do a direct mapping otherwise they'll use the
look-up table to do the mapping. Using these small helper functions it is
possible to use the same kcontrol handlers for both enums and value enums. The
functions are added a inline functions in soc.h so they can also be used by the
DAPM code to accomplish similar consolidation.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
|