Mark,
In wm8776.c, the DAI structure is defined as an array of two elements, one for playback and one for capture:
struct snd_soc_dai_driver wm8776_dai[] = { { .name = "WM8776 Playback", .playback = { .stream_name = "Playback", .channels_min = 2, .channels_max = 2, .rates = WM8776_RATES, .formats = WM8776_FORMATS, }, .ops = &wm8776_dac_ops, }, { .name = "WM8776 Capture", .capture = { .stream_name = "Capture", .channels_min = 2, .channels_max = 2, .rates = WM8776_RATES, .formats = WM8776_FORMATS, }, .ops = &wm8776_adc_ops, }, };
In my CS4270 driver, I have these combined into one structure:
struct snd_soc_dai_driver cs4270_dai = { .name = "cs4270", .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_CONTINUOUS, .rate_min = 4000, .rate_max = 216000, .formats = CS4270_FORMATS, }, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = 2, .rates = SNDRV_PCM_RATE_CONTINUOUS, .rate_min = 4000, .rate_max = 216000, .formats = CS4270_FORMATS, }, .ops = &cs4270_dai_ops, };
Should the CS4270 driver be changed to use two structures?