#
b2022138 |
| 20-Feb-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Don't ignore internal PCMs in snd_pcm_dev_disconnect()
Some codes in snd_pcm_dev_disconnect() are still valid even for internal PCMs, but they are skipped because of the check of list_emp
ALSA: pcm: Don't ignore internal PCMs in snd_pcm_dev_disconnect()
Some codes in snd_pcm_dev_disconnect() are still valid even for internal PCMs, but they are skipped because of the check of list_empty(&pcm->list) at the beginning. Remove this check and put pcm->internal checks appropriately for internal PCM object to process through this function.
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
646e1dd8 |
| 20-Feb-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Don't notify internal PCMs
Notifier shouldn't listen to the changes of internal PCMs.
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
b95bd3a4 |
| 20-Feb-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Don't add internal PCMs to PCM device list
An internal PCM object shouldn't be added to the PCM device list, as it's never accessed directly from the user-space, and it has no proc or any
ALSA: pcm: Don't add internal PCMs to PCM device list
An internal PCM object shouldn't be added to the PCM device list, as it's never accessed directly from the user-space, and it has no proc or any similar accesses. Currently, it's excluded in snd_pcm_get() and snd_pcm_next(), but it's easier not to add such an object to the list.
Actually, the whole snd_pcm_dev_register() can be skipped for an internal PCM. So this patch changes the code there, but also addresses the uninitialized list_head access.
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
ad876c86 |
| 20-Feb-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Minor refactoring in snd_pcm_attach_substream()
No functional changes at all.
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
40a4b263 |
| 30-Jan-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: Simplify snd_device_register() variants
Now that all callers have been replaced with snd_device_register_for_dev(), let's drop the obsolete device registration code and concentrate only on the
ALSA: Simplify snd_device_register() variants
Now that all callers have been replaced with snd_device_register_for_dev(), let's drop the obsolete device registration code and concentrate only on the code handling struct device directly. That said,
- remove the old snd_device_register(), - rename snd_device_register_for_dev() with snd_device_register(), - drop superfluous arguments from snd_device_register(), - change snd_unregister_device() to pass the device pointer directly
Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
ef46c7af |
| 29-Jan-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Embed struct device
Like previous patches, at this time we embed the struct device into PCM object. However, this needs a bit more caution: struct snd_pcm doesn't own one device but two,
ALSA: pcm: Embed struct device
Like previous patches, at this time we embed the struct device into PCM object. However, this needs a bit more caution: struct snd_pcm doesn't own one device but two, for both playback and capture! Thus not struct snd_pcm but struct snd_pcm_str object contains the device.
Along with this change, pcm->dev field is dropped for avoiding confusion. It was meant to point to a non-standard parent. But, since now we can touch each struct device directly, we can manipulate the parent field easily there, too.
Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
23c18d4b |
| 19-Feb-2014 |
Takashi Iwai <tiwai@suse.de> |
ALSA: control: Provide a helper to look for the preferred subdevice
Instead of open-coding the search over the control file loop, provide a helper function for the preferred subdevice assigned to th
ALSA: control: Provide a helper to look for the preferred subdevice
Instead of open-coding the search over the control file loop, provide a helper function for the preferred subdevice assigned to the current process.
Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
92b7952d |
| 29-Jan-2015 |
Takashi Iwai <tiwai@suse.de> |
ALSA: Allow to pass the device object to snd_register_device*()
This is a preliminary patch for the further work on embedding struct device into each sound device instance. It changes snd_register_
ALSA: Allow to pass the device object to snd_register_device*()
This is a preliminary patch for the further work on embedding struct device into each sound device instance. It changes snd_register_device*() helpers to receive the device object directly for skipping creating a device there.
Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
d42472ec |
| 21-Nov-2014 |
Jussi Laako <jussi@sonarnerd.net> |
ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample format
This patch fixes XMOS DSD sample format to DSD_U32_BE and also adds DSD_U16_BE and DSD_U32_BE sample formats.
Signed-off-
ALSA: pcm: Add big-endian DSD sample formats and fix XMOS DSD sample format
This patch fixes XMOS DSD sample format to DSD_U32_BE and also adds DSD_U16_BE and DSD_U32_BE sample formats.
Signed-off-by: Jussi Laako <jussi@sonarnerd.net> Acked-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
2b30d411 |
| 04-Nov-2014 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Add xrun_injection proc entry
This patch adds a new proc entry for PCM substreams to inject an XRUN. When a PCM substream is running and any value is written to its xrun_injection proc f
ALSA: pcm: Add xrun_injection proc entry
This patch adds a new proc entry for PCM substreams to inject an XRUN. When a PCM substream is running and any value is written to its xrun_injection proc file, the driver triggers XRUN. This is a useful feature for debugging XRUN and error handling code paths.
Note that this entry is enabled only when CONFIG_SND_PCM_XRUN_DEBUG is set.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
30b771cf |
| 30-Oct-2014 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: More kerneldoc updates
Add proper kerneldoc comments to the exported functions.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
d4288d3f |
| 05-Sep-2014 |
Jurgen Kramer <gtmkramer@xs4all.nl> |
ALSA: pcm: add new DSD sampleformat for native DSD playback on XMOS based devices
XMOS based USB DACs with native DSD support expose this feature via a USB alternate setting. The audio format is eit
ALSA: pcm: add new DSD sampleformat for native DSD playback on XMOS based devices
XMOS based USB DACs with native DSD support expose this feature via a USB alternate setting. The audio format is either 32-bit raw or a 32-bit PCM format. To utilize this feature on linux this patch introduces a new 32-bit DSD sampleformat DSD_U32_LE. A follow up patch will add a quirk for XMOS based devices to utilize the new format. Further patches will add support to alsa-lib.
Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
257f8cce |
| 29-Aug-2014 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Allow nonatomic trigger operations
Currently, many PCM operations are performed in a critical section protected by spinlock, typically the trigger and pointer callbacks are assumed to be
ALSA: pcm: Allow nonatomic trigger operations
Currently, many PCM operations are performed in a critical section protected by spinlock, typically the trigger and pointer callbacks are assumed to be atomic. This is basically because some trigger action (e.g. PCM stop after drain or xrun) is done in the interrupt handler. If a driver runs in a threaded irq, however, this doesn't have to be atomic. And many devices want to handle trigger in a non-atomic context due to lengthy communications.
This patch tries all PCM calls operational in non-atomic context. What it does is very simple: replaces the substream spinlock with the corresponding substream mutex when pcm->nonatomic flag is set. The driver that wants to use the non-atomic PCM ops just needs to set the flag and keep the rest as is. (Of course, it must not handle any PCM ops in irq context.)
Note that the code doesn't check whether it's atomic-safe or not, but trust in 100% that the driver sets pcm->nonatomic correctly.
One possible problem is the case where linked PCM substreams have inconsistent nonatomic states. For avoiding this, snd_pcm_link() returns an error if one tries to link an inconsistent PCM substream.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
caa751ba |
| 25-Feb-2014 |
Takashi Iwai <tiwai@suse.de> |
ALSA: Create sysfs attribute files via groups
Instead of calling each time device_create_file(), create the groups of sysfs attribute files at once in a normal way. Add a new helper function, snd_g
ALSA: Create sysfs attribute files via groups
Instead of calling each time device_create_file(), create the groups of sysfs attribute files at once in a normal way. Add a new helper function, snd_get_device(), to return the associated device object, so that we can handle the sysfs addition locally.
Since the sysfs file addition is done differently now, snd_add_device_sysfs_file() helper function is removed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
09e56df8 |
| 04-Feb-2014 |
Takashi Iwai <tiwai@suse.de> |
ALSA: pcm: Use standard printk helpers
Use dev_err() & co as much as possible. If not available (no device assigned at the calling point), use pr_xxx() helpers instead.
For simplicity, introduce n
ALSA: pcm: Use standard printk helpers
Use dev_err() & co as much as possible. If not available (no device assigned at the calling point), use pr_xxx() helpers instead.
For simplicity, introduce new helpers for pcm stream, pcm_err(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
8eeaa2f9 |
| 10-Feb-2014 |
Takashi Iwai <tiwai@suse.de> |
ALSA: Replace with IS_ENABLED()
Replace the lengthy #if defined(XXX) || defined(XXX_MODULE) with the new IS_ENABLED() macro.
The patch still doesn't cover all ifdefs. For example, the dependency o
ALSA: Replace with IS_ENABLED()
Replace the lengthy #if defined(XXX) || defined(XXX_MODULE) with the new IS_ENABLED() macro.
The patch still doesn't cover all ifdefs. For example, the dependency on CONFIG_GAMEPORT is still open-coded because this also has an extra dependency on MODULE. Similarly, an open-coded ifdef in pcm_oss.c and some sequencer-related stuff are left untouched.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
a4461f41 |
| 31-Oct-2013 |
Russell King <rmk+kernel@arm.linux.org.uk> |
ALSA: fix oops in snd_pcm_info() caused by ASoC DPCM
Unable to handle kernel NULL pointer dereference at virtual address 00000008 pgd = d5300000 [00000008] *pgd=0d265831, *pte=00000000, *ppte=000000
ALSA: fix oops in snd_pcm_info() caused by ASoC DPCM
Unable to handle kernel NULL pointer dereference at virtual address 00000008 pgd = d5300000 [00000008] *pgd=0d265831, *pte=00000000, *ppte=00000000 Internal error: Oops: 17 [#1] PREEMPT ARM CPU: 0 PID: 2295 Comm: vlc Not tainted 3.11.0+ #755 task: dee74800 ti: e213c000 task.ti: e213c000 PC is at snd_pcm_info+0xc8/0xd8 LR is at 0x30232065 pc : [<c031b52c>] lr : [<30232065>] psr: a0070013 sp : e213dea8 ip : d81cb0d0 fp : c05f7678 r10: c05f7770 r9 : fffffdfd r8 : 00000000 r7 : d8a968a8 r6 : d8a96800 r5 : d8a96200 r4 : d81cb000 r3 : 00000000 r2 : d81cb000 r1 : 00000001 r0 : d8a96200 Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c5387d Table: 15300019 DAC: 00000015 Process vlc (pid: 2295, stack limit = 0xe213c248) [<c031b52c>] (snd_pcm_info) from [<c031b570>] (snd_pcm_info_user+0x34/0x9c) [<c031b570>] (snd_pcm_info_user) from [<c03164a4>] (snd_pcm_control_ioctl+0x274/0x280) [<c03164a4>] (snd_pcm_control_ioctl) from [<c0311458>] (snd_ctl_ioctl+0xc0/0x55c) [<c0311458>] (snd_ctl_ioctl) from [<c00eca84>] (do_vfs_ioctl+0x80/0x31c) [<c00eca84>] (do_vfs_ioctl) from [<c00ecd5c>] (SyS_ioctl+0x3c/0x60) [<c00ecd5c>] (SyS_ioctl) from [<c000e500>] (ret_fast_syscall+0x0/0x48) Code: e1a00005 e59530dc e3a01001 e1a02004 (e5933008) ---[ end trace cb3d9bdb8dfefb3c ]---
This is provoked when the ASoC front end is open along with its backend, (which causes the backend to have a runtime assigned to it) and then the SNDRV_CTL_IOCTL_PCM_INFO is requested for the (visible) backend device.
Resolve this by ensuring that ASoC internal backend devices are not visible to userspace, just as the commentry for snd_pcm_new_internal() says it should be.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Mark Brown <broonie@linaro.org> Cc: <stable@vger.kernel.org> [v3.4+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
ef7a4f97 |
| 16-Apr-2013 |
Daniel Mack <zonque@gmail.com> |
ALSA: add DSD formats
This patch adds two formats for Direct Stream Digital (DSD), a pulse-density encoding format which is described here: https://en.wikipedia.org/wiki/Direct_Stream_Digital
DSD o
ALSA: add DSD formats
This patch adds two formats for Direct Stream Digital (DSD), a pulse-density encoding format which is described here: https://en.wikipedia.org/wiki/Direct_Stream_Digital
DSD operates on 2.8, 5.6 or 11.2MHz sample rates and as a 1-bit stream.
The two new types added by this patch describe streams that are capable of handling DSD samples in DOP format as 8-bit or in 16-bit (or at a x8 or x16 data rate, respectively).
DSD itself specifies samples in *bit*, while DOP and ALSA handle them as *bytes*. Hence, a factor of 8 or 16 has to be applied for the sample rare configuration, according to the following table:
configured hardware 176.4KHz 352.8kHz 705.6KHz <---- sample rate
8-bit 2.8MHz 5.6MHz 16-bit 2.8Mhz 5.6MHz 11.2MHz
`-----------------------------' actual DSD sample rates
Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
eb7c06e8 |
| 11-Mar-2013 |
Yacine Belkadi <yacine.belkadi.1@gmail.com> |
ALSA: add/change some comments describing function return values
script/kernel-doc reports the following type of warnings (when run in verbose mode):
Warning(sound/core/init.c:152): No description
ALSA: add/change some comments describing function return values
script/kernel-doc reports the following type of warnings (when run in verbose mode):
Warning(sound/core/init.c:152): No description found for return value of 'snd_card_create'
To fix that: - add missing descriptions of function return values - use "Return:" sections to describe those return values
Along the way: - complete some descriptions - fix some typos
Signed-off-by: Yacine Belkadi <yacine.belkadi.1@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
51d503de |
| 21-Nov-2012 |
Sachin Kamat <sachin.kamat@linaro.org> |
ALSA: PCM: Remove redundant null check before kfree
kfree on a null pointer is a no-op.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
#
0914f796 |
| 16-Oct-2012 |
Takashi Iwai <tiwai@suse.de> |
ALSA: Avoid endless sleep after disconnect
When disconnect callback is called, each component should wake up sleepers and check card->shutdown flag for avoiding the endless sleep blocking the proper
ALSA: Avoid endless sleep after disconnect
When disconnect callback is called, each component should wake up sleepers and check card->shutdown flag for avoiding the endless sleep blocking the proper resource release.
Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
9b0573c0 |
| 12-Oct-2012 |
Takashi Iwai <tiwai@suse.de> |
ALSA: PCM: Fix some races at disconnection
Fix races at PCM disconnection: - while a PCM device is being opened or closed - while the PCM state is being changed without lock in prepare, hw_params,
ALSA: PCM: Fix some races at disconnection
Fix races at PCM disconnection: - while a PCM device is being opened or closed - while the PCM state is being changed without lock in prepare, hw_params, hw_free ops
Reported-by: Matthieu CASTET <matthieu.castet@parrot.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
2d3391ec |
| 27-Jul-2012 |
Takashi Iwai <tiwai@suse.de> |
ALSA: PCM: channel mapping API implementation
This patch implements the basic data types for the standard channel mapping API handling.
- The definitions of the channel positions and the new TLV ty
ALSA: PCM: channel mapping API implementation
This patch implements the basic data types for the standard channel mapping API handling.
- The definitions of the channel positions and the new TLV types are added in sound/asound.h and sound/tlv.h, so that they can be referred from user-space.
- Introduced a new helper function snd_pcm_add_chmap_ctls() to create control elements representing the channel maps for each PCM (sub)stream.
- Some standard pre-defined channel maps are provided for convenience.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|
#
51990e82 |
| 22-Jan-2012 |
Paul Gortmaker <paul.gortmaker@windriver.com> |
device.h: cleanup users outside of linux/include (C files)
For files that are actively using linux/device.h, make sure that they call it out. This will allow us to clean up some of the implicit use
device.h: cleanup users outside of linux/include (C files)
For files that are actively using linux/device.h, make sure that they call it out. This will allow us to clean up some of the implicit uses of linux/device.h within include/* without introducing build regressions.
Yes, this was created by "cheating" -- i.e. the headers were cleaned up, and then the fallout was found and fixed, and then the two commits were reordered. This ensures we don't introduce build regressions into the git history.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
show more ...
|
#
945e5038 |
| 08-Feb-2012 |
Liam Girdwood <lrg@ti.com> |
ALSA: PCM - Add PCM creation API for internal PCMs.
The new ASoC dynamic PCM core needs to create PCMs and substreams that are for use by internal ASoC drivers only and not visible to userspace for
ALSA: PCM - Add PCM creation API for internal PCMs.
The new ASoC dynamic PCM core needs to create PCMs and substreams that are for use by internal ASoC drivers only and not visible to userspace for direct IO. These new PCMs are similar to regular PCMs expect they have no device nodes or procfs entries. The ASoC component drivers use them in exactly the same way as regular PCMs for PCM and DAI operations.
The intention is that a dynamic PCM based driver will register both regular PCMs and internal PCMs. The regular PCMs will be used for all IO with userspace however the internal PCMs will be used by the driver to route digital audio through numerous back end DAI links (with potentially a DSP providing different hw_params, DAI formats based on the regular front end PCM params) to devices like CODECs, MODEMs, Bluetooth, FM, DMICs, etc
This patch adds a new snd_pcm_new_internal() API call to create the internal PCM without device nodes or procfs. It also adds adds a new internal flag to snd_pcm.
[fixed minor coding-style issues by tiwai]
Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
show more ...
|