aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-06-16ASoC: simple-card-utils: add asoc_simple_card_of_parse_widgets()Kuninori Morimoto1-0/+2
Current simple card drivers are parsing widgets on each own driver (only simple-card at this point, but will be supported on all drivers) Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_widgets for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: simple-card-utils: add asoc_simple_card_of_parse_routing()Kuninori Morimoto1-0/+4
Current simple card drivers are parsing routing on each own driver. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_routing for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-15ASoC: simple-card-utils: add asoc_simple_card_convert_fixup()Kuninori Morimoto1-0/+10
Current simple/audio scu card drivers are supporting same convert-rate/convert-channels on DT, but doesn't use same function for it. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_parse_convert/asoc_simple_card_convert_fixup Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-14ALSA: pcm: remove SNDRV_PCM_IOCTL1_GSTATE internal commandTakashi Sakamoto1-1/+1
SNDRV_PCM_IOCTL1_GSTATE was firstly introduced in v0.9.0, however never be used and the purpose is missing. This commit removes the long-abandoned command, bye. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-14ALSA: pcm: remove SNDRV_PCM_IOCTL1_INFO internal commandTakashi Sakamoto1-1/+1
Drivers can implement 'struct snd_pcm_ops.ioctl' to handle some requests from ALSA PCM core. These requests are internal purpose in kernel land. Usually common set of operations are used for it. SNDRV_PCM_IOCTL1_INFO is one of the requests. According to code comment, it has been obsoleted in the old days. We can see old releases in ftp.alsa-project.org. The command was firstly introduced in v0.5.0 release as SND_PCM_IOCTL1_INFO, to allow drivers to fill data of 'struct snd_pcm_channel_info' type. In v0.9.0 release, this was obsoleted by the other commands for ioctl(2) such as SNDRV_PCM_IOCTL_CHANNEL_INFO. This commit removes the long-abandoned command, bye. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-14ASoC: simple-card-utils: add asoc_simple_card_of_parse_tdm()Kuninori Morimoto1-0/+6
Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-13ASoC: simple_card_utils: add asoc_simple_card_clk_xxx()Kuninori Morimoto1-0/+2
Current simple-card-utils sets asoc_simple_dai::clk via asoc_simple_card_parse_clk(). Current simple card drivers are using it directly for clk_enable/disable. Encapsulation is one of simple card util's purpose. Let's encapsulate it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-09ALSA: seq: Allow the tristate build of OSS emulationTakashi Iwai2-8/+4
Currently OSS sequencer emulation is tied with ALSA sequencer core, both are built in the same level; i.e. when CONFIG_SND_SEQUENCER=y, the OSS sequencer emulation is also always built-in, even though the functionality can be built as an individual module. This patch changes the rule and allows users to build snd-seq-oss module while others are built-in. Essentially, it's just a few simple changes in Kconfig and Makefile. Some driver codes like opl3 need to convert from the simple ifdef to IS_ENABLED(). But that's all. You might wonder how about the dependency: right, it can be messy, but it still works. Since we rewrote the sequencer binding with the standard bus, the driver can be bound at any time on demand. So, the synthesizer driver module can be loaded individually from the OSS emulation core before/after it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-09ASoC: topology: Allow bespoke configuration post widget creationLiam Girdwood1-0/+3
Current topology only allows for widget configuration before the widget is registered. This patch also allows further configuration and usage after registration is complete. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-07ASoC: topology: Fix potential build issues with undeclared structsLiam Girdwood1-0/+2
We should be declaring snd_kcontrol_new and soc_dai_link as both are used within this header so need to be declared. [Reworded commit message to indicate this wasn't an immediate build failure -- broonie] Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-06ASoC: simple-card-utils: share same dev_dbg() for sysclkKuninori Morimoto1-3/+6
Let's share same debug message for sysclk Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-02ALSA: pcm: Direct in-kernel read/write supportTakashi Iwai1-5/+33
Now all materials are ready, let's allow the direct in-kernel read/write, i.e. a kernel-space buffer is passed for read or write, instead of the normal user-space buffer. This feature is used by OSS layer and UAC1 driver, for example. The __snd_pcm_lib_xfer() takes in_kernel argument that indicates the in-kernel buffer copy. When this flag is set, another transfer code is used. It's either via copy_kernel PCM ops or the normal memcpy(), depending on the driver setup. As external API, snd_pcm_kernel_read(), *_write() and other variants are provided. That's all. This support is really simple because of the code refactoring until now. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-02ALSA: pcm: Unify read/write loopTakashi Iwai1-8/+5
Both __snd_pcm_lib_read() and __snd_pcm_write() functions have almost the same code to loop over samples. For simplification, this patch unifies both as the single helper, __snd_pcm_lib_xfer(). Other than that, there should be no functional change by this patch. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-02ALSA: pcm: Call directly the common read/write helpersTakashi Iwai1-9/+34
Make snd_pcm_lib_read() and *_write() static inline functions that call the common helper functions directly. This reduces a slight amount of codes, and at the same time, it's a preparation for the further cleanups / fixes. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-02ALSA: pcm: Drop the old copy and silence opsTakashi Iwai1-5/+0
Now that all users of old copy and silence ops have been converted to the new PCM ops, the old stuff can be retired and go away. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-02ALSA: pcm: Introduce copy_user, copy_kernel and fill_silence opsTakashi Iwai1-0/+7
For supporting the explicit in-kernel copy of PCM buffer data, and also for further code refactoring, three new PCM ops, copy_user, copy_kernel and fill_silence, are introduced. The old copy and silence ops will be deprecated and removed later once when all callers are converted. The copy_kernel ops is the new one, and it's supposed to transfer the PCM data from the given kernel buffer to the hardware ring-buffer (or vice-versa depending on the stream direction), while the copy_user ops is equivalent with the former copy ops, to transfer the data from the user-space buffer. The major difference of the new copy_* and fill_silence ops from the previous ops is that the new ops take bytes instead of frames for size and position arguments. It has two merits: first, it allows the callback implementation often simpler (just call directly memcpy() & co), and second, it may unify the implementations of both interleaved and non-interleaved cases, as we'll see in the later patch. As of this stage, copy_kernel ops isn't referred yet, but only copy_user is used. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-26ALSA: pcm: add local header file for snd-pcm moduleTakashi Sakamoto1-32/+0
Several files are used to construct PCM core module, a.k.a snd-pcm. Although available APIs are described in 'include/sound/pcm.h', some of them are not exported as symbols in kernel space. Such APIs are just for module local usage. This commit adds module local header file and move some function prototypes into it so that scopes of them are controlled properly and developers get no confusion from unavailable symbols. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-25ALSA: pcm: Fix negative appl_ptr handling in pcm-indirect helpersTakashi Iwai1-2/+8
The indirect-PCM helper codes have an implicit assumption that the appl_ptr always increases. But the PCM core may deal with the decrement of appl_ptr via rewind ioctls, and it may screw up the buffer pointer management. This patch adds the negative appl_ptr diff in transfer functions and let returning an error instead of always accepting the appl_ptr updates. The callers are usually PCM ack callbacks, and they pass the error to the upper layer accordingly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-24ASoC: hdmi-codec: add .get_dai_id supportKuninori Morimoto1-0/+9
ALSA SoC needs to know connected DAI ID for probing. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new .get_dai_id callback on hdmi_codec_ops Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-24Merge branch 'topic/dai-id' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-of-graphMark Brown1-0/+3
2017-05-24ASoC: add snd_soc_get_dai_id() functionKuninori Morimoto1-0/+3
ALSA SoC needs to know connected DAI ID for detecting. It is not a big problem if device/driver was only for sound, but getting DAI ID will be difficult if device includes both Video/Sound, like HDMI. To solve this issue, this patch adds new snd_soc_get_dai_id() and its related .of_xlate_dai_id callback on component driver. In below case, we can handle Sound port (= port@2) as ID = 0 if .of_xlate_dai_id has its support. hdmi { port@0 { /* VIDEO */ }; port@1 { /* VIDEO */ }; port@2 { /* SOUND */ }; }; Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-19ASoC: cs35l35: Add Boost Inductor CalculationBrian Austin1-0/+2
Add the Boost Inductor parameters based off the size of the inductor on the HW setup Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-17ASoC: simple-card-utils: add asoc_simple_card_parse_graph_dai()Kuninori Morimoto1-0/+10
simple-card already has asoc_simple_card_parse_dai(), but graph base parsing needs graph specific version of it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-05-17ALSA: pcm: fix the comments that refers to kernel-docMauro Carvalho Chehab1-1/+1
The markup inside the #if 0 comment actually refers to a kernel-doc markup. As we're getting rid of DocBook update it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-17ALSA: Use IS_ENABLED() in common headersTakashi Iwai5-13/+13
Simplify the ifdef conditions with IS_ENABLED() macro in the common sound headers. No functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-17ALSA: pcm: Build pcm notifier code conditionallyTakashi Iwai1-7/+8
The PCM notifier code is used only by OSS emulation layer, so we can build it conditionally for reducing the size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-17ALSA: ak411x: Use array instead of offsetof()Takashi Iwai3-12/+27
The ak4113, ak4114 and ak4117 i2c drivers have some tricky codes to access the struct fields in the callback. This can be simplified by replacing the struct fields with the array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-02Merge tag 'asoc-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai2-1/+121
ASoC: Updates for v4.12 A quiet release for the core, but lots of new drivers this time around: - A new, generalized, API for hooking up jacks which makes it easier to write generic machine drivers for simple cases. - Continuing fixes for issues with the x86 CPU drivers. - New drivers for Cirrus CS35L35, DIO DIO2125, Everest ES7132, HiSilicon hi6210, Maxim MAX98927, MT2701 systems with WM8960, Nuvoton NAU8824, Odroid systems, ST STM32 SAI controllers and x86 systems with DA7213
2017-04-30Merge remote-tracking branches 'asoc/topic/cs35l35', 'asoc/topic/cs53l30', 'asoc/topic/da7213', 'asoc/topic/dio2125' and 'asoc/topic/dwc' into asoc-nextMark Brown1-0/+108
2017-04-30Merge remote-tracking branch 'asoc/topic/rt5665' into asoc-nextMark Brown1-0/+5
2017-04-30Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown1-0/+8
2017-04-24ASoC: Provide a dummy wrapper of snd_soc_set_dmi_name()Takashi Iwai1-0/+8
For systems without DMI, it makes no sense to have the code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-21ASoC: cs35l35: Allow user to configure IMON SCALECharles Keepax1-0/+1
On the chip the IMON signal is a full 24-bits however normally only some of the bits will be sent over the bus. The chip provides a field to select which bits of the IMON will be sent back, this is the only feedback signal that has this feature. Add an additional entry to the cirrus,imon device tree property to allow the IMON scale parameter to be passed. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-11Merge branch 'topic/jack' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rt5665Mark Brown1-0/+5
2017-04-10ASoC: jack: add snd_soc_codec_set_jackBard Liao1-0/+4
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-07ALSA: hda - add more ML register definitionsLibin Yang1-3/+5
This patch refines the definition of AZX_MLCTL_SPA and AZX_MLCTL_CPA and add more definitions of ML registers Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-06ASoC: cs35l35: Correct handling of PDN_DONE with external boostCharles Keepax1-0/+2
When using an external boost supply the PDN_DONE bit is not set, update the handling in this case to use to use an appropriate fixed delay. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-03ALSA: hda - Move SKL+ vendor specific register definitions to hda_register.hTakashi Iwai1-2/+20
They may be used by both legacy and ASoC drivers. Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-03ALSA: hda - Avoid tricky macrosTakashi Iwai1-10/+18
The macros _snd_hdac_chip_read() and *_write() expand to different types (b,w,l) per their argument. They were thought to be used only internally for other snd_hdac_chip_*() macros, but in some situations we need to call these directly, and they are way too ugly. Instead of saving a few lines, we just write these macros explicitly with the types, so that they can be used in a saner way. Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-03-24ASoC: jack - check status of GPIO-based pins on resumeDmitry Torokhov1-0/+1
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-24ASoC: core: remove pointless auxiliary from snd_soc_componentKuninori Morimoto1-1/+0
commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") tried to replace aux_comp_list to component_dev_list, but it failed because of binding timing. Thus, Sylwester fixuped it by commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary..."). One of main purpose of commit 1a653aa44725 ("ASoC: core: replace...") was remove replaceable list (= list_aux) from snd_soc_component by using new "auxiliary" flags (but it failed). Because of this background, current code has reborned card_aux_list (= same as original list_aux), and almost pointless "auxiliary" flags. Let's remove pointless "auxiliary" flags by this patch This means, it is same as revert both commit 1a653aa44725 ("ASoC: core: replace aux_comp_list to ...") and commit d2e3a1358c37 ("ASoC: Fix binding and probing of auxiliary..."). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-13ASoC: cs35l35: Add for configuring drive mode in unused slotsCharles Keepax1-0/+2
Add support for setting how the I2S pins are driven in unused slots, currently the chip will just use the default of drive 0, however this causes issues when multiple devices are attached to the same bus. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07ASoC: Add support for Cirrus Logic CS35L35 AmplifierBrian Austin1-0/+103
This patch adds support for the Cirrus Logic CS35L35 9V Boosted Amplifier Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-02sched/headers: Prepare to remove spurious <linux/sched.h> inclusion dependenciesIngo Molnar1-0/+1
In the following patches we are going to remove various headers from sched.h and other headers that sched.h includes. To make those patches build cleanly prepare the scene by adding dependencies to various files that learned to rely on those to-be-removed dependencies. These changes all make sense standalone: they add a header for a data type that a particular .c or .h file is using. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-02-25treewide: Remove remaining executable attributes from source filesJoe Perches1-0/+0
These are the current source files that should not have executable attributes set. [ Normally this would be sent through Andrew Morton's tree but his quilt tools don't like permission only patches. ] Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-20Merge tag 'asoc-v4.11' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linusTakashi Iwai4-40/+32
ASoC: Updates for v4.11 Another release that's mainly focused on drivers rather than core changes, highlights include: - A huge batch of updates to the Intel drivers, mainly around DisplayPort and HDMI with some additional board support too. - Channel mapping support for HDMI. - Support for AllWinner A31 and A33, Everest Semiconductor ES8328, Nuvoton NAU8540.
2017-02-19Merge remote-tracking branches 'asoc/topic/rt5665', 'asoc/topic/rt5677', 'asoc/topic/samsung', 'asoc/topic/simple' and 'asoc/topic/sunxi' into asoc-nextMark Brown1-5/+6
2017-02-19Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8328', 'asoc/topic/fsl', 'asoc/topic/fsl-sai' and 'asoc/topic/graph' into asoc-nextMark Brown1-23/+7
2017-02-19Merge remote-tracking branches 'asoc/topic/atmel', 'asoc/topic/chmap', 'asoc/topic/cq93vc' and 'asoc/topic/da7218' into asoc-nextMark Brown1-0/+3
2017-02-19Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown1-0/+4