Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* why error return in sound/soc/codecs/pcm3168a.c::pcm3168a_set_dai_fmt ?
@ 2019-06-04  6:37 Jurgen Lambrecht
  2019-07-01 13:06 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Jurgen Lambrecht @ 2019-06-04  6:37 UTC (permalink / raw)
  To: alexandre.belloni@bootlin.com, alsa-devel@alsa-project.org

Hi,

When following 
https://bootlin.com/blog/eight-channels-audio-on-i-mx7-with-pcm3168/ I 
get this error (from soc_core.c):

... kernel: [    3.059634][   T15] pcm3168a 3-0039: ASoC: Failed to set 
DAI format: -22

I could propose this patch (I get that printf when applying the patch)
(all other errors in that file have a printf):

diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 08d3fe192e65..75ccbb919902 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -353,6 +353,7 @@ static int pcm3168a_set_dai_fmt(struct snd_soc_dai *dai,
         case SND_SOC_DAIFMT_NB_NF:
                 break;
         default:
+               dev_err(component->dev, "wrong INV_MASK\n");
                 return -EINVAL;
         }

But why does this code returns an error for code that has no effect?
OK, it could be because SND_SOC_DAIFMT_INV_MASK must be 
SND_SOC_DAIFMT_NB_NF. But then Alexandre's blog contains an error, 
because the dac TDM sets frame-inversion in its dts (and it should not).

-- 

Kind Regards,

*Jürgen Lambrecht*
R&D Associate

Tel: +32 51 303045

www.televic-rail.com <https://www.televic-rail.com>

Televic Rail NV - Leo Bekaertlaan 1 - 8870 Izegem - Belgium
Company number 0825 539 581 - RPR Kortrijk

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-01 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-04  6:37 why error return in sound/soc/codecs/pcm3168a.c::pcm3168a_set_dai_fmt ? Jurgen Lambrecht
2019-07-01 13:06 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox