summaryrefslogtreecommitdiff
path: root/sound/pci/rme9652
AgeCommit message (Collapse)Author
2011-11-06Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-10-31sound: fix drivers needing module.h not moduleparam.hPaul Gortmaker
The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31ALSA: hdspm - Enable all firmware ranges for PCI MADI/AES cardsAdrian Knoth
From the Windows INF file, we know the firmware ranges for all RME cards. For PCIe, a single revision ID per device (RayDAT, MADI, AIO, AES) is used. Contrary, the older PCI versions use ranges, that is, one revision ID per firmware version. Instead of listing all possible revisions individually, match the range. This commit enables all MADI and AES PCI versions ever shipped. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31ALSA: hdsp - Correct HDSP_VERSION_BIT constant, thus partly fixing RPM detectionAdrian Knoth
HDSP_VERSION_BIT has to be ORed with HDSP_S_LOAD. This fixes the detection of at least some RME RPM boxes. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-10-31ALSA: hdspm - Fix MADI channel format in the status ioctlAdrian Knoth
SNDRV_HDSPM_IOCTL_GET_STATUS is supposed to query the current card status, so we have to return what we receive on the MADI wire (RX), not what we transmit (TX) to others. The latter is a config item to be queried via SNDRV_HDSPM_IOCTL_GET_CONFIG. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-23ALSA: hdspm - cleanup __user tags in ioctl()Dan Carpenter
This makes the code cleaner and silences a Sparse complaint: sound/pci/rme9652/hdspm.c:6341:23: warning: incorrect type in assignment (incompatible argument 4 (different address spaces)) sound/pci/rme9652/hdspm.c:6341:23: expected int ( *ioctl )( ... ) sound/pci/rme9652/hdspm.c:6341:23: got int ( static [toplevel] *<noident> )( ... ) sound/pci/rme9652/hdspm.c:6102:44: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6225:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6264:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6283:50: warning: dereference of noderef expression sound/pci/rme9652/hdspm.c:6289:59: warning: dereference of noderef expression Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-23ALSA: hdspm - potential info leak in snd_hdspm_hwdep_ioctl()Dan Carpenter
Smatch has a new check for Rosenberg type information leaks where structs are copied to the user with uninitialized stack data in them. The status struct has a hole in it, and on some paths not all the members were initialized. struct hdspm_status { unsigned char card_type; /* 0 1 */ /* XXX 3 bytes hole, try to pack */ enum hdspm_syncsource autosync_source; /* 4 4 */ long long unsigned int card_clock; /* 8 8 */ The hdspm_version struct had holes in it as well. struct hdspm_version { unsigned char card_type; /* 0 1 */ char cardname[20]; /* 1 20 */ /* XXX 3 bytes hole, try to pack */ unsigned int serial; /* 24 4 */ short unsigned int firmware_rev; /* 28 2 */ /* XXX 2 bytes hole, try to pack */ int addons; /* 32 4 */ Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Simplify with snd_pcm_hw_constraint_pow2()Takashi Iwai
Refactoring the code using snd_pcm_hw_constraint_pow2() helper function. Tested-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Add missing KNOT flag for AES32 rate restrictionTakashi Iwai
AES32 supports the non-standard 128kHZ, and this is enabled only when SNDRV_PCM_RATE_KNOT is set in hw.rates field. Tested-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Correct max buffer size limitTakashi Iwai
Some modesl can support up to 8192 frames per period. Tested-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Enable 32 samples/period on RME RayDAT/AIOAdrian Knoth
Newer RME cards like RayDAT and AIO support 32 samples per period. This value is encoded as {1,1,1} in the HDSP_LatencyMask bits in the control register. Since {1,1,1} is also the representation for 8192 samples/period on older RME cards, we have to special case 32 samples and 32768 bytes according to the actual card. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Introduce hdspm_get_latency() to harmonize latency calculationAdrian Knoth
Currently, hdspm_decode_latency is called several times, violating the DRY principle. Given that we need to distinguish between old and new cards when decoding the latency bits in the control register, introduce hdspm_get_latency() to provide the required functionality. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Reorder period sizes according to their bit representationAdrian Knoth
On newer RME cards like RayDAT and AIO, the 8192 samples per period size are no longer supported. Instead, setting all three bits of HDSP_LatencyMask to one ({1,1,1}) now corresponds to 32 samples per period. To make this more obvious to future developers, let's reorder the array according to their bit representation, starting at 64 ({0,0,0}) up to 4096 ({1,1,0}) and finally 32 ({1,1,1}). Note that this patch doesn't change semantics. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Set period_bytes_min to 32 * 4 for new RME cardsAdrian Knoth
On newer RME cards like RayDAT and AIO, the lower bound is 32 samples per period in contrast to 64 samples as seen on older cards. We hence lower period_bytes_min to 32 * 4. Four bytes per sample. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-15ALSA: hdspm - Allow for 8192 period size on RME MADI and AES cardsAdrian Knoth
Older RME cards like MADI and AES support period sizes of 8192 samples. The original hdspm driver already featured this value, apparently, it was lost during the rewrite. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-08-05ALSA: hdspm - Fix uninitialized compile warningsTakashi Iwai
Put the exception checks for io_type switch() for possible mistakes in future. Also this shuts up annoying compile warnings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-29ALSA: hdspm - Add firmware revision 0xcc for RME MADIAdrian Knoth
Apparently, there are multiple old firmware revisions in the wild for the PCI RME MADI cards. Just add them to the list of supported devices and treat them like their modern counterparts. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-29ALSA: hdspm - Fix reported external sample rate on RME MADI and MADIfaceAdrian Knoth
In slave mode, the card can only detect the base frequency (32..48kHz) on the MADI link (exception: 96k frames), so the real external sample rate is this base frequency multiplied by 1, 2 or 4 depending on the speed mode. This patch enables 64..192kHz sample rates in clock slave mode, which failed before due to an alleged sample rate mismatch between the MADI link (e.g., 48kHz) and the application in DS/QS mode (e.g., 96kHz, 192kHz). Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-29ALSA: hdspm - Provide MADI speed mode selector on RME MADI and MADIfaceAdrian Knoth
When running in slave mode (no clock master), there is no way to determine the real wirespeed on the MADI link (single/double/quad speed). Like physical gear, simply provide the user with a tristate switch to select the appropriate format. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22Merge branch 'topic/misc' into for-linusTakashi Iwai
2011-06-30ALSA: hdspm - Fix compile warnings with PPCTakashi Iwai
The char can be unsigned on some architectures. Since the code checks the negative values, they should be declared as signed char explicitly. sound/pci/rme9652/hdspm.c:5449: warning: comparison is always false due to limited range of data type sound/pci/rme9652/hdspm.c:5462: warning: comparison is always false due to limited range of data type Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-14Merge branch 'test/pci-rename' into topic/miscTakashi Iwai
2011-06-12ALSA: hdspm - Add firmware revision ID for RME MADI PCI versionAdrian Knoth
The PCI version of the RME HDSP MADI card uses 0xcf as revision ID. Just add this to the list of supported cards. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-12ALSA: hdspm - Fix jumping external wordclock frequency in AutoSync modeAdrian Knoth
When using Word Clock on RME MADI cards, AutoSync mode was alternating betweeen MADI and WC due to a typo: AutoSync is indicated in the second status register (status2), not the first one (status). While the proc output was always correct, the reported WC frequency to ALSA was unstable as mentioned in http://mailman.alsa-project.org/pipermail/alsa-devel/2008-March/006723.html Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-12ALSA: hdspm - Fix locking in snd_hdspm_midi_input_readAdrian Knoth
For the MIDI part, we need to acquire (and release) the hmidi->lock, access to the global hdspm structure is serialized through hmidi->hdspm->lock instead. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/*Takashi Iwai
The name argument of request_irq() appears in /proc/interrupts, and it's quite ugly when the name entry contains a space or special letters. In general, it's simpler and more readable when the module name appears there, so let's replace all entries with KBUILD_MODNAME. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-10ALSA: Use KBUILD_MODNAME for pci_driver.name entriesTakashi Iwai
The convention for pci_driver.name entry in kernel drivers seem to be the module name or equivalent ones. But, so far, almost all PCI sound drivers use more verbose name like "ABC Xyz (12)", and these are fairly confusing when appearing as a file name. This patch converts the all pci_driver.name entries in sound/pci/* to use KBUILD_MODNAME for more unified appearance. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-08ALSA: hdspm - Add firmware ID for older AES32 cards.Adrian Knoth
The current AES32 firmware revision ID is 234, however, a user confirmed that everything works fine with the previous revision, too. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28ALSA: hdspm - Fix midi port initializationAdrian Knoth
Depending on the model and the presence of a TCO module, the number of midi ports varies. Some have 1 port (MADIface), some have 2 (default), with TCO, there are 3. Don't hardcode the number of midi ports to initialize. This patch also fixes a boot lockup on MADIface. [Coding-style fixes by tiwai] Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28ALSA: hdspm - Abort on unknown firmware revisionAdrian Knoth
Don't continue if we cannot detect the real card type, otherwise, all subsequent functions, especially strcpy(), would fail, leaving the whole driver in an unusable state. Without such a protection, dmesg would look like this: Pid: 1525, comm: modprobe Not tainted 2.6.38-rc6 #1 MSI MS-7250/MS-7250 EIP: 0060:[<c114e700>] EFLAGS: 00010296 CPU: 1 EIP is at strcpy+0x10/0x30 EAX: f4d33e58 EBX: f5990800 ECX: f4d33e58 EDX: 00000000 ESI: 00000000 EDI: f4d33e58 EBP: f5990930 ESP: f3dd3e0c DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 f53d4204 00000000 f90bfc03 00000001 00000001 f3dd3e64 c10fedff f3dd3e7c f3d854e4 f53d4000 c10307b8 00000001 c10307b8 f5990860 c10307b8 00000001 c10332e5 f59908bc c12f4339 f59908bc f5990860 c11ef207 f4d33e00 f53d4000 [<f90bfc03>] ? snd_hdspm_probe+0x7e7/0x1166 [snd_hdspm] [<c10fedff>] ? __sysfs_add_one+0x1f/0xf0 [<c10307b8>] ? get_parent_ip+0x8/0x20 [<c10307b8>] ? get_parent_ip+0x8/0x20 [<c10307b8>] ? get_parent_ip+0x8/0x20 [<c10332e5>] ? add_preempt_count+0xa5/0xd0 [<c12f4339>] ? _raw_spin_lock_irqsave+0x19/0x40 [<c11ef207>] ? pm_runtime_enable+0x17/0x80 [<c1160172>] ? local_pci_probe+0x42/0xb0 [<c1161091>] ? pci_device_probe+0x61/0x80 [<c11e9587>] ? driver_probe_device+0x77/0x180 [<c11600f0>] ? pci_match_device+0xa0/0xc0 [<c11e9709>] ? __driver_attach+0x79/0x80 [<c11e9690>] ? __driver_attach+0x0/0x80 [<c11e8e32>] ? bus_for_each_dev+0x52/0x80 [<c11e9416>] ? driver_attach+0x16/0x20 [<c11e9690>] ? __driver_attach+0x0/0x80 [<c11e8771>] ? bus_add_driver+0xa1/0x220 [<c1160f20>] ? pci_device_remove+0x0/0xf0 [<c11e99a3>] ? driver_register+0x63/0x120 [<c11612bd>] ? __pci_register_driver+0x3d/0xb0 [<c1001132>] ? do_one_initcall+0x32/0x160 [<f90d6000>] ? alsa_card_hdspm_init+0x0/0x14 [snd_hdspm] [<c10676a9>] ? sys_init_module+0x99/0x1e0 [<c10ade3d>] ? sys_close+0x6d/0xc0 [<c1002c90>] ? sysenter_do_call+0x12/0x26 ---[ end trace 239f0661c558378b ]--- Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28ALSA: hdspm - Add updated firmware revision for AES32Adrian Knoth
In contrast to the PCIe version (RME AES), the PCI version (RME AES32) has a different firmware revision. This patch adds the missing PCI revision. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28ALSA: hdspm - AES32: Use define instead of hardcoded channel countAdrian Knoth
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hdspm - Fix lock/sync reporting on MADI and AES32Adrian Knoth
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hdspm - prevent reading unitialized stack memoryAdrian Knoth
Original patch by Dan Rosenberg <drosenberg@vsecurity.com> under commit e68d3b316ab7b02a074edc4f770e6a746390cb7d. I'm copying his text here: The SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO ioctl in hdspm.c allow unprivileged users to read uninitialized kernel stack memory, because several fields of the hdspm_config struct declared on the stack are not altered or zeroed before being copied back to the user. This patch takes care of it. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hdspm - fix sync check on AES32Adrian Knoth
Fredrik Lingvall <fredrik.lingvall@gmail.com> has discovered wrong frequency and sync detection on AES32. According to him, the provided patch fixes these issues. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hdspm - Remove input selector on MADIfaceAdrian Knoth
In contrast to the RME MADI card, coax/optical selection on the MADIface is done via a physical switch located at the breakout box. Obviously, the driver cannot switch ports in software. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hdspm - Fix DS/QS output channel mappings on RME MADI/MADIfaceAdrian Knoth
Caused by two typos, no output channel mappings were assigned for MADI/MADIface at double/quad speed. The channel mapping is indeed identical to the single speed mapping, the cards will simply use the first N channels. Signed-off-by: Florian Faber <faber@faberman.de> Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com> Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hdspm - Restrict channel count on RME AES/AES32Adrian Knoth
Without calling an appropriate rule, AES/AES32 cards would announce a theoretical channel count of 64 (HDSPM_MAX_CHANNELS), leading to the already known bug: [37422.640481] ------------[ cut here ]------------ [37422.640487] WARNING: at sound/pci/rme9652/hdspm.c:5449 snd_hdspm_ioctl+0x18f/0x202 [snd_hdspm]() [37422.640489] Hardware name: PRIMERGY RX100 S6 [37422.640490] BUG? (info->channel >= hdspm->max_channels_in) [37422.640492] Modules linked in: snd_hdspm snd_seq_midi ipmi_watchdog ipmi_poweroff ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 e1000e snd_rawmidi power_meter [last unloaded: snd_hdspm] [37422.640501] Pid: 22231, comm: jackd Tainted: G D W 2.6.36-gentoo-r5 #5 [37422.640502] Call Trace: [37422.640508] [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98 [37422.640511] [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43 [37422.640514] [<ffffffff81034306>] ? get_parent_ip+0x11/0x42 [37422.640518] [<ffffffffa0055763>] snd_hdspm_ioctl+0x18f/0x202 [snd_hdspm] [37422.640522] [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c [37422.640525] [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01 [37422.640527] [<ffffffff81034306>] ? get_parent_ip+0x11/0x42 [37422.640531] [<ffffffff8105be6c>] ? __srcu_read_unlock+0x3b/0x59 [37422.640533] [<ffffffff81400bce>] snd_pcm_capture_ioctl1+0x20a/0x227 [37422.640537] [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e [37422.640540] [<ffffffff81400c15>] snd_pcm_capture_ioctl+0x2a/0x2e [37422.640543] [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453 [37422.640546] [<ffffffff810f2d09>] sys_ioctl+0x51/0x74 [37422.640549] [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b [37422.640552] ---[ end trace 0cd919cd68118082 ]--- We already have all the right values in place, we simply have to inform the upper layers about this restriction. Note that snd_hdspm_hw_rule_rate_out_channels and snd_hdspm_hw_rule_rate_in_channels must not be called on AES32, because the channel count is always 16, no matter of the samplerate in use. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hdspm - Fix buffer handling on RME MADI/MADIface/AES(32)Adrian Knoth
Only RayDAT and AIO provide sane buffer pointers that can be used with HDSPM_BufferPositionMask, on all other cards, this would result in a wrong HW pointer leading to xruns and these messages: [260808.916788] BUG: pcmC0D0p:0, pos = 2976, buffer size = 1024, period size = 512 [260808.961124] BUG: pcmC0D0c:0, pos = 4944, buffer size = 1024, period size = 512 Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23ALSA: hpdsm - RME AES(32): Fix missing channel mappingsAdrian Knoth
On RME AES and AES(32), none of the required information (max_channels_in, max_channels_out, channel mappings, port names) was set, leading to the BUG below. This patch adds the missing bits, thus fixing the bug. 125.058768] ------------[ cut here ]------------ [ 125.058773] WARNING: at sound/pci/rme9652/hdspm.c:5389 snd_hdspm_ioctl+0x10c/0x1d8 [snd_hdspm]() [ 125.058775] Hardware name: PRIMERGY RX100 S6 [ 125.058777] BUG? (info->channel >= hdspm->max_channels_out) [ 125.058778] Modules linked in: ipmi_watchdog ipmi_poweroff ipmi_si ipmi_devintf ipmi_msghandler snd_hdspm power_meter e1000e snd_rawmidi i2c_i801 [ 125.058787] Pid: 3652, comm: audacity Tainted: G W 2.6.36-gentoo-r5 #5 [ 125.058788] Call Trace: [ 125.058792] [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98 [ 125.058796] [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43 [ 125.058800] [<ffffffffa006761a>] snd_hdspm_ioctl+0x10c/0x1d8 [snd_hdspm] [ 125.058803] [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c [ 125.058806] [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01 [ 125.058809] [<ffffffff810c604c>] ? __do_fault+0x361/0x3a6 [ 125.058812] [<ffffffff81400e23>] snd_pcm_playback_ioctl1+0x20a/0x227 [ 125.058815] [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e [ 125.058818] [<ffffffff81400e6a>] snd_pcm_playback_ioctl+0x2a/0x2e [ 125.058821] [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453 [ 125.058824] [<ffffffff810f2d09>] sys_ioctl+0x51/0x74 [ 125.058827] [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b [ 125.058830] ---[ end trace 5bddb08e5d4cbeb1 ]--- Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Florian Faber <faber@faberman.de> Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27ALSA: hdspm - remove unused arrays, reduce stack usage in hwdep_ioctlJaroslav Kysela
Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27ALSA: [hdspm] Move static mapping arrays to .cAdrian Knoth
As requested by Takashi and Jaroslav, these arrays should not be in the header file. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-27ALSA: hdspm - Add support for RME RayDAT and AIOAdrian Knoth
Incorporate changes by Florian Faber into hdspm.c. Code taken from http://wiki.linuxproaudio.org/index.php/Driver:hdspe Heavily reworked to mostly comply with the coding standard (whitespace fixes, line width, C++ style comments) The code was tested and confirmed to be working on RME RayDAT. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-01-13Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits) ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO ALSA: oxygen: fix Xonar DG input ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low ALSA: hda - Fix missing EAPD for Acer 4930G ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs. ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser ALSA: hda - Don't refer ELD when unplugged ASoC: tpa6130a2: Fix compiler warning ASoC: tlv320dac33: Add DAPM selection for LOM invert ASoC: DMIC codec: Adding a generic DMIC codec ALSA: snd-usb-us122l: Fix missing NULL checks ALSA: snd-usb-us122l: Fix MIDI output ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync() ASoC: Fix section mismatch in wm8995.c ALSA: oxygen: add S/PDIF source selection for Claro cards ALSA: oxygen: fix CD/MIDI for X-Meridian (2G) ASoC: fix migor audio build ALSA: include delay.h for msleep in Xonar DG support ...
2010-12-01ALSA: hdsp - Add support for RPM io boxFlorian Faber
Add support for the RME HDSP RPM IO box. Changes have been made in the identification of the IO box and the neccessary controls have been added. Signed-off-by: Florian Faber <faberman@linuxproaudio.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-11-01tree-wide: fix comment/printk typosUwe Kleine-König
"gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-10-11Merge branch 'fix/misc' into topic/miscTakashi Iwai
2010-09-25ALSA: sound/pci/rme9652: prevent reading uninitialized stack memoryDan Rosenberg
The SNDRV_HDSP_IOCTL_GET_CONFIG_INFO and SNDRV_HDSP_IOCTL_GET_CONFIG_INFO ioctls in hdspm.c and hdsp.c allow unprivileged users to read uninitialized kernel stack memory, because several fields of the hdsp{m}_config_info structs declared on the stack are not altered or zeroed before being copied back to the user. This patch takes care of it. Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07sound: Remove unnecessary casts of private_dataJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>