Commit graph

67 commits

Author SHA1 Message Date
Akihiko Odaki
19aed2d6cd
ASoC: soc-card: Create jack kcontrol without pins
snd_soc_card_jack_new() allowed to create jack kcontrol without pins,
but did not create kcontrols. The jack would not have kcontrols if pins
were not going to be added.

This renames the old snd_soc_card_jack_new() to
snd_soc_card_jack_new_pins() for use when pins are provided or will be
added later. The new snd_soc_card_jack_new() appropriately creates a
jack for use without pins and adds a kcontrol.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Link: https://lore.kernel.org/r/20220408041114.6024-1-akihiko.odaki@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-04-14 17:37:21 +01:00
Kuninori Morimoto
c757790686
ASoC: soc-jack: cleanup cppcheck warning for CONFIG_GPIOLIB
This patch cleanups below cppcheck warning.

sound/soc/soc-jack.c:21:6: style: struct member 'jack_gpio_tbl::count' is never used. [unusedStructMember]
 int count;
     ^
sound/soc/soc-jack.c:23:28: style: struct member 'jack_gpio_tbl::gpios' is never used. [unusedStructMember]
 struct snd_soc_jack_gpio *gpios;
                           ^

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tujqyols.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-16 13:29:34 +01:00
Kuninori Morimoto
c2dea1fba2
ASoC: soc-jack: cleanup cppcheck warning at snd_soc_jack_report()
This patch cleanups below cppcheck warning.

sound/soc/soc-jack.c:45:6: style: The scope of the variable 'enable' can be reduced. [variableScope]
 int enable;
     ^

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v946yolx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-16 13:29:33 +01:00
Kuninori Morimoto
3359e9b6fa
ASoC: soc-card: move snd_soc_card_jack_new() to soc-card
Card related function should be implemented at soc-card now.
This patch moves it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/878shc25kc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-30 02:11:28 +01:00
Pawel Harlozinski
8f157d4ff0
ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report
Check for existance of jack before tracing.
NULL pointer dereference has been reported by KASAN while unloading
machine driver (snd_soc_cnl_rt274).

Signed-off-by: Pawel Harlozinski <pawel.harlozinski@linux.intel.com>
Link: https://lore.kernel.org/r/20191112130237.10141-1-pawel.harlozinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2019-11-12 17:12:56 +00:00
Kuninori Morimoto
4ff1fef10f
ASoC: add soc-component.c
ALSA SoC has many snd_soc_component_xxx(), but these are randomly
located in many files. Because of it, code is difficult to read.
This patch creates new soc-component.c, and moves existing
snd_soc_component_xxx() into it.
But not yet fully. We need more cleanup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87imrp5roa.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-05 16:16:19 +01:00
Kuninori Morimoto
8ab0215c11
ASoC: soc-jack.c: convert to SPDX identifiers
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-02 10:55:12 +01:00
Kuninori Morimoto
999f7f5af8
ASoC: remove Codec related code
Now no one is using Codec related code.
Let's remove all

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-09 18:39:07 +09:00
Mark Brown
796ff73a08 Merge remote-tracking branches 'asoc/topic/hisi', 'asoc/topic/img', 'asoc/topic/jack' and 'asoc/topic/jz4740' into asoc-next 2017-09-01 12:12:41 +01:00
Kuninori Morimoto
44c07365e9 ASoC: add Component level set_jack
In current ALSA SoC, Codec only has set_jack feature.
Codec will be merged into Component in next generation ALSA SoC,
thus current Codec specific feature need to be merged into it.
This is glue patch for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-30 22:16:16 +01:00
Takashi Iwai
bd29ae9690 ASoC: jack: Manage gpios via devres
Let's be lazy -- this patch adds the devres code to
snd_soc_jack_add_gpios() for releasing the gpio resources at device
removal automagically.  After this patch, you don't have to call
snd_soc_jack_free_gpios() manually as long as it's managed from the
machine driver.

What about the gpios assigned in other levels?  Well, you might still
need to free the resources manually, depending on how the component
unbind works.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-22 13:38:35 +01:00
Srinivas Kandagatla
77a4525bc2 ASoC: jack: fix snd_soc_codec_set_jack return error
This patch changes the error code returned by snd_soc_codec_set_jack()
from -EINVAL to -ENOTSUPP. The reason to do this is to make the caller
aware that the underlying codec does not support this callback. This can
make the caller write the code to handle this case properly.
Other reason is that -EINVAL is not the correct error to return in this
case anyway.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28 14:32:58 +01:00
Bard Liao
d7344010d1 ASoC: jack: add snd_soc_codec_set_jack
There are many codecs with the capability of jack detection. Usually,
we create a jack on machine driver but there is no common function for
machine driver to deliver the jack pointer to codec driver.
snd_soc_codec_set_jack can be used for delivering the jack pointer to
codec driver and enable the jack detection function. To make it work,
codec driver need to define a callback function to receive the jack
pointer and do all necessary procedure for enabling jack detection.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-10 19:46:09 +01:00
Dmitry Torokhov
73548dd316 ASoC: jack - check status of GPIO-based pins on resume
For GPIO-backed pins that are not configured as wakeup sources, we may
miss change in their state that happens while system is suspended. Let's
use PM notifier to refresh their state upon resume.

