Hi Mark,
On Sat, Jun 1, 2013 at 7:16 PM, Mark Brown broonie@linaro.org wrote:
When declaring playback and capture capabilities check for both CODEC side and CPU side support rather than only checking for CODEC side support. While it is unusual some CPUs do have unidirectional DAIs.
Signed-off-by: Mark Brown broonie@kernel.org
Thanks for the patch, but I still got the same output:
$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: mxssgtl5000 [mxs_sgtl5000], device 0: HiFi Playback sgtl5000-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: mxssgtl5000 [mxs_sgtl5000], device 1: HiFi Capture sgtl5000-1 [] Subdevices: 1/1 Subdevice #0: subdevice #0
I also tried:
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index 365d9d2..b4a527d 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -601,24 +601,21 @@ static const struct snd_soc_dai_ops mxs_saif_dai_ops = { .set_fmt = mxs_saif_set_dai_fmt, };
-static int mxs_saif_dai_probe(struct snd_soc_dai *dai) +static struct snd_soc_dai_driver mxs_saif_dai[] = { { - struct mxs_saif *saif = dev_get_drvdata(dai->dev); - - snd_soc_dai_set_drvdata(dai, saif); - - return 0; -} - -static struct snd_soc_dai_driver mxs_saif_dai = { - .name = "mxs-saif", - .probe = mxs_saif_dai_probe, + .name = "saif0", + .id = 0, .playback = { .channels_min = 2, .channels_max = 2, .rates = MXS_SAIF_RATES, .formats = MXS_SAIF_FORMATS, }, + .ops = &mxs_saif_dai_ops, +}, +{ + .name = "saif1", + .id = 1, .capture = { .channels_min = 2, .channels_max = 2, @@ -626,6 +623,7 @@ static struct snd_soc_dai_driver mxs_saif_dai = { .formats = MXS_SAIF_FORMATS, }, .ops = &mxs_saif_dai_ops, +}, };
static irqreturn_t mxs_saif_irq(int irq, void *dev_id) @@ -772,7 +770,8 @@ static int mxs_saif_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, saif);
- ret = snd_soc_register_dai(&pdev->dev, &mxs_saif_dai); + ret = snd_soc_register_dais(&pdev->dev, mxs_saif_dai, + ARRAY_SIZE(mxs_saif_dai)); if (ret) { dev_err(&pdev->dev, "register DAI failed\n"); return ret;