Home | History | Annotate | only in /src/usr.bin/audiocfg
History log of /src/usr.bin/audiocfg
RevisionDateAuthorComments
 1.4 11-Aug-2013  dholland Pass WARNS=5.
 1.3 01-Sep-2010  jmcneill branches: 1.3.6; 1.3.12;
add support for testing audio devices. the usage of audiocfg changes:

audiocfg list
audiocfg default [index]
audiocfg test [index]

'list' shows the available audio devices, 'default' sets the default
audio device, and 'test' will play a tone for 2 seconds on each
channel. example:

$ ./audiocfg list
0: [*] audio0: ICH2 AC97 (2 playback channels)
1: [ ] audio1: Pseudo Audio (2 playback channels)
$ ./audiocfg test 0
testing channel 0...
testing channel 1...
$
 1.2 31-Aug-2010  wiz Add man page.
 1.1 30-Aug-2010  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 30-Aug-2010  mrg add a simple app to maintain the symlinks for audio devices in /dev, so
that it's easy to change the "default" audio device. eg:

# audiocfg
0: [*] audio0: HD Audio
1: [ ] audio1: HD Audio
2: [ ] audio2: Pseudo Audio
# audiocfg 1
setting default audio device to audio1
# audiocfg
0: [ ] audio0: HD Audio
1: [*] audio1: HD Audio
2: [ ] audio2: Pseudo Audio

written by jared. thanks!

