return 0;
}
+static inline enum DAIOTYP atc_spdif_in_type(struct ct_atc *atc)
+{
+ return (atc->model == CTSB073X) ? SPDIFI_BAY : SPDIFIO;
+}
+
static struct capabilities atc_capabilities(struct ct_atc *atc)
{
struct hw *hw = atc->hw;
static int atc_spdif_in_unmute(struct ct_atc *atc, unsigned char state)
{
- return atc_daio_unmute(atc, state, SPDIFIO);
+ return atc_daio_unmute(atc, state, atc_spdif_in_type(atc));
}
static int atc_spdif_out_get_status(struct ct_atc *atc, unsigned int *status)
daio_mgr = (struct daio_mgr *)atc->rsc_mgrs[DAIO];
da_desc.msr = atc->msr;
for (i = 0; i < NUM_DAIOTYP; i++) {
- if (((i == MIC) && !cap.dedicated_mic) ||
- ((i == RCA) && !cap.dedicated_rca) ||
- i == SPDIFI_BAY)
+ if (((i == SPDIFIO) && (atc->model == CTSB073X)) ||
+ ((i == SPDIFI_BAY) && (atc->model != CTSB073X)) ||
+ ((i == MIC) && !cap.dedicated_mic) ||
+ ((i == RCA) && !cap.dedicated_rca))
continue;
- if (atc->model == CTSB073X && i == SPDIFIO)
- da_desc.type = SPDIFI_BAY;
- else
- da_desc.type = i;
+ da_desc.type = i;
da_desc.output = (i < LINEIM) || (i == RCA);
err = daio_mgr->get_daio(daio_mgr, &da_desc,
(struct daio **)&atc->daios[i]);
mixer->set_input_right(mixer, MIX_MIC_IN, &src->rsc);
}
- dai = container_of(atc->daios[SPDIFIO], struct dai, daio);
+ dai = container_of(atc->daios[atc_spdif_in_type(atc)], struct dai, daio);
atc_connect_dai(atc->rsc_mgrs[SRC], dai,
(struct src **)&atc->srcs[0],
(struct srcimp **)&atc->srcimps[0]);