From e07574e1290ffc63432bc2b06a7677abc365de2d Mon Sep 17 00:00:00 2001 From: Markus Rechberger Date: Mon, 13 Mar 2006 05:41:17 +0100 Subject: small usbaudio_setup.sh change to support dsp0 From: Markus Rechberger small usbaudio_setup.sh change to support dsp0 Signed-off-by: Markus Rechberger --- v4l/scripts/usbaudio_setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'v4l') diff --git a/v4l/scripts/usbaudio_setup.sh b/v4l/scripts/usbaudio_setup.sh index 33b15e56b..66fdd23df 100755 --- a/v4l/scripts/usbaudio_setup.sh +++ b/v4l/scripts/usbaudio_setup.sh @@ -49,7 +49,7 @@ int main(int argc, char **argv){ if(fd>=0){ info=malloc(sizeof(struct mixer_info)); ioctl(fd,SOUND_MIXER_INFO,info); - printf("%c \"%s %s\"\n",(argv[1][strlen(argv[1])-1]=='p')?'0':argv[1][strlen(argv[1])-1],info->name,info->id); + printf("%c \"%s %s\"\n",(argv[1][strlen(argv[1])-1]=='p')?'0':(argv[1][strlen(argv[1])-1]+1),info->name,info->id); free(info); close(fd); } else { @@ -86,20 +86,20 @@ Press any key to continue... " 13 60 ls /dev/dsp* | while read a; do ./ossid $a; done | xargs dialog --menu "Choose your TV Audio source:" 12 60 5 2>/tmp/em2880_source.$$ ls /dev/dsp* | while read a; do ./ossid $a; done | xargs dialog --menu "Choose your output soundcard device:" 12 60 5 2>/tmp/em2880_dst.$$ -source=`egrep '^[0-9]' /tmp/em2880_source.$$` -dst=`egrep '^[0-9]' /tmp/em2880_dst.$$` +source=`egrep '^[0-9p]' /tmp/em2880_source.$$` +dst=`egrep '^[0-9p]' /tmp/em2880_dst.$$` echo "playing $source to $dst"; if [ "$source" = "0" ]; then device="/dev/dsp" else - device="/dev/dsp$source" + device="/dev/dsp`expr $source - 1`" fi if [ "$dst" = "0" ]; then device2="/dev/dsp" else - device2="/dev/dsp$source" + device2="/dev/dsp`expr $source - 1`" fi clear echo "Using command: sox -r 48000 -w -c 2 -t ossdsp $device -t ossdsp $device2" -- cgit v1.2.3