(there's a separate patch in the works to give "HD Audio" a better name.)


this is not enabled yet, but will be soon.

it also needs a manual page. any takers?
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8 07-Apr-2021  nia audiocfg(1): add examples
 1.7 19-Oct-2020  dholland Add missing HISTORY and AUTHORS. Bump date.

Noticed by qjsgkem on freenode.
 1.6 24-Aug-2019  isaki Fix markup. index of list command is optional.
 1.5 09-May-2019  wiz branches: 1.5.2;
Improve wording, bump date.
 1.4 08-May-2019  isaki Update respond to isaki-audio2 branch.
- Extend list command to display supported hardware formats.
- Add set command to set hardware format.
- Use correct /dev/audioctl instead of /dev/audio.
 1.3 01-Sep-2010  wiz branches: 1.3.46;
Update for Jared's changes from a few minutes ago.
 1.2 01-Sep-2010  wiz Mention that audiocfg also controls /dev/audioctl, /dev/mixer, and /dev/sound.
Noted by mrg.
Bump date.
 1.1 31-Aug-2010  wiz Add man page.
 1.3.46.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3.46.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.1 28-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #261):

usr.bin/audiocfg/audiocfg.1: revision 1.6

Fix markup. index of list command is optional.
 1.15 24-Aug-2019  isaki Revert about index number changes. It breaks its usage and output format.
Pointed out by mrg@.
 1.14 24-Aug-2019  isaki Create a waveform in hardware native sample rate which is more efficient.
 1.13 24-Aug-2019  isaki AUDIO_GETBUFINFO is more efficient for this purpose.
 1.12 24-Aug-2019  isaki Use err(3)/warn(3) instead of perror(3)/fprintf(stderr,...).
Use getprogname(3) for usage().
 1.11 24-Aug-2019  isaki Check mode argument earlier.
 1.10 24-Aug-2019  isaki Use device unit number for index.
The index number was too confusing such as
0: [ ] audio1 @ wss0
1: [*] audio0 @ yds0
in my PC for example. Here is new format:
[*] audio0 @ yds0
[ ] audio1 @ wss0
In this style, devices are always listed in order of unit number
and 0 always means audio0, 1 always means audio1.
 1.9 24-Aug-2019  isaki Revert to use single descriptor for "audiocfg test" as before.
 1.8 24-Aug-2019  isaki Rename some members in adev for clarity. No functional changes intended.
 1.7 08-May-2019  isaki branches: 1.7.2;
Update respond to isaki-audio2 branch.
- Extend list command to display supported hardware formats.
- Add set command to set hardware format.
- Use correct /dev/audioctl instead of /dev/audio.
 1.6 05-Mar-2016  mrg branches: 1.6.16;
if opening the audio device fails, try opening again with write-only.
this allows my playback-only usb device to be listed and tested.
 1.5 11-Aug-2013  dholland branches: 1.5.4;
Pass WARNS=5.
 1.4 03-Sep-2010  jmcneill branches: 1.4.6; 1.4.12;
return an error if testing fails, and dump the device info before running tests
 1.3 02-Sep-2010  jmcneill at the request of mrg, print the parent of audioN's device name
 1.2 01-Sep-2010  jmcneill add support for testing audio devices. the usage of audiocfg changes:

audiocfg list
audiocfg default [index]
audiocfg test [index]

'list' shows the available audio devices, 'default' sets the default
audio device, and 'test' will play a tone for 2 seconds on each
channel. example:

$ ./audiocfg list
0: [*] audio0: ICH2 AC97 (2 playback channels)
1: [ ] audio1: Pseudo Audio (2 playback channels)
$ ./audiocfg test 0
testing channel 0...
testing channel 1...
$
 1.1 30-Aug-2010  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 30-Aug-2010  mrg add a simple app to maintain the symlinks for audio devices in /dev, so
that it's easy to change the "default" audio device. eg:

# audiocfg
0: [*] audio0: HD Audio
1: [ ] audio1: HD Audio
2: [ ] audio2: Pseudo Audio
# audiocfg 1
setting default audio device to audio1
# audiocfg
0: [ ] audio0: HD Audio
1: [*] audio1: HD Audio
2: [ ] audio2: Pseudo Audio

written by jared. thanks!

(there's a separate patch in the works to give "HD Audio" a better name.)


this is not enabled yet, but will be soon.

it also needs a manual page. any takers?
 1.4.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.1 21-Mar-2018  martin Apply patch, requested by mrg in ticket #1588:

Try to open the audio path with O_WRONLY if O_RDWR fails.
This makes 'audiocfg list' work in more places.

(no longer necessary in -current with the in kernel mixer.)
 1.6.16.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6.16.1 10-Jun-2019  christos Sync with HEAD
 1.7.2.2 29-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #267):

usr.bin/audiocfg/dtmf.c: revision 1.4
usr.bin/audiocfg/main.c: revision 1.14 (via patch)
usr.bin/audiocfg/audiodev.c: revision 1.12

Use err(3)/warn(3) instead of perror(3)/fprintf(stderr,...).
Use getprogname(3) for usage().
 1.7.2.1 28-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #262):

usr.bin/audiocfg/main.c: revision 1.10
usr.bin/audiocfg/main.c: revision 1.11
usr.bin/audiocfg/audiodev.c: revision 1.8
usr.bin/audiocfg/audiodev.h: revision 1.6
usr.bin/audiocfg/audiodev.c: revision 1.9
usr.bin/audiocfg/audiodev.h: revision 1.7

Rename some members in adev for clarity. No functional changes intended.

Revert to use single descriptor for "audiocfg test" as before.
 1.9 24-Aug-2019  isaki Revert about index number changes. It breaks its usage and output format.
Pointed out by mrg@.
 1.8 24-Aug-2019  isaki Use device unit number for index.
The index number was too confusing such as
0: [ ] audio1 @ wss0
1: [*] audio0 @ yds0
in my PC for example. Here is new format:
[*] audio0 @ yds0
[ ] audio1 @ wss0
In this style, devices are always listed in order of unit number
and 0 always means audio0, 1 always means audio1.
 1.7 24-Aug-2019  isaki Revert to use single descriptor for "audiocfg test" as before.
 1.6 24-Aug-2019  isaki Rename some members in adev for clarity. No functional changes intended.
 1.5 08-May-2019  isaki branches: 1.5.2;
Update respond to isaki-audio2 branch.
- Extend list command to display supported hardware formats.
- Add set command to set hardware format.
- Use correct /dev/audioctl instead of /dev/audio.
 1.4 11-Aug-2013  dholland branches: 1.4.26;
Pass WARNS=5.
 1.3 02-Sep-2010  jmcneill branches: 1.3.6; 1.3.12;
at the request of mrg, print the parent of audioN's device name
 1.2 01-Sep-2010  jmcneill add support for testing audio devices. the usage of audiocfg changes:

audiocfg list
audiocfg default [index]
audiocfg test [index]

'list' shows the available audio devices, 'default' sets the default
audio device, and 'test' will play a tone for 2 seconds on each
channel. example:

$ ./audiocfg list
0: [*] audio0: ICH2 AC97 (2 playback channels)
1: [ ] audio1: Pseudo Audio (2 playback channels)
$ ./audiocfg test 0
testing channel 0...
testing channel 1...
$
 1.1 30-Aug-2010  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 30-Aug-2010  mrg add a simple app to maintain the symlinks for audio devices in /dev, so
that it's easy to change the "default" audio device. eg:

# audiocfg
0: [*] audio0: HD Audio
1: [ ] audio1: HD Audio
2: [ ] audio2: Pseudo Audio
# audiocfg 1
setting default audio device to audio1
# audiocfg
0: [ ] audio0: HD Audio
1: [*] audio1: HD Audio
2: [ ] audio2: Pseudo Audio

written by jared. thanks!

(there's a separate patch in the works to give "HD Audio" a better name.)


this is not enabled yet, but will be soon.

it also needs a manual page. any takers?
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.26.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4.26.1 10-Jun-2019  christos Sync with HEAD
 1.5.2.1 28-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #262):

usr.bin/audiocfg/main.c: revision 1.10
usr.bin/audiocfg/main.c: revision 1.11
usr.bin/audiocfg/audiodev.c: revision 1.8
usr.bin/audiocfg/audiodev.h: revision 1.6
usr.bin/audiocfg/audiodev.c: revision 1.9
usr.bin/audiocfg/audiodev.h: revision 1.7

Rename some members in adev for clarity. No functional changes intended.

Revert to use single descriptor for "audiocfg test" as before.
 1.3 21-Jun-2021  christos fix proplib deprecation
 1.2 02-Sep-2010  jmcneill at the request of mrg, print the parent of audioN's device name
 1.1 30-Aug-2010  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 30-Aug-2010  mrg add a simple app to maintain the symlinks for audio devices in /dev, so
that it's easy to change the "default" audio device. eg:

# audiocfg
0: [*] audio0: HD Audio
1: [ ] audio1: HD Audio
2: [ ] audio2: Pseudo Audio
# audiocfg 1
setting default audio device to audio1
# audiocfg
0: [ ] audio0: HD Audio
1: [*] audio1: HD Audio
2: [ ] audio2: Pseudo Audio

written by jared. thanks!

(there's a separate patch in the works to give "HD Audio" a better name.)


this is not enabled yet, but will be soon.

it also needs a manual page. any takers?
 1.2 02-Sep-2010  jmcneill at the request of mrg, print the parent of audioN's device name
 1.1 30-Aug-2010  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 30-Aug-2010  mrg add a simple app to maintain the symlinks for audio devices in /dev, so
that it's easy to change the "default" audio device. eg:

# audiocfg
0: [*] audio0: HD Audio
1: [ ] audio1: HD Audio
2: [ ] audio2: Pseudo Audio
# audiocfg 1
setting default audio device to audio1
# audiocfg
0: [ ] audio0: HD Audio
1: [*] audio1: HD Audio
2: [ ] audio2: Pseudo Audio

written by jared. thanks!

(there's a separate patch in the works to give "HD Audio" a better name.)


this is not enabled yet, but will be soon.

it also needs a manual page. any takers?
 1.4 24-Aug-2019  isaki Use err(3)/warn(3) instead of perror(3)/fprintf(stderr,...).
Use getprogname(3) for usage().
 1.3 11-Aug-2013  dholland branches: 1.3.26; 1.3.28;
Pass WARNS=5.
 1.2 01-Sep-2010  jmcneill branches: 1.2.6; 1.2.12;
use htole16 to ensure that the pcm stream is slinear16_le on big endian hosts
 1.1 01-Sep-2010  jmcneill add support for testing audio devices. the usage of audiocfg changes:

audiocfg list
audiocfg default [index]
audiocfg test [index]

'list' shows the available audio devices, 'default' sets the default
audio device, and 'test' will play a tone for 2 seconds on each
channel. example:

$ ./audiocfg list
0: [*] audio0: ICH2 AC97 (2 playback channels)
1: [ ] audio1: Pseudo Audio (2 playback channels)
$ ./audiocfg test 0
testing channel 0...
testing channel 1...
$
 1.2.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.28.1 29-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #267):

usr.bin/audiocfg/dtmf.c: revision 1.4
usr.bin/audiocfg/main.c: revision 1.14 (via patch)
usr.bin/audiocfg/audiodev.c: revision 1.12

Use err(3)/warn(3) instead of perror(3)/fprintf(stderr,...).
Use getprogname(3) for usage().
 1.3.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.1 01-Sep-2010  jmcneill add support for testing audio devices. the usage of audiocfg changes:

audiocfg list
audiocfg default [index]
audiocfg test [index]

'list' shows the available audio devices, 'default' sets the default
audio device, and 'test' will play a tone for 2 seconds on each
channel. example:

$ ./audiocfg list
0: [*] audio0: ICH2 AC97 (2 playback channels)
1: [ ] audio1: Pseudo Audio (2 playback channels)
$ ./audiocfg test 0
testing channel 0...
testing channel 1...
$
 1.17 01-Apr-2023  mlelstv Also report precision from hwinfo.
 1.16 24-Aug-2019  isaki Revert about index number changes. It breaks its usage and output format.
Pointed out by mrg@.
 1.15 24-Aug-2019  isaki Make the same code that appears repeatedly a function.
 1.14 24-Aug-2019  isaki Use err(3)/warn(3) instead of perror(3)/fprintf(stderr,...).
Use getprogname(3) for usage().
 1.13 24-Aug-2019  isaki Check mode argument earlier.
 1.12 24-Aug-2019  isaki Use device unit number for index.
The index number was too confusing such as
0: [ ] audio1 @ wss0
1: [*] audio0 @ yds0
in my PC for example. Here is new format:
[*] audio0 @ yds0
[ ] audio1 @ wss0
In this style, devices are always listed in order of unit number
and 0 always means audio0, 1 always means audio1.
 1.11 24-Aug-2019  isaki Revert to use single descriptor for "audiocfg test" as before.
 1.10 24-Aug-2019  isaki Rename some members in adev for clarity. No functional changes intended.
 1.9 22-Aug-2019  isaki Fix assertion of "audiocfg list <n>" when n is an illegal index.
 1.8 08-May-2019  isaki branches: 1.8.2;
Update respond to isaki-audio2 branch.
- Extend list command to display supported hardware formats.
- Add set command to set hardware format.
- Use correct /dev/audioctl instead of /dev/audio.
 1.7 12-Aug-2013  joerg branches: 1.7.26;
Add more __dead.
 1.6 03-Sep-2010  jmcneill branches: 1.6.6; 1.6.12;
return an error if testing fails, and dump the device info before running tests
 1.5 02-Sep-2010  jmcneill at the request of mrg, print the parent of audioN's device name
 1.4 02-Sep-2010  jmcneill print the version field from AUDIO_GETDEV if present
 1.3 01-Sep-2010  wiz Index argument is not optional, make it clearer in the usage.
 1.2 01-Sep-2010  jmcneill add support for testing audio devices. the usage of audiocfg changes:

audiocfg list
audiocfg default [index]
audiocfg test [index]

'list' shows the available audio devices, 'default' sets the default
audio device, and 'test' will play a tone for 2 seconds on each
channel. example:

$ ./audiocfg list
0: [*] audio0: ICH2 AC97 (2 playback channels)
1: [ ] audio1: Pseudo Audio (2 playback channels)
$ ./audiocfg test 0
testing channel 0...
testing channel 1...
$
 1.1 30-Aug-2010  mrg branches: 1.1.1;
Initial revision
 1.1.1.1 30-Aug-2010  mrg add a simple app to maintain the symlinks for audio devices in /dev, so
that it's easy to change the "default" audio device. eg:

# audiocfg
0: [*] audio0: HD Audio
1: [ ] audio1: HD Audio
2: [ ] audio2: Pseudo Audio
# audiocfg 1
setting default audio device to audio1
# audiocfg
0: [ ] audio0: HD Audio
1: [*] audio1: HD Audio
2: [ ] audio2: Pseudo Audio

written by jared. thanks!

(there's a separate patch in the works to give "HD Audio" a better name.)


this is not enabled yet, but will be soon.

it also needs a manual page. any takers?
 1.6.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.26.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7.26.1 10-Jun-2019  christos Sync with HEAD
 1.8.2.3 29-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #267):

usr.bin/audiocfg/dtmf.c: revision 1.4
usr.bin/audiocfg/main.c: revision 1.14 (via patch)
usr.bin/audiocfg/audiodev.c: revision 1.12

Use err(3)/warn(3) instead of perror(3)/fprintf(stderr,...).
Use getprogname(3) for usage().
 1.8.2.2 28-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #262):

usr.bin/audiocfg/main.c: revision 1.10
usr.bin/audiocfg/main.c: revision 1.11
usr.bin/audiocfg/audiodev.c: revision 1.8
usr.bin/audiocfg/audiodev.h: revision 1.6
usr.bin/audiocfg/audiodev.c: revision 1.9
usr.bin/audiocfg/audiodev.h: revision 1.7

Rename some members in adev for clarity. No functional changes intended.

Revert to use single descriptor for "audiocfg test" as before.
 1.8.2.1 28-Sep-2019  martin Pull up following revision(s) (requested by isaki in ticket #258):

usr.bin/audiocfg/main.c: revision 1.9

Fix assertion of "audiocfg list <n>" when n is an illegal index.

RSS XML Feed