soundcardinit

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package soundcardinit contains local Tast tests that verifies sound_card_init runs correctly on different device models.

Index

Constants

View Source
const CalibFiles = "/var/lib/sound_card_init/%s/calib_%d"

CalibFiles is the file stores previous calibration values.

View Source
const RunTimeFile = "/var/lib/sound_card_init/%s/run"

RunTimeFile is the file stores previous sound_card_init run time.

View Source
const StopTimeFile = "/var/lib/cras/stop"

StopTimeFile is the file stores previous CRAS stop time.

Variables

This section is empty.

Functions

func CreateCalibFiles

func CreateCalibFiles(ctx context.Context, soundCardID string, count uint) error

CreateCalibFiles creates CalibFiles.

func CreateRunTimeFile

func CreateRunTimeFile(ctx context.Context, soundCardID string, ts int64) error

CreateRunTimeFile create a RunTimeFile containing given unix time in secs.

func CreateStopTimeFile

func CreateStopTimeFile(ctx context.Context, ts int64) error

CreateStopTimeFile create a StopTimeFile containing given unix time in secs.

func GetSoundCardID

func GetSoundCardID(ctx context.Context) (string, error)

GetSoundCardID retrieves sound card name by parsing aplay-l output. An example of "aplay -l" log is shown as below: **** List of PLAYBACK Hardware Devices **** card 0: sofcmlmax98390d [sof-cml_max98390_da7219], device 0: Speakers (*) []

Subdevices: 1/1
Subdevice #0: subdevice #0

func RemoveCalibFiles

func RemoveCalibFiles(ctx context.Context, soundCardID string, count uint) error

RemoveCalibFiles removes CalibFiles.

func VerifyCalibExist

func VerifyCalibExist(ctx context.Context, soundCardID string, count uint) error

VerifyCalibExist verifies calib* exist.

func VerifyCalibNotExist

func VerifyCalibNotExist(ctx context.Context, soundCardID string, count uint) error

VerifyCalibNotExist verifies calib* does not exist.

Types

type TestParameters

type TestParameters struct {
	SoundCardID string
	AmpCount    uint
	Func        func(context.Context, string) error
}

TestParameters holds the test parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL