Documentation
¶
Overview ¶
Package soundcardinit contains local Tast tests that verifies sound_card_init runs correctly on different device models.
Index ¶
- Constants
- func CreateCalibFiles(ctx context.Context, soundCardID string, count uint) error
- func CreateRunTimeFile(ctx context.Context, soundCardID string, ts int64) error
- func CreateStopTimeFile(ctx context.Context, ts int64) error
- func GetSoundCardID(ctx context.Context) (string, error)
- func RemoveCalibFiles(ctx context.Context, soundCardID string, count uint) error
- func VerifyCalibExist(ctx context.Context, soundCardID string, count uint) error
- func VerifyCalibNotExist(ctx context.Context, soundCardID string, count uint) error
- type TestParameters
Constants ¶
const CalibFiles = "/var/lib/sound_card_init/%s/calib_%d"
CalibFiles is the file stores previous calibration values.
const RunTimeFile = "/var/lib/sound_card_init/%s/run"
RunTimeFile is the file stores previous sound_card_init run time.
const StopTimeFile = "/var/lib/cras/stop"
StopTimeFile is the file stores previous CRAS stop time.
Variables ¶
This section is empty.
Functions ¶
func CreateCalibFiles ¶
CreateCalibFiles creates CalibFiles.
func CreateRunTimeFile ¶
CreateRunTimeFile create a RunTimeFile containing given unix time in secs.
func CreateStopTimeFile ¶
CreateStopTimeFile create a StopTimeFile containing given unix time in secs.
func GetSoundCardID ¶
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 ¶
RemoveCalibFiles removes CalibFiles.
func VerifyCalibExist ¶
VerifyCalibExist verifies calib* exist.