Signed-off-by: Dmitry Torokhov <dtor@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-24 18:52:32 +00:00
Takashi Iwai
8ffc57093b ASoC: Updates for v4.2
The big thing this release has been Liam's addition of topology support
 to the core.  We've also seen quite a bit of driver work and the
 continuation of Lars' refactoring for component support.
 
  - Support for loading ASoC topology maps from firmware, intended to be
    used to allow self-describing DSP firmware images to be built which
    can map controls added by the DSP to userspace without the kernel
    needing to know about individual DSP firmwares.
  - Lots of refactoring to avoid direct access to snd_soc_codec where
    it's not needed supporting future refactoring.
  - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
    TAS2552 drivers.
  - Support for TI TAS571x power amplifiers.
  - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
  - Support for x86 systems with RT5650 and Qualcomm Storm.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVddV1AAoJECTWi3JdVIfQQQsH/RG3lgOeot5jLWMsxJSKChEl
 KI+aaMcOw6Dj2LDccN8i6vUp8q44cKSXIc7lGLOzJW4K+OydCCGAvE+sJGyRE1dd
 yOHwcbvjJi4zFlt01RZchJ/Wa/S6zFucl5N9HxWsV4bEtfAA59IuhJLtospUlwsA
 mf9mpvSdeUAeh3lM2+AqAbXhTo6dYfD5ky5nrtpAkZjG8gqUG0u8Tpauja0lLcHi
 72/3EkzKR6KHaefyPw3LdN+/H/YK79uHCVcctZnQg5xUUymcO16ReoTxKwV9cnDb
 lBJ6wO8RpUAO9evoG2Yj/l4p+czDCm5VkHMq0nPklHVRh7s/2PwKfox1aw4Pumg=
 =wolq
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Updates for v4.2

The big thing this release has been Liam's addition of topology support
to the core.  We've also seen quite a bit of driver work and the
continuation of Lars' refactoring for component support.

 - Support for loading ASoC topology maps from firmware, intended to be
   used to allow self-describing DSP firmware images to be built which
   can map controls added by the DSP to userspace without the kernel
   needing to know about individual DSP firmwares.
 - Lots of refactoring to avoid direct access to snd_soc_codec where
   it's not needed supporting future refactoring.
 - Big refactoring and cleanup serieses for the Wolfson ADSP and TI
   TAS2552 drivers.
 - Support for TI TAS571x power amplifiers.
 - Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
 - Support for x86 systems with RT5650 and Qualcomm Storm.
2015-06-08 20:47:53 +02:00
Dylan Reid
e616d2eba6 ASoC: jack - add_gpiods accepts filled descriptors
Allow for the desc field to be pre-filled when adding gpios to a jack.
This allows drivers to get the gpios and decide if they should be added
to the list or not.  Specifically this will allow the gpio jack driver
to add gpios based on device property specifications.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-25 13:11:45 +01:00
Jie Yang
f63e8581e2 ASoC: jack: create kctls according to jack pins info
Jack kctls are now created according to the pin info.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27 21:38:32 +02:00
Jie Yang
4e3f0dc658 ALSA: jack: extend snd_jack_new to support phantom jack
Dont create input devices for phantom jacks.

Here, we extend snd_jack_new() to support phantom jack creating:
pass in a bool param for [non-]phantom flag, and a bool param
initial_jack to indicate whether we need to create a kctl at
this stage.

We can also add a kctl to the jack after its created meaning we
can now integrate the HDA and ASoC jacks.

Signed-off-by: Jie Yang <yang.jie@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-27 21:37:41 +02:00
Lars-Peter Clausen
970939964c ASoC: Allow to register jacks at the card level
Jacks are typically card level elements, but are currently registered with a
CODEC. When it was originally introduced snd_soc_jack_new() took a
snd_soc_card as its parameter, but at that time DAPM was only implemented at
the CODEC level and there was only one CODEC per card. This made it clear
which CODEC to use for the jack DAPM operations. But the multi-component
patchset added support for having multiple CODECs per card and with it the
API was updated to register jacks with a specific CODEC instance instead.
Subsequently DAPM support at the card level has been introduced, but the
snd_soc_jack_new() API has so remained unchanged.

