def warmup(self):
        super(alsa_rms_test, self).warmup()

        cras_rms_test_setup()
        # We need CRAS to initialize the volume and gain.
        cras_utils.playback(playback_file="/dev/zero", duration=1)
        # CRAS will release the device after 10 seconds.
        time.sleep(11)
    def start(self, file_path, blocking):
        """Starts recording.

        Starts recording subprocess. It can be stopped by calling stop().

        @param file_path: The path to the file.
        @param blocking: Blocks this call until playback finishes.

        """
        self._playback_subprocess = cras_utils.playback(
            blocking, playback_file=file_path)
 def _playback():
     """Playback using cras utility."""
     cras_utils.playback(playback_file=file_path)