[alsa-devel] [PATCH] plug: Move fast_ops copy after slave configuration.

Reilly Grant reillyeon at qotw.net
Mon Dec 12 18:00:09 CET 2011


Some applications do it anyways. I assume because not all drivers
include plug in their default device. Whether or not they are wrong the
library shouldn't crash because of it, especially since they could be
passing this configuration through from user input.

~ Reilly

On 12/11/2011 04:18 PM, Raymond Yau wrote:
> 2011/12/12 Reilly Grant <reillyeon at qotw.net>:
> 
>>
>> This fixes a crash when two instances of plug are instantiated back to
>> back and the format conversion plugin inserted by the second is skipped
>> by the first because the fast_ops pointer is not properly updated. This
>> is the case for applications requesting plug:default on Intel HDA chips.
> 
> The card 's "default" device of snd-hda-intel should be "plug:dmix"
> 
> you don't need to use "plug:default"
> 
> http://git.alsa-project.org/?p=alsa-lib.git;a=blob_plain;f=src/conf/cards/HDA-Intel.conf
> 
> 
> # default with dmix+softvol & dsnoop
> HDA-Intel.pcm.default {
> 	@args [ CARD ]
> 	@args.CARD {
> 		type string
> 	}
> 	type asym
> 	playback.pcm {
> 		type plug
> 		slave.pcm {
> 			type softvol
> 			slave.pcm {
> 				@func concat
> 				strings [ "dmix:" $CARD ]
> 			}
> 			control {
> 				name "PCM Playback Volume"
> 				card $CARD
> 			}
> 		}
> 	}
> 	capture.pcm {
> 		type plug
> 		slave.pcm {
> 			type softvol
> 			slave.pcm {
> 				@func concat
> 				strings [ "dsnoop:" $CARD ]
> 			}
> 			control {
> 				name "Digital Capture Volume"
> 				card $CARD
> 			}
> 			min_dB -30.0
> 			max_dB 30.0
> 			resolution 121
> 		}
> 		# to avoid possible phase inversions with digital mics
> 		route_policy copy
> 	}
> 	hint.device 0
> }
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20111212/b0464d94/attachment.sig 


More information about the Alsa-devel mailing list