Commit graph

1884 commits

Author SHA1 Message Date
Jaroslav Kysela
9b95d9b20a github: update build.yml
- use actions/checkout@v3
- improve code to generate a specific git version

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:56:27 +02:00
Jaroslav Kysela
5201ec026d aseqdump: fix MIDI 2.0 code - it compiles now
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:56:06 +02:00
Jaroslav Kysela
a1bd9a0a15 gitcompile: set more verbose compilation warnings
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:42:24 +02:00
Jaroslav Kysela
b7d73a4611 nhlt-dmic-info: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:42:24 +02:00
Jaroslav Kysela
d7bbc26d6e alsaucm: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:42:24 +02:00
Jaroslav Kysela
181e19017d aplaymidi: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 15:42:19 +02:00
Jaroslav Kysela
a03377a221 aseqnet: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:58:11 +02:00
Jaroslav Kysela
429c32a2ec aseqdump: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:58:11 +02:00
Jaroslav Kysela
0b48dd621b aconnect: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:53:16 +02:00
Jaroslav Kysela
ed98b06dc2 speaker-test: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:51:16 +02:00
Jaroslav Kysela
1843540e27 amidi: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:50:57 +02:00
Jaroslav Kysela
b36687548d bat: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:44:37 +02:00
Jaroslav Kysela
7c54fb5ebe iecset: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:37:12 +02:00
Jaroslav Kysela
10a2557d7e alsamixer: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:36:45 +02:00
Jaroslav Kysela
d609a58664 alsaloop: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:36:15 +02:00
Jaroslav Kysela
ad5a1c0c88 axfer: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:35:57 +02:00
Jaroslav Kysela
60bf4bb2af alsactl: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:35:23 +02:00
Jaroslav Kysela
bf477bbb6d amixer: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:35:03 +02:00
Jaroslav Kysela
df0b85aa4f aplay: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:34:36 +02:00
Jaroslav Kysela
153d185822 topology: fix the verbose compilation warnings for latest gcc
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 12:33:19 +02:00
Jaroslav Kysela
8ed9d7607f alsactl: fix the copy-n-paste typo (SND_RAWMIDI_STREAM_*)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-30 10:57:31 +02:00
Takashi Iwai
7e9bebad0b aseqdump: Add options to switch view mode
This patch adds to switch the operation mode of aseqdump to specify
how the values are shown.  Namely, it allows to show the MIDI 2.0
values in two more different ways: compatible "normalized" view and
percentage view, in addition to the default "raw" view.

The "raw" view mode just shows the value found in the event almost as
is.  The MIDI 2.0 values are shown in 16 or 32bit hex numbers.
The channel and UMP group numbers are 0-based, taking from 0 to 15.

OTOH, in the normalized view, the 16bit or 32bit velocity and data
values of MIDI 2.0 are normalized to the value fit in MIDI 1.0,
i.e. from 0 to 127, but with decimal points.  Similarly, the pitch
wheel values are normalized between -8192 to 8191.
Also, the channel numbers and UMP group numbers are 1-based, taking
from 1 to 16.

In the percentage view, the velocity and data values are normalized
and shown in percentage, from 0% to 100%.  The pitch wheel is
normalized from -100% to 100%.  The channel and UMP groups are 1-based
as well as in normalized view mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28 16:44:45 +02:00
Takashi Iwai
ad09344d4c aseqdump: Correct wrong channel number
Correct the wrong value shown in MIDI2 default output (status instead
of channel).  Also adjust the printf formats to use %2d consistently
for the channel numbers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28 16:44:45 +02:00
Takashi Iwai
8703c08978 aseqdump: Align outputs of UMP MIDI 1.0 with legacy MIDI 1.0
The outputs from UMP MIDI 1.0 are slightly differently shown as the
legacy MIDI 1.0 (the velocities and values are in hex), which is
rather confusing.  Let's make them look more similar.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-08-28 16:44:45 +02:00
Jaroslav Kysela
c41f3cfb2f speaker-test: allow large buffer and period time setup - up to 100 seconds
BugLink: https://github.com/alsa-project/alsa-utils/issues/224
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-13 19:19:53 +02:00
Jaska Uimonen
096920264e topology: plugins: nhlt: remove dmic error print
Remove "fs not set" print from dmic processing. The message is printed out
when pdm is enabled but not configured. Many sof topologies enable all
pdms even if not used as it is a requirement for some Intel firmware
versions to work correctly.

Fixes: https://github.com/alsa-project/alsa-utils/pull/218
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:46:47 +02:00
Seppo Ingalsuo
a4c25e4710 Topology: NHLT: Intel: Update DMIC FIR coefficients
The previous version contained some hand edit mistakes those
impacted the filter frequency response. The used generator script
is found from directory:

https://github.com/thesofproject/sof/tree/main/tools/tune/dmic .

Use command "dmic_batch.h" to generate these and copy new version
to alsa-utils.

