ihdad: graceful failure on DSP/cAVS platforms (Phase 8.1)
On cAVS/SOF platforms (e.g. LG Gram 8086:7728), STATESTS reads 0 because the codec sits behind the audio DSP; the legacy HDA codec-wake mechanism cannot reach it. enumerate() previously hardcoded codec 0 and would hang reading a non-existent codec via CORB/RIRB. Now, if no codecs respond after reset_controller(), log the DSP-platform diagnosis and fail honestly with ENODEV instead of hanging. A SOF/cAVS driver (Phase 8.2) is required for these platforms.
This commit is contained in:
@@ -213,6 +213,18 @@ impl IntelHDA {
|
|||||||
module.init()?;
|
module.init()?;
|
||||||
|
|
||||||
module.info();
|
module.info();
|
||||||
|
|
||||||
|
if module.codecs.is_empty() {
|
||||||
|
// DSP/cAVS platform: STATESTS=0 (codec behind DSP), enumerate()
|
||||||
|
// would hang on non-existent codec 0. Fail honestly.
|
||||||
|
log::error!(
|
||||||
|
"ihdad: no codecs responded on STATESTS — this is a DSP/cAVS \
|
||||||
|
platform (codec behind the DSP). Legacy HDA cannot drive it; \
|
||||||
|
a SOF/cAVS driver is required (Phase 8.2)."
|
||||||
|
);
|
||||||
|
return Err(Error::new(ENODEV));
|
||||||
|
}
|
||||||
|
|
||||||
module.enumerate()?;
|
module.enumerate()?;
|
||||||
|
|
||||||
module.configure()?;
|
module.configure()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user