This leaves us with the issue that the DAPM pins that are managed by the
jack detection logic usually are part of the card DAPM context but are
accessed through a CODEC DAPM context. Currently this works fine, but might
break in the future if we take a more hierarchical approach to DAPM
contexts.

Furthermore with componentization progressing systems that do not register
a snd_soc_codec might appear, while these system may still want to able to
register a jack.

This patch addresses these issues by adding a new function called
snd_soc_card_jack_new() that can be used to register jacks with the card
rather than a CODEC.

This new function is mostly identical to snd_soc_jack_new() except that it
additionally allows to directly specify the DAPM pins associated with the
jack. This was done since most users of snd_soc_jack_new() typically call
snd_soc_jack_add_pins() right after it, which is not necessary with the new
API and allows to reduce the amount of boiler plate code.

The old snd_soc_jack_new() is re-implemented as a wrapper around
snd_soc_card_jack_new().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-04 17:09:51 +00:00
Mark Brown
addaeea9ee Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/intel', 'asoc/topic/jack', 'asoc/topic/jz4740' and 'asoc/topic/lm49453' into asoc-next 2014-12-08 13:12:00 +00:00
Masanari Iida
bb29a93b38 ASoC: jack: Fix warning while make htmldocs caused by soc-jack.c
This patch fix following errors while "make htmldocs" on
linux-next-20141110.