Fixes: https://github.com/alsa-project/alsa-utils/pull/218
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:46:33 +02:00
Brent Lu
3a47ef2487 topology: nhlt: intel: support more device types and directions
In current NHLT table the device type of all SSP endpoints are set to
BT Sideband(0) instead of SSP Analog Codec(4) and the direction only
supports Render(0) and Capture(1).

Here we introduce two new quirks from topology to set the device type
correctly and support two more directions: Render with loopback(2)
and Feedback for render(3) for speakers with echo reference or IV
sense feedback.

Fixes: https://github.com/alsa-project/alsa-utils/pull/226
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:43:17 +02:00
Ranjani Sridharan
9d058fff27 topology: pre-processor: Add support for CombineArrays
Introduce a new keyword, "CombineArrays" to instantiate multiple nodes
of the type specified. For example:

CombineArrays.Object.Base.input_audio_format [
	{
		in_rate [
			8000
			16000
			48000
		]
		in_bit_depth [
			32
		]
		in_valid_bit_depth [
			24
			32
		]
	}
]

This would be expanded into 6 objects with the rate, bit_depth and
valid_bit_depth combinations of the arrays of values above.

Object.Base.input_audio_format [
	{
		in_rate 8000
		in_bit_depth 32
		in_valid_bit_depth 32
	}
	{
		in_rate 16000
		in_bit_depth 32
		in_valid_bit_depth 32
	}
	{
		in_rate 48000
		in_bit_depth 32
		in_valid_bit_depth 32
	}
	{
		in_rate 8000
		in_bit_depth 32
		in_valid_bit_depth 24
	}
	{
		in_rate 16000
		in_bit_depth 32
		in_valid_bit_depth 24
	}
	{
		in_rate 48000
		in_bit_depth 32
		in_valid_bit_depth 24
	}
]

The CombineArrays definition is an array so that multiple combinations can
be specified in order to deal with only valid combinations. For example,
16-bit bit_depth is only valid with 16-bit valid_bit_depth. So if we
also want to add those combinations with the multiple rates, the
definition would look like:

CombineArrays.Object.Base.input_audio_format [
        {
                in_rate [
                        8000
                        16000
                        48000
                ]
                in_bit_depth [
                        32
                ]
                in_valid_bit_depth [
                        24
                        32
                ]
        }
        {
                in_rate [
                        8000
                        16000
                        48000
                ]
                in_bit_depth [
                        16
                ]
                in_valid_bit_depth [
                        16
                ]
        }
]

Fixes: https://github.com/alsa-project/alsa-utils/pull/216
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:40:51 +02:00
Rudi Heitbaum
d6a71bfbde alsactl: add define to compile with glibc 2.38
strlcat and strlcpy have been added to glibc 2.38.
update the defines to use the glibc versions, and not conflict with
string.h.

ref:
- https://sourceware.org/git/?p=glibc.git;a=commit;h=454a20c8756c9c1d55419153255fc7692b3d2199

Fixes: https://github.com/alsa-project/alsa-utils/pull/225
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:36:04 +02:00
Jaska Uimonen
5cdb598f59 topology: plugins: nhlt: set dmic stereo mode only in hw version 1
Dmic stereo mode should be set only in hw version 1. In later hw
versions this bit is reserved.

Fixes: https://github.com/alsa-project/alsa-utils/pull/222
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.ntel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-08-01 09:34:19 +02:00
Takashi Iwai
b399fb85a9 aplaymidi: Add UMP support
By switching via the new option -u, aplaymidi can behave as a UMP
client and output UMP packets instead of legacy sequencer events.
As of now, the only supported version is 1.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:44:58 +02:00
Takashi Iwai
64b1d486b1 aconnect: Add UMP support
This patch extends the aconnect program for supporting UMP.
Now the verbose output can show the UMP client version.

Also, a new option -a is added to control the behavior whether to show
the all ports including the inactive ports or not.  As default, only
the active ports are shown, but UMP clients allow to hide some ports
as inactive.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:44:57 +02:00
Takashi Iwai
2b08d585a3 aseqdump: Add UMP support
Add the support for showing the UMP events to aseqdump.
With the new option -u, the program can start as a UMP sequencer
client and receive UMP events instead of the legacy MIDI events.

Also, the automatic event conversion among legacy and UMP clients can
be suppressed by the new -r option, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-06-06 15:44:57 +02:00
Jaroslav Kysela
ee3965f6fa nhlt: add nhlt-dmic-info utility
The microphone arrays for Intel platforms are described in the
ACPI NHLT table. This table is available in sysfs. Parse this
information and use a more common format (json) for output. This
information is usable for the further DSP processing.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-16 15:54:05 +02:00
Jaroslav Kysela
7812ddb265 Release v1.2.9
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-04 09:16:17 +02:00
Jaroslav Kysela
1238ba1a7c alsa-info.sh: increase version to 0.5.3
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-03 16:41:26 +02:00
wileyhy
37e396cab4 alsa-info.sh: uname - reduce execs by four, and eliminate a logic bug
Per `info uname`, `uname` always prints its data in the same order.
Also, "note that A && B || C is not if-then-else. C may run when A is true."
https://www.shellcheck.net/wiki/SC2015

