19 lines
407 B
Bash
19 lines
407 B
Bash
#!/bin/bash
|
|
#
|
|
# SPDX-FileCopyrightText: 2016-2025 BlueALSA developers
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
if [[ $# -ne 1 ]]; then
|
|
echo "usage: $0 <pcm-path>"
|
|
exit 1
|
|
fi
|
|
|
|
# open PCM and close it right away
|
|
: |bluealsactl open "$1" || exit
|
|
|
|
# check if open is possible right after close
|
|
if ! dd status=none if=/dev/zero count=10 |bluealsactl open "$1" ; then
|
|
echo "error: Couldn't open BlueALSA PCM"
|
|
exit 1
|
|
fi
|