xref: /aosp_15_r20/external/autotest/client/site_tests/audio_Aconnect/audio_Aconnect.py (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Lint as: python2, python3
2# Copyright 2017 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6from autotest_lib.client.bin import test
7from autotest_lib.client.common_lib import error
8from autotest_lib.client.cros.audio import alsa_utils
9
10
11class audio_Aconnect(test.test):
12    """Checks that the MIDI seq kernel interface is accessible."""
13    version = 1
14
15
16    def run_once(self):
17        """Ensure we can access at least 1 seq client.
18
19        A properly functioning seq system has at least the System
20        client.
21        """
22
23        if alsa_utils.get_num_seq_clients() == 0:
24            raise error.TestFail('There is no MIDI seq client')
25