From: Adrian Knoth Date: Wed, 23 Feb 2011 10:43:10 +0000 (+0100) Subject: ALSA: hdspm - Restrict channel count on RME AES/AES32 X-Git-Tag: v2.6.39-rc1~424^2^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88fabbfcc6d347555f9be04e3fe89e7a9c9a2a2d;p=pandora-kernel.git 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] [] warn_slowpath_common+0x80/0x98 [37422.640511] [] warn_slowpath_fmt+0x41/0x43 [37422.640514] [] ? get_parent_ip+0x11/0x42 [37422.640518] [] snd_hdspm_ioctl+0x18f/0x202 [snd_hdspm] [37422.640522] [] snd_pcm_channel_info+0x73/0x7c [37422.640525] [] snd_pcm_common_ioctl1+0x326/0xb01 [37422.640527] [] ? get_parent_ip+0x11/0x42 [37422.640531] [] ? __srcu_read_unlock+0x3b/0x59 [37422.640533] [] snd_pcm_capture_ioctl1+0x20a/0x227 [37422.640537] [] ? file_has_perm+0x90/0x9e [37422.640540] [] snd_pcm_capture_ioctl+0x2a/0x2e [37422.640543] [] do_vfs_ioctl+0x404/0x453 [37422.640546] [] sys_ioctl+0x51/0x74 [37422.640549] [] 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 Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed