aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/rme9652 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-08-21ALSA: hdsp: silence and underflow warningDan Carpenter1-1/+2
I believe this probably cannot happen, as the code suggests. There would have to be an kcontrol->index.id which was zero, otherwise this would be prevented in snd_ctl_find_id(). But snd_BUG_ON() is just a WARN() or a no-op so static checkers complain that we keep on going with a negative offset. Let's just handle the error as well as printing a warning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-17ALSA: hdspm - DRY cleanup of snd_pcm_opsAdrian Knoth1-15/+3
This commit removes code duplication between snd_hdspm_{capture,playback}_ops. No semantic changes intended, this is purely cosmetic. Signed-off-by: Adrian Knoth <aknoth@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-17ALSA: hdspm - DRY cleanup in .release callbackAdrian Knoth1-18/+11
This commit removes code duplication between snd_hdspm_{capture,playback}_release. No semantic changes intended, this is purely cosmetic. Signed-off-by: Adrian Knoth <aknoth@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-17ALSA: hdspm - DRY cleanup in .open callbacksAdrian Knoth1-76/+24
This commit removes code duplication between snd_hdspm_{capture,playback}_open. No semantic changes intended, this is purely cosmetic. Signed-off-by: Adrian Knoth <aknoth@google.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-02-13ALSA: hdspm - Constrain periods to 2 on older cardsAdrian Knoth1-0/+6
RME RayDAT and AIO use a fixed buffer size of 16384 samples. With period sizes of 32-4096, this translates to 4-512 periods. The older RME cards have a variable buffer size but require exactly two periods. This patch enforces nperiods=2 on those cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Cc: <stable@vger.kernel.org> # 2.6.39+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: Include linux/io.h instead of asm/io.hTakashi Iwai3-3/+3
Nowadays it's recommended. Replace all in a shot. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19ALSA: hdspm: Use setup_timer() and mod_timer()Takashi Iwai1-9/+5
No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19ALSA: hdsp: Use setup_timer() and mod_timer()Takashi Iwai1-9/+5
No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-04ALSA: Deletion of checks before the function call "iounmap"Markus Elfring3-8/+3
The iounmap() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-17ALSA: hdsp: Deletion of an unnecessary check before the function call "release_firmware"Markus Elfring1-2/+1
The release_firmware() function tests whether its argument is NULL and then return immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-11-11ALSA: Fix invalid kerneldoc markersTakashi Iwai1-24/+24
They are no real kerneldoc comments, so drop such markers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-29ALSA: hdspm: remove unused variableSudip Mukherjee1-20/+3
removed the unused variables. These variables were only being assigned some value, but the values were never being used. it has been build tested after removing the variables. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: rme9652: Use snd_ctl_enum_info()Takashi Iwai1-40/+18
... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: hdspm: Use snd_ctl_enum_info()Takashi Iwai1-12/+1
... and reduce the open codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: hdsp: Use snd_ctl_enum_info()Takashi Iwai1-118/+57
... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-08-12PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine3-3/+3
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2014-02-26ALSA: rme9652: Use standard printk helpersTakashi Iwai1-6/+13
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26ALSA: hdspm: Use standard printk helpersTakashi Iwai1-56/+69
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-26ALSA: hdsp: Use standard printk helpersTakashi Iwai1-49/+79
Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12ALSA: pci: Convert to snd_card_new() with a device pointerTakashi Iwai3-10/+6
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-09ALSA: Remove memory reservation code from memalloc helperTakashi Iwai2-16/+4
Nowadays we have CMA for obtaining the contiguous memory pages efficiently. Let's kill the old kludge for reserving the memory pages for large buffers. It was rarely useful (only for preserving pages among module reloading or a little help by an early boot scripting), used only by a couple of drivers, and yet it gives too much ugliness than its benefit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-01-05ALSA: rme9652: fix a missing comma in channel_map_9636_ds[]Takashi Iwai1-1/+1
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>
2013-10-29ALSA: Use strlcpy() instead of strncpy()Takashi Iwai1-1/+1
We tend to make stupid mistakes with strncpy(). Let's take a safer one, strlcpy(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-25Merge tag 'asoc-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai1-0/+1
ASoC: Updates for v3.13 - Further work on the dmaengine helpers, including support for configuring the parameters for DMA by reading the capabilities of the DMA controller which removes some guesswork and magic numbers fromm drivers. - A refresh of the documentation. - Conversions of many drivers to direct regmap API usage in order to allow the ASoC level register I/O code to be removed, this will hopefully be completed by v3.14. - Support for using async register I/O in DAPM, reducing the time taken to implement power transitions on systems that support it.
2013-10-16ALSA: hdsp - info leak in snd_hdsp_hwdep_ioctl()Dan Carpenter1-0/+1
In GCC the sizeof(hdsp_version) is 8 because there is a 2 byte hole at the end of the struct after ->firmware_rev. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-09-13ALSA: rme9652: Remove redundant breakSachin Kamat1-5/+0
'break' after return statement is not necessary. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-19ALSA: hdspm - Use enums in hdspm_tco_ltc_frames()Adrian Knoth1-5/+5
This patch doesn't change functionality, it only improves readability and fixes a copy&paste error in a comment. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-08-19ALSA: hdspm - Fix default value in SNDRV_HDSPM_IOCTL_GET_LTCAdrian Knoth1-1/+1
Use enum hdspm_ltc_format's fps_30 (corresponds to 4) instead of 30, Other case branches return 1, 2 or 3 respectively, so 30 obviously is wrong. Since SNDRV_HDSPM_IOCTL_GET_LTC had never been working due to a copy&paste error in hdspm.h, this change doesn't break userspace. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-15ALSA: hdspm - remove unneeded semicolonFengguang Wu1-1/+1
sound/pci/rme9652/hdspm.c:1110:2-3: Unneeded semicolon Generated by: coccinelle/misc/semicolon.cocci Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Added some comments and control register documentationMartin Dausel1-7/+99
Signed-off-by: Martin Dausel <martin.dausel@iosono-sound.com> Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Use snd_ctl_enum_info() in snd_hdspm_info_autosync_refAdrian Knoth1-20/+4
Also use snd_ctl_enum_info() to fill the autosync text fields on AES32 and MADI cards (only users of snd_hdspm_info_autosync_ref). Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Use snd_ctl_enum_info() for texts_autosyncAdrian Knoth1-19/+10
Also use snd_ctl_enum_info() to fill the autosync enumerated controls. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Use snd_ctl_enum_info for most text arraysAdrian Knoth1-31/+19
Use snd_ctl_enum_info() to fill most of the enumerated controls. More non-trivial occurrences will follow in separate commits. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Enable TCO supportAdrian Knoth1-0/+1
This patch finally enables TCO support on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Report external sample rate to userspaceAdrian Knoth1-3/+8
This patch adds a new ALSA control to read the external sample rate from userspace on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Introduce hdspm_external_rate_to_enum() helper functionAdrian Knoth1-11/+17
This patch refactors the code to query the external sample rate and its translation into the corresponding enum into a helper function to prevent future code duplication. A later commit will make use of this new helper function. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Include TCO and Sync-In in proc outputAdrian Knoth1-0/+7
Also report TCO status and Sync-In via /proc/ on AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Enable TCO/Sync-In in snd_hdspm_put_sync_ref()Adrian Knoth1-7/+8
This patch enables the user to select "TCO" and "Sync In" as a preferred sync reference on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Enable TCO input in hdspm_external_sample_rate()Adrian Knoth1-9/+28
This patch adds support to read the TCO sample rate in hdspm_external_sample_rate() on RME AES(32) cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Ignore float/int format bitAdrian Knoth1-0/+10
As mentioned in the comment, the AES32 cards must not set the format bit, since it is used to indicate the preferred sync setting instead. We hence simply skip the corresponding part in the hw_params function. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Enable AES32 in hdspm_get_tco_sample_rateAdrian Knoth1-0/+3
This patch adds AES32 specific code to hdspm_get_tco_sample_rate to query the TCO sample rate. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Enable AES32 in hdspm_get_wc_sample_rateAdrian Knoth1-0/+3
This patch adds AES32 specific code to hdspm_get_wc_sample_rate() to query the wordclock frequency. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Add prototype declarationsAdrian Knoth1-4/+12
This patch only introduces prototype declarations, no real change. The functions themselves are already present. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Introduce hdspm_get_aes_sample_rate()Adrian Knoth1-0/+17
Helper function to return the AES sample rate class. This class needs to be translated via HDSPM_bit2freq() to get the more common representation. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Add TCO and Sync-In text entriesAdrian Knoth1-4/+7
Provide the text for the two new clock options "TCO" and "Sync In" on AES32 cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AIO: Drop superfluous HDSPM_AUTOSYNC_REFAdrian Knoth1-1/+0
The HDSPM_AUTOSYNC_REF macro is only implemented for MADI and AES32 cards, so it doesn't make sense to call it on AIO boards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Cosmetics, no real changeAdrian Knoth1-5/+7
This patch does nothing, it's sole intent is to clean up the code. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - AES32: Fix TCO sync check reportingAdrian Knoth1-7/+18
HDSPM_tco_lock and HDSPM_tcoLock were too close, so the previous code didn't honour the difference between the two. Let's be more verbose and use HDSPM_tcoLockMadi for MADI cards, HDSPM_tcoLockAes for AES(32) and fix the code that makes use of both. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Create TCO readout functionAdrian Knoth1-60/+77
This patch separates the TCO bits from snd_hdspm_proc_read_madi(), so the new function can later be shared between MADI and AES32 cards. It's essentially only moving code around, no new functionality. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-07-05ALSA: hdspm - Fix S/PDIF Sync status and frequency on RME AIOAdrian Knoth1-2/+3
This is a left-over mistake from old code, the correct register offset is provided in kcontrol->private_value, not in the index. Cf. RayDAT case, where it has already been corrected. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>