ret = snd_soc_add_card_controls(card, test_card_controls, ARRAY_SIZE(test_card_controls));
KUNIT_ASSERT_EQ(test, ret, 0);
/* Look up every control */ for (i = 0; i < ARRAY_SIZE(test_card_controls); ++i) {
kc = snd_soc_card_get_kcontrol(card, test_card_controls[i].name);
KUNIT_EXPECT_NOT_ERR_OR_NULL_MSG(test, kc, "Failed to find '%s'\n",
test_card_controls[i].name); if (!kc) continue;
/* Test that it is the correct control */
mc = (struct soc_mixer_control *)kc->private_value;
KUNIT_EXPECT_EQ_MSG(test, mc->shift, i, "For '%s'\n", test_card_controls[i].name);
}
/* Test some names that should not be found */
kc = snd_soc_card_get_kcontrol(card, "None");
KUNIT_EXPECT_NULL(test, kc);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.