linux/sound
Adrian Knoth 88fabbfcc6 ALSA: hdspm - Restrict channel count on RME AES/AES32
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-23 15:43:05 +01:00
..
aoa Merge branch 'topic/workq-update' into topic/misc 2010-12-13 09:29:52 +01:00
arm Merge remote branch 'alsa/devel' into topic/misc 2010-04-16 15:20:06 +02:00
atmel ALSA: atmel - Fix the return value in error path 2010-11-22 10:57:17 +01:00
core ALSA: core: sparse cleanups 2011-02-14 17:10:11 +01:00
drivers ALSA: ml403-ac97cr: Use vsprintf extension %pR for struct resource 2010-12-14 10:45:15 +01:00
i2c sound: don't use flush_scheduled_work() 2010-12-13 09:22:44 +01:00
isa tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
mips sound: Add missing spin_unlock 2010-05-27 09:47:02 +02:00
oss sound: Prevent buffer overflow in OSS load_mixer_volumes 2010-12-30 13:20:55 +01:00
parisc
pci ALSA: hdspm - Restrict channel count on RME AES/AES32 2011-02-23 15:43:05 +01:00
pcmcia pcmcia: move driver name to struct pcmcia_driver 2010-09-29 17:20:24 +02:00
ppc Fix spelling milisec -> ms in snd_ps3 module parameter description 2011-01-03 13:54:21 +01:00
sh sound: sh: ctrl_in/outX to __raw_read/writeX conversion. 2010-10-27 15:53:50 +09:00
soc Merge branch 'fix/asoc' into for-linus 2011-01-21 08:10:14 +01:00
sparc of/device: Replace struct of_device with struct platform_device 2010-08-06 09:25:50 -06:00
spi ALSA: AT73C213: Rectify misleading comment. 2010-11-11 02:03:29 +01:00
synth ALSA: emux: Add trivial compat ioctl handler 2010-09-14 16:18:11 +02:00
usb ALSA: usb-audio: reconstruct some dispatcher functions to use switch-case 2011-02-14 17:11:12 +01:00
ac97_bus.c sound: Fixed line limit issue in sound/ac97_bus.c 2010-12-06 16:09:49 +01:00
Kconfig
last.c
Makefile
sound_core.c BKL: remove extraneous #include <smp_lock.h> 2010-11-17 08:59:32 -08:00
sound_firmware.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00