Warning(.//sound/soc/soc-jack.c:126): No description found for
parameter 'zones'
Warning(.//sound/soc/soc-jack.c:126): Excess function parameter
'zone' description in 'snd_soc_jack_add_zones'

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-11-18 15:01:31 +00:00
Alexandre Courbot
00d647b081 ASoC: jack: update calls to gpiod_get*()
Add the new flags argument to calls of (devm_)gpiod_get*() and
remove any direction setting code afterwards.

Currently both forms (with or without the flags argument)
are valid thanks to transitional macros in
<linux/gpio/consumer.h>. These macros will be removed once
all consumers are updated and the flags argument will become
compulsary.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-23 10:39:18 +01:00
Lars-Peter Clausen
00200107a2 ASoC: Move card field form platform/codec to component
Both the snd_soc_codec and snd_soc_platform struct do have a pointer to the
parent card and both handle this pointer in mostly the same way. This patch
moves the card field to the component level which will allow further code
consolidation between platforms and CODECS.

Since there are only a handful of users of the snd_soc_codec struct's card field
(and none of the snd_soc_platform's) these are update in this patch as well,
which allows it to be removed from the snd_soc_codec struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-22 23:15:57 +01:00
Jarkko Nikula
f025d3b9c6 ASoC: jack: Add support for GPIO descriptor defined jack pins
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>
2014-05-26 15:26:00 +01:00
Jarkko Nikula
50dfb69d1b ASoC: jack: Basic GPIO descriptor conversion
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>
2014-05-26 15:23:14 +01:00
xiangxiao
f1adf5be51 ASoC: delay the initial jack detect by debounce_time
so the hardware could get time to initialize and debounce

Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-24 10:27:47 +09:00
xiangxiao
cb29d7b9ef ASoC: add data field into snd_soc_jack_gpio
so callback could get the context data as needed

Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-24 10:27:44 +09:00
Vinod Koul
30a765d643 ASoC: dont call dapm_sync while reporting jack always
While reporting the jack status snd_soc_jack_report() invokes snd_soc_dapm_sync()
always. This should be required when we have pins associated with jack and
reporting enables or disables these.
So add a check for this case

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-22 09:29:02 +01:00
Lars-Peter Clausen
148663074c ASoC: jack: Remove unnecessary call to snd_soc_dapm_new_widgets()
snd_soc_jack_add_pins() does not create any new DAPM widgets, so there is no
need to call snd_soc_dapm_new_widgets().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-27 15:37:33 +01:00
Mark Brown
e6058aaadc ASoC: jack: Use power efficient workqueue
The accessory detect debounce work is not performance sensitive so let
the scheduler run it wherever is most efficient rather than in a per CPU
workqueue by using the system power efficient workqueue.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
2013-07-19 12:08:31 +01:00
Mark Brown
674b366350 Merge remote-tracking branch 'asoc/topic/log' into asoc-next 2012-12-02 13:35:09 +09:00
Liam Girdwood
008d55e258 ASoC: Jack: Standardise ASoC Jack messages
Currently ASoC has a mixture of message prefixes e.g. "ASoC", "asoc"
or none and message types e.g. pr_debug or dev_dbg.

Make sure all ASoC core messages use the same "ASoC" prefix and
convert any component device specific messages to use dev_dbg
instead of pr_debug.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-21 11:39:54 +09:00
Wei Yongjun
17665ca441 ASoC: jack: remove unused variable in snd_soc_jack_report()
The variable oldstatus is initialized but never used
otherwise, so remove the unused variable.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-22 14:48:14 +01:00
Peter Meerwald
a92b078eab ASoC: fix documentation in soc-jack
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-09 15:38:23 +09:00
Mark Brown
75d8f2931a Merge branch 'asoc-omap' into for-3.7 2012-09-05 20:05:11 +08:00
Mark Brown
12022a7853 ASoC: jack: Always notify full jack status
Don't just notify for the bits we've updated, notify the full state of the
jack otherwise users might get confused by misleading reports.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-13 20:47:58 +01:00
Mark Brown
acaf24f015 ASoC: jack: Always update jack state even for noop changes
Now that DAPM is very cheap for most updates we've no need to avoid trying
to run it so always notify even if we don't think there are any changes.
This avoids potential issues with bootstrapping state like the pin state
or other notifiers when there's nothing in the jack.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-08-03 23:03:56 +01:00
Mark Brown
2667b4b8be ASoC: jack: Push locking for jacks down to the jack
Currently operations on jack reporting take the CODEC mutex both to protect
the current jack status and also to protect the DAPM run which is triggered
on status updates. Since the addition of a DAPM-specific lock we no longer
need to worry about locking DAPM as it has its own finer grained lock so
create a per jack lock to take care of the jack status.

This is both cleaner where the jack isn't specifically associated with a
CODEC and clearer as it's much more obvious what the lock is protecting.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:23 +01:00
Mark Brown
82150101df ASoC: Remove ifdefs for GPIO_SYSFS
It is part of the GPIO API so should be stubbed appropriately.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-12-21 00:12:28 +00:00
Paul Gortmaker
d81a6d7176 sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where needed
These aren't modules, but they do make use of these macros, so
they will need export.h to get that definition.  Previously,
they got it via the implicit module.h inclusion.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:22 -04:00
Mark Brown
143d62a45b ASoC: Ensure DAPM widgets are set up before we sync jacks
We synchronise jack state on startup - when we do that make sure that we
have set up all the DAPM widgets first in case we end up touching any of
the partially set up widgets when syncing the jack pins.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-10-06 16:18:39 +01:00
Mark Brown
747da0f80e ASoC: Fix reporting of partial jack updates
We need to report the entire jack state to the core jack code, not just
the bits that were being updated by the caller, otherwise the status
reported by other detection methods will be omitted from the state seen
by userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@kernel.org
2011-09-05 18:10:52 -07:00
Axel Lin
d2b4c7bd7e ASoC: soc-jack: Fix checking return value of request_any_context_irq
request_any_context_irq() returns a negative value on failure.
On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.orG
2011-08-15 22:28:46 +09:00
Mark Brown
d5381e42f6 ASoC: Merge branch 'for-2.6.39' into for-2.6.40
Fix trivial conflict caused by silly spelling fix patch.

Conflicts:
	sound/soc/codecs/wm8994.c
2011-04-18 18:07:43 +01:00
Stephen Warren
363618f013 ASoC: Name jack GPIOs based on jack not codec
snd_soc_jack_gpio has a name field. Use that name when registering the IRQ,
since this is far more informative than the codec driver name. This shows
up in /proc/interrupts.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-04-03 21:43:23 +09:00
Thomas Gleixner
458f7f8f81 sound: Fixup the last user of the old irq functions
I had seen that before, but now that I removed set_irq_wake it broke.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-30 00:39:44 +02:00
Mark Brown
1d2c27f941 ASoC: Pass the jack to jack notifiers
We're currently not passing anything and this will make the card and so on
more discoverable.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-24 09:42:33 +00:00
Mark Brown
7887ab3a27 ASoC: Allow GPIO jack detection to be configured as a wake source
Some systems wish to use jacks as wake sources. Provide a wake flag in the
GPIO configuration which causes the driver to enable the IRQ as a wake
source.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-18 09:14:14 -08:00
Jarkko Nikula
535787b6ae ASoC: Allow use sleeping gpio in soc-jack
It is safe to use sleeping gpio in snd_soc_jack_gpio_detect as it is not
called from interrupt context. This avoids WARN_ON from __gpio_get_value
if sleeping gpio is registered for jack.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-11 11:17:43 +00:00
Vinod Koul
fa9879edeb ASoC: add support for multiple jack types
This patch adds soc-jack support for adding voltage zones and for
detecting jack type

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <priya.harsha@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-09 23:02:43 +00:00