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