set -x; read -r KERNEL_VERSION < <(uname -v); smp=x; \
  [[ "$KERNEL_VERSION" = *SMP* ]] && \
  { smp=y; readonly smp; false;} || smp=n; set -

  ... https://github.com/koalaman/shellcheck

Fixes: https://github.com/alsa-project/alsa-utils/pull/207
From: wileyhy @ github
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-03 16:36:04 +02:00
wileyhy
4588b2f8ae alsa-info.sh: Update test '-a' and '-o' to '&&' and '||'
lines 50, 103: in two compound ['s, replace '-a' with '] && ['
  SC2166 – Prefer `[ p ] && [ q ]` as `[ p -a q ]` is not well defined.
  SC2107 – Instead of `[ a && b ]`, use `[ a ] && [ b ]`.

line 45: in a compound test command, change '-o' to '|| test'
  SC1139 – Use `||` instead of `-o` between test commands.
  SC2109 – Instead of `[ a || b ]`, use `[ a ] || [ b ]`.

 ... https://github.com/koalaman/shellcheck

Fixes: https://github.com/alsa-project/alsa-utils/pull/206
From: wileyhy @ github
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-03 16:29:52 +02:00
Tj
42bba8ac61 arecord: use correct duration
When a duration is specified but the the capture device cannot use the
requested sample rate and an alternative rate is used the duration
sample count must be (re)calculated.

Fixes: https://github.com/alsa-project/alsa-utils/pull/200
Signed-off-by: Tj <hacker@iam.tj>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-03 16:26:22 +02:00
Chao Song
52f6fb7f33 topology: pre-processor: fix regular expression flags
The REG_ICASE flag is a compile-time flag (cflags), it
should be used with regcomp() instead of regexec(). Also
add the REG_EXTENDED flag in this patch to make patterns
like 'tgl|adl' work.

Fixes: https://github.com/alsa-project/alsa-utils/pull/195
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-05-03 16:25:15 +02:00
Jaroslav Kysela
ca503e3519 alsa-info.sh: print ctl-led list from sysfs
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-03-24 09:07:43 +01:00
Jaroslav Kysela
fd2e386b3e alsaloop: fix loopcount condition
BugLink: https://github.com/alsa-project/alsa-utils/issues/185
Fixes: e61f35b ("alsaloop: try adapt avail_min for playback to avoid 100% CPU usage")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-27 13:35:43 +01:00
Jaroslav Kysela
55bafb7938 alsabat: improve error handling in bat_init()
Fix 'LC_ALL=C.UTF-8 ./alsabat' command.

Fixes: https://github.com/alsa-project/alsa-utils/issues/192
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-27 13:23:28 +01:00
SASANO Takayoshi
cff2d1c210 alsactl: fix OpenBSD compilation (add include of os_compat.h)
Fixes: https://github.com/alsa-project/alsa-utils/pull/193
Signed-off-by: SASANO Takayoshi <uaa@uaa.org.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-27 13:10:16 +01:00
Jay-716
17615de014 alsaucm: fix typo in docs (can can)
Fixes: https://github.com/alsa-project/alsa-utils/pull/191
Signed-off-by: Jay-716 <13422525511@163.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-27 13:08:50 +01:00
Jaroslav Kysela
5a3655b33a include: fix package - add bswap.h and os_compat.h to noinst_HEADERS
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-27 13:05:17 +01:00
Jaroslav Kysela
58f92d6175 alsaucm: add also card index for '-c' argument
Make semantics for this argument in sync with other ALSA utilities.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-27 12:56:17 +01:00
Jaroslav Kysela
dad2161d3c alsamixer: add -B,--black-background option
Fixes: https://github.com/alsa-project/alsa-utils/issues/176
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-10 13:36:23 +01:00
Jyri Sarha
cf25cf6767 topology: pre-process-object: Expand definitions within strings
Expand the pre-processor to allow for expanding the definitions,
object attribute references and arithmetic expressions within strings.

With this extension its possible to embedded definitions or attribute
references into topology string objects. For example:

Define {
       PCM_NUMBER	1
}

Object.Pipeline {
	pcm-playback.0 {

	Object.Widget {
		copier.1 {
			copier_type	"host"
		}
		gain.1 {
			Object.Control.mixer.1 {
				name 'hw:$[$PCM_NUMBER - 1] Playback Volume'
		}
	}

	Object.Base {
		route.1 {
			source	copier.host.$index.1
			sink	gain.$index.1
		}
	}
}

In the example the $[$PCM_NUMBER - 1] would be replaced with the
result of arithmetic expression '1 - 1' in other words '0' , and
$index in all occurrences with index attribute found from pipeline
object. Any non alpha numeric or '_' character are treated as
delimiters for variable names if $[]-notation is not used.

Fixes: https://github.com/alsa-project/alsa-utils/pull/189
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2023-02-06 15:49:14 +01:00