Module Name: src Committed By: nat Date: Tue Jun 20 07:45:01 UTC 2017
Modified Files: src/sys/dev: audio.c audiovar.h Log Message: sc_iffreq -> sc_frequency. NFCI. Ok christos@. To generate a diff of this commit: cvs rdiff -u -r1.359 -r1.360 src/sys/dev/audio.c cvs rdiff -u -r1.55 -r1.56 src/sys/dev/audiovar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/audio.c diff -u src/sys/dev/audio.c:1.359 src/sys/dev/audio.c:1.360 --- src/sys/dev/audio.c:1.359 Tue Jun 20 07:42:31 2017 +++ src/sys/dev/audio.c Tue Jun 20 07:45:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.359 2017/06/20 07:42:31 nat Exp $ */ +/* $NetBSD: audio.c,v 1.360 2017/06/20 07:45:01 nat Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au> @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.359 2017/06/20 07:42:31 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.360 2017/06/20 07:45:01 nat Exp $"); #ifdef _KERNEL_OPT #include "audio.h" @@ -535,7 +535,7 @@ audioattach(device_t parent, device_t se vc->sc_lastinfovalid = false; vc->sc_swvol = 255; vc->sc_recswvol = 255; - sc->sc_iffreq = 44100; + sc->sc_frequency = 44100; sc->sc_precision = 16; sc->sc_channels = 2; @@ -4149,7 +4149,7 @@ audio_set_vchan_defaults(struct audio_so return EINVAL; vc = chan->vc; - sc->sc_vchan_params.sample_rate = sc->sc_iffreq; + sc->sc_vchan_params.sample_rate = sc->sc_frequency; #if BYTE_ORDER == LITTLE_ENDIAN sc->sc_vchan_params.encoding = AUDIO_ENCODING_SLINEAR_LE; #else @@ -4165,12 +4165,12 @@ audio_set_vchan_defaults(struct audio_so vc->sc_blkset = false; AUDIO_INITINFO(&ai); - ai.record.sample_rate = sc->sc_iffreq; + ai.record.sample_rate = sc->sc_frequency; ai.record.encoding = format->encoding; ai.record.channels = sc->sc_channels; ai.record.precision = sc->sc_precision; ai.record.pause = false; - ai.play.sample_rate = sc->sc_iffreq; + ai.play.sample_rate = sc->sc_frequency; ai.play.encoding = format->encoding; ai.play.channels = sc->sc_channels; ai.play.precision = sc->sc_precision; @@ -4180,7 +4180,7 @@ audio_set_vchan_defaults(struct audio_so sc->sc_format->channels = sc->sc_channels; sc->sc_format->precision = sc->sc_precision; sc->sc_format->validbits = sc->sc_precision; - sc->sc_format->frequency[0] = sc->sc_iffreq; + sc->sc_format->frequency[0] = sc->sc_frequency; auconv_delete_encodings(sc->sc_encodings); error = auconv_create_encodings(sc->sc_format, VAUDIO_NFORMATS, @@ -5941,7 +5941,7 @@ audio_sysctl_frequency(SYSCTLFN_ARGS) node = *rnode; sc = node.sysctl_data; - t = sc->sc_iffreq; + t = sc->sc_frequency; node.sysctl_data = &t; error = sysctl_lookup(SYSCTLFN_CALL(&node)); if (error || newp == NULL) @@ -5960,7 +5960,7 @@ audio_sysctl_frequency(SYSCTLFN_ARGS) return EINVAL; } - sc->sc_iffreq = t; + sc->sc_frequency = t; error = audio_set_vchan_defaults(sc, AUMODE_PLAY | AUMODE_PLAY_ALL | AUMODE_RECORD, &sc->sc_format[0]); if (error) @@ -6082,13 +6082,13 @@ vchan_autoconfig(struct audio_softc *sc) for (j = 0; j < __arraycount(auto_config_channels); j++) { sc->sc_channels = auto_config_channels[j]; for (k = 0; k < __arraycount(auto_config_freq); k++) { - sc->sc_iffreq = auto_config_freq[k]; + sc->sc_frequency = auto_config_freq[k]; error = audio_set_vchan_defaults(sc, AUMODE_PLAY | AUMODE_PLAY_ALL | AUMODE_RECORD, &sc->sc_format[0]); if (vc->sc_npfilters > 0 && (vc->sc_mpr.s.param. - sample_rate != sc->sc_iffreq || + sample_rate != sc->sc_frequency || vc->sc_mpr.s.param. channels != sc->sc_channels)) error = EINVAL; @@ -6099,7 +6099,7 @@ vchan_autoconfig(struct audio_softc *sc) "Format SLINEAR, precision %d, " "channels %d, frequency %d\n", sc->sc_precision, sc->sc_channels, - sc->sc_iffreq); + sc->sc_frequency); mutex_exit(sc->sc_lock); return 0; Index: src/sys/dev/audiovar.h diff -u src/sys/dev/audiovar.h:1.55 src/sys/dev/audiovar.h:1.56 --- src/sys/dev/audiovar.h:1.55 Sun May 7 08:19:39 2017 +++ src/sys/dev/audiovar.h Tue Jun 20 07:45:01 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audiovar.h,v 1.55 2017/05/07 08:19:39 nat Exp $ */ +/* $NetBSD: audiovar.h,v 1.56 2017/06/20 07:45:01 nat Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -291,7 +291,7 @@ struct audio_softc { struct sysctllog *sc_log; /* sysctl log */ int sc_channels; int sc_precision; - int sc_iffreq; + int sc_frequency; struct audio_info sc_ai; /* Recent info for dev sound */ bool sc_aivalid; #define VAUDIO_NFORMATS 1