aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/pci/rme9652 (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-01-12ALSA: pci: Constify snd_rawmidi_opsTakashi Iwai2-4/+4
Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-02ALSA: constify snd_pcm_ops structuresJulia Lawall3-5/+5
Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-22ALSA: hdspm: fix spelling mistake "Externel" -> "External"Colin Ian King1-1/+1
Trivial fix to spelling mistake in dev_warn message. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-29ALSA: hdsp: Fix wrong boolean ctl value accessesTakashi Iwai1-2/+2
snd-hdsp driver accesses enum item values (int) instead of boolean values (long) wrongly for some ctl elements. This patch fixes them. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-29ALSA: hdspm: Fix zero-divisionTakashi Iwai1-0/+8
HDSPM driver contains a code issuing zero-division potentially in system sample rate ctl code. This patch fixes it by not processing a zero or invalid rate value as a divisor, as well as excluding the invalid value to be passed via the given ctl element. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-02-29ALSA: hdspm: Fix wrong boolean ctl value accessesTakashi Iwai1-4/+4
snd-hdspm driver accesses enum item values (int) instead of boolean values (long) wrongly for some ctl elements. This patch fixes them. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-23Merge branch 'topic/hw-constraint-single' into for-nextTakashi Iwai1-5/+4
2015-10-21ALSA: rme9652: Use snd_pcm_hw_constraint_single()Lars-Peter Clausen1-5/+4
Use the new snd_pcm_hw_constraint_single() helper function instead of calling snd_pcm_hw_constraint_minmax() with the same value for min and max to install a constraint that limits the possible configuration values to a single value. Using snd_pcm_hw_constraint_single() makes the indented result clearer. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-09-11ALSA: hdsp: fix memory leakSudip Mukherjee1-0/+1
If the size of the firmware is less than expected size then we are exiting with the error code but we missed releasing the firmware. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-22ALSA: hdsp: silence a sprinft() overflow warningDan Carpenter1-2/+2
card->shortname is a 32 char string so the sprintf() can theoretically overflow. snd_rawmidi_new() can accept strings up to 64 bytes long. I have made the temporay buf[] array 40 bytes long and changed the sprintf() to snprintf(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
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>