From: Jaroslav Kysela Date: Fri, 28 Aug 1998 14:08:47 +0000 (+0000) Subject: Little changes for new PCM API. X-Git-Tag: v1.0.3~565 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=e5535421d91f2cc45a292058e88c5679b1ab8744;p=alsa-utils.git Little changes for new PCM API. --- diff --git a/Makefile b/Makefile index a08141c..bf1367b 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,10 @@ clean: rm -f core .depend *.o *.orig *~ rm -f `find . -name "out.txt"` -pack: clean - rm -f config.cache config.log config.status Makefile.conf +cvsclean: clean + rm -f config.cache config.log config.status Makefile.conf \ + include/config.h utils/alsa-utils.spec configure + +pack: cvsclean chown -R root.root ../alsa-utils tar cvz -C .. -f ../alsa-utils-$(SND_UTIL_VERSION).tar.gz alsa-utils diff --git a/aplay/Makefile b/aplay/Makefile index f797589..d10a107 100644 --- a/aplay/Makefile +++ b/aplay/Makefile @@ -21,7 +21,7 @@ $(TARGET): .depend $(OBJECTS) ln -sf $(TARGET) $(TARGET1) clean: - rm -f core .depend *.o *.orig *~ + rm -f core aplay .depend *.o *.orig *~ .depend: $(CPP) $(COPTS) $(INCLUDE) -M *.c > .depend diff --git a/aplay/aplay.c b/aplay/aplay.c index f50ef63..55835c4 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -113,21 +113,19 @@ static void check_new_format( snd_pcm_format_t *format ) fprintf( stderr, "%s: unsupported rate %iHz for playback (valid range is %iHz-%iHz)\n", command, format -> rate, pinfo.min_rate, pinfo.max_rate ); exit( 1 ); } - if ( format -> format != SND_PCM_SFMT_MU_LAW ) - if ( !(pinfo.formats & (1 << format -> format)) ) { - fprintf( stderr, "%s: requested format %s isn't supported with hardware\n", command, get_format( format -> format ) ); - exit( 1 ); - } + if ( !(pinfo.formats & (1 << format -> format)) ) { + fprintf( stderr, "%s: requested format %s isn't supported with hardware\n", command, get_format( format -> format ) ); + exit( 1 ); + } } else { if ( rinfo.min_rate > format -> rate || rinfo.max_rate < format -> rate ) { fprintf( stderr, "%s: unsupported rate %iHz for record (valid range is %iHz-%iHz)\n", command, format -> rate, rinfo.min_rate, rinfo.max_rate ); exit( 1 ); } - if ( format -> format != SND_PCM_SFMT_MU_LAW ) - if ( !(rinfo.formats & (1 << format -> format)) ) { - fprintf( stderr, "%s: requested format %s isn't supported with hardware\n", command, get_format( rformat.format ) ); - exit( 1 ); - } + if ( !(rinfo.formats & (1 << format -> format)) ) { + fprintf( stderr, "%s: requested format %s isn't supported with hardware\n", command, get_format( rformat.format ) ); + exit( 1 ); + } } } @@ -209,7 +207,8 @@ static void device_list( void ) printf( " Formats:\n" ); for ( idx = 0; idx < SND_PCM_SFMT_GSM; idx++ ) { if ( playinfo.formats & (1 << idx) ) - printf( " %s\n", get_format( idx ) ); + printf( " %s%s\n", get_format( idx ), + playinfo.hw_formats & (1 << idx) ? " [hardware]" : "" ); } if ( (err = snd_ctl_pcm_record_info( handle, dev, &recinfo )) < 0 ) { printf( "Error: control digital audio record info (%i): %s\n", card, snd_strerror( err ) ); @@ -223,7 +222,8 @@ static void device_list( void ) printf( " Formats:\n" ); for ( idx = 0; idx < SND_PCM_SFMT_GSM; idx++ ) { if ( recinfo.formats & (1 << idx) ) - printf( " %s\n", get_format( idx ) ); + printf( " %s%s\n", get_format( idx ), + recinfo.hw_formats & (1 << idx) ? " [hardware]" : "" ); } } } diff --git a/version b/version index bbdeab6..1750564 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.0.5 +0.0.6