mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
crosvm: Add kernel parameters when ac97 devices exist
This CL simplifies crosvm user interface since these kernel parameters will always be used by ac97 devices. BUG=b:172851292 TEST=Build and test VMs Cq-Depend: chromium:2562988 Change-Id: I8461b9fa092c955b07cd88fbce582172a27fbb48 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2562808 Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Tested-by: Chih-Yang Hsia <paulhsia@chromium.org> Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
This commit is contained in:
parent
4e1f99a68d
commit
164782429c
1 changed files with 7 additions and 0 deletions
|
@ -722,6 +722,13 @@ fn set_argument(cfg: &mut Config, name: &str, value: Option<&str>) -> argument::
|
|||
#[cfg(feature = "audio")]
|
||||
"ac97" => {
|
||||
let ac97_params = parse_ac97_options(value.unwrap())?;
|
||||
// Add kernel parameters related to the intel8x0 driver for ac97 devices once.
|
||||
if cfg.ac97_parameters.is_empty() {
|
||||
// Set `inside_vm=1` to save some register read ops in the driver.
|
||||
cfg.params.push("snd_intel8x0.inside_vm=1".to_string());
|
||||
// Set `ac97_clock=48000` to save intel8x0_measure_ac97_clock call in the driver.
|
||||
cfg.params.push("snd_intel8x0.ac97_clock=48000".to_string());
|
||||
}
|
||||
cfg.ac97_parameters.push(ac97_params);
|
||||
}
|
||||
"serial" => {
|
||||
|
|
Loading…
Reference in a new issue