alsa-capabilities: proper handling of square brackets inside card and interface names
Created by: ronalde
For example Audigy2 [Audigy 2 Value [SB0400]] becomes device name SB0400] while it should be Audigy 2 Value [SB0400].
Examples found:
. EMU1010 [E-mu 1010 [MAEM8810]] (and variations)
. Live [SBLive! Platinum [CT4760P]] (and variations)
. Audigy2 [Audigy 2 Value [SB0400]] (and variations)
Sample aplay output file:
**** List of PLAYBACK Hardware Devices ****
card 0: ICH5 [Intel ICH5], device 0: Intel ICH [Intel ICH5]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: ICH5 [Intel ICH5], device 4: Intel ICH - IEC958 [Intel ICH5 - IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Audigy2 [Audigy 2 Value [SB0400]], device 0: emu10k1 [ADC Capture/Standard PCM Playback]
Subdevices: 32/32