You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get noise when aplay on BYT-rt5651 platform. #1208
@lgirdwood Yes, codec can copy the data from one channel to the other channel or mix L/R together and output to both L/R channels. @Jiangxinx Could you use LR_48k.zip to see if the L/R channel are output separated or not?
Regarding the frequency issue, could you measure the physical frequency of LRCK, BCLK, and MCLK?
Also, could you add #define DEBUG in rt5651.c and attach the dmesg output here?
@Jiangxinx When doing error recordings please use low enough recording gain so that recording is not clipped to full scale as this is. Also mp3 encoding is not a recommended format. It's a lossy coding that does not preserve the waveform shape. Please use flac or wav format.
But I think the mp3 is representative enough to say that the effect that is heard is not wrong frequency (e.g. pitch shift perceived) but quite bad corruption. If the used format would be lossless e.g. buffer discontinuity errors would be visible. But mp3 format blurs such details.
@bardliao I tried LR_48K using the daily version ofter enable DEBUG in rt5651.c, L/R channel are not separated and can hear the wrong frequency sound when aplay.
Dmesg after enable DEBUG:
[ 819.097328] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 12096 DAI position 1766016
[ 819.128297] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.128320] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.128326] sof-audio-acpi 80860F28:01: posn : host 0x1e00 dai 0x69cd80 wall 0x14aa2261
[ 819.128338] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 1920 DAI position 1733472
[ 819.128355] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.128628] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 1920 DAI position 1733472
[ 819.180699] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.180728] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.180738] sof-audio-acpi 80860F28:01: posn : host 0x0 dai 0x6c4800 wall 0x1526181e
[ 819.180758] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 0 DAI position 1774080
[ 819.180790] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.181292] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 0 DAI position 1774080
[ 819.212716] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.212747] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.212760] sof-audio-acpi 80860F28:01: posn : host 0x5d00 dai 0x6a4b80 wall 0x14c2be99
[ 819.212783] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 5952 DAI position 1741536
[ 819.212814] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.213004] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 5952 DAI position 1741536
[ 819.264706] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.264737] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.264750] sof-audio-acpi 80860F28:01: posn : host 0x3f00 dai 0x6cc600 wall 0x153eb420
[ 819.264772] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 4032 DAI position 1782144
[ 819.264807] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.265268] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 4032 DAI position 1782144
[ 819.296745] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.296776] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.296788] sof-audio-acpi 80860F28:01: posn : host 0x9c00 dai 0x6ac980 wall 0x14db5a92
[ 819.296811] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 9984 DAI position 1749600
[ 819.296843] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.297028] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 9984 DAI position 1749600
[ 819.305442] sof-audio-acpi 80860F28:01: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 819.305454] sof-audio-acpi 80860F28:01: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 819.348768] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.348797] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.348807] sof-audio-acpi 80860F28:01: posn : host 0x7e00 dai 0x6d4400 wall 0x15575021
[ 819.348827] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 8064 DAI position 1790208
[ 819.348858] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.349457] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 8064 DAI position 1790208
[ 819.380777] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.380808] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.380820] sof-audio-acpi 80860F28:01: posn : host 0xdb00 dai 0x6b4780 wall 0x14f3f69c
[ 819.380843] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 14016 DAI position 1757664
[ 819.380876] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.381057] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 14016 DAI position 1757664
[ 819.432775] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.432806] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.432818] sof-audio-acpi 80860F28:01: posn : host 0xbd00 dai 0x6dc200 wall 0x156fec19
[ 819.432841] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 12096 DAI position 1798272
[ 819.432877] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.433269] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 12096 DAI position 1798272
[ 819.464809] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.464840] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.464854] sof-audio-acpi 80860F28:01: posn : host 0x1b00 dai 0x6bc580 wall 0x150c9298
[ 819.464863] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 1728 DAI position 1765728
[ 819.464875] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.465006] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 1728 DAI position 1765728
[ 819.516806] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.516837] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.516841] sof-audio-acpi 80860F28:01: posn : host 0x0 dai 0x6e4000 wall 0x15888816
[ 819.516851] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 0 DAI position 1806336
[ 819.516883] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.517572] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 0 DAI position 1806336
[ 819.548843] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.548875] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.548879] sof-audio-acpi 80860F28:01: posn : host 0x5a00 dai 0x6c4380 wall 0x15252e9c
[ 819.548897] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 5760 DAI position 1773792
[ 819.548922] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.549158] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 5760 DAI position 1773792
[ 819.600875] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.600906] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.600918] sof-audio-acpi 80860F28:01: posn : host 0x3f00 dai 0x6ebe00 wall 0x15a1241b
[ 819.600940] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 4032 DAI position 1814400
[ 819.600975] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.601621] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 4032 DAI position 1814400
[ 819.632877] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.632908] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.632921] sof-audio-acpi 80860F28:01: posn : host 0x9900 dai 0x6cc180 wall 0x153dca98
[ 819.632943] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 9792 DAI position 1781856
[ 819.632976] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.633159] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 9792 DAI position 1781856
[ 819.684924] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.684955] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.684967] sof-audio-acpi 80860F28:01: posn : host 0x7e00 dai 0x6f3c00 wall 0x15b9c020
[ 819.684990] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 8064 DAI position 1822464
[ 819.685024] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.685699] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 8064 DAI position 1822464
[ 819.716916] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.716947] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.716959] sof-audio-acpi 80860F28:01: posn : host 0xd800 dai 0x6d3f80 wall 0x15566693
[ 819.716982] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 13824 DAI position 1789920
[ 819.717015] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.717341] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 13824 DAI position 1789920
[ 819.769825] sof-audio-acpi 80860F28:01: ipc rx: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.769856] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a4c
[ 819.769860] sof-audio-acpi 80860F28:01: posn : host 0xbd00 dai 0x6fba00 wall 0x15d25c23
[ 819.769868] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 12096 DAI position 1830528
[ 819.769877] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a000d: GLB_STREAM_MSG: POSITION
[ 819.770120] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 1 DMA position 12096 DAI position 1830528
[ 819.800550] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.800569] sof-audio-acpi 80860F28:01: posn mailbox: posn offset is 0x144a00
[ 819.800575] sof-audio-acpi 80860F28:01: posn : host 0x1800 dai 0x6dbd80 wall 0x156f0270
[ 819.800583] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 1536 DAI position 1797984
[ 819.800590] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 819.800820] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 1536 DAI position 1797984
@Jiangxinx All LRCK/BCLK/MCLK looks the same? And the frequency is very low. Could you double check it?
Regarding the dmesg, there are too many sof logs. Could you remove ccflags-y += -DDEBUG from linux/sound/soc/sof/Makefile and get the dmesg again?
Thanks.
@bardliao Retested the aplay function after removed ccflags-y += -DDEBUG, and attach dmesg info below.By the way,i have checked the LRCK/BCLK/MCLK again, and got the same results.
@Jiangxinx Are the oscilloscope pictures above just mains interference, 50 Hz?
Yep, and given LRCLK, BCLK and MCLK are all 50Hz means @Jiangxinx your scope is not correctly connected to the signals and grounded. Please also make sure the playback is enabled and running too (since scopes will "autodetect" the mains if nothing else is propagating).
@lgirdwood don't now about scope grounding, but I just got mb&rt5651 playing first time and the audio is complete bogus. it is like really low frequency brittle or anyway something very difficult to describe. I can switch between hp and speaker so I think my alsamixer setup is at least somehow correct.
@Jiangxinx did you update SW in between the tests? I don't get why removing DDEBUG would cause error. I mean your first log doesn't contain error and I guess the streaming should not even start if you get this...?
@Jiangxinx@bardliao I have the same error, but it's coming always after streaming when "stop" is triggered. For e.g. I have a experimental pm setup where I'm loading topology always from scratch when streaming starts. So in my opinion this error should not be the cause of corrupted sound...
@Jiangxinx did you update SW in between the tests? I don't get why removing DDEBUG would cause error. I mean your first log doesn't contain error and I guess the streaming should not even start if you get this...?
@juimonen I think we didn't see the error in the first log is that there are too many logs and it exceeds the buffer of dmesg. So we can only see the recent log.
@bardliao yes understood it also later... would it be possible for you to check we are setting the codec parameters ok? Otherwise I can't think of anything else than the dma to dsp is different in this platform and/or we are copying some total garbage to codec.
@bardliao sorry to confuse you, I think there's no issue with the codec. I had myself some issues with the build system (I think I was building some garbage firmware) see my comments in: #1215
changed the title [-]Hear the wrong frequency sound when aplay correct params on BYT-rt5651 platform.[/-][+]Noise when aplay correct params on BYT-rt5651 platform.[/+]on Apr 4, 2019
mark as duplicate of #1215 . @tlauda@juimonen please move covnversation to #1215. @Jiangxinx please provide testing support to #1215 and reopen this bug if you can still reproduce it after #1215 is fixed.
Activity
tlauda commentedon Apr 1, 2019
@Jiangxinx Please always add logs. There is no point in creating an issue without dmesg and FW logs. What is the repro ratio?
lgirdwood commentedon Apr 1, 2019
@Jiangxinx L/R look similarly corrupted. @bardliao could this be codec misconfiguration ?
bardliao commentedon Apr 1, 2019
@lgirdwood Yes, codec can copy the data from one channel to the other channel or mix L/R together and output to both L/R channels. @Jiangxinx Could you use LR_48k.zip to see if the L/R channel are output separated or not?
Regarding the frequency issue, could you measure the physical frequency of LRCK, BCLK, and MCLK?
Also, could you add
#define DEBUGin rt5651.c and attach the dmesg output here?singalsu commentedon Apr 2, 2019
@Jiangxinx When doing error recordings please use low enough recording gain so that recording is not clipped to full scale as this is. Also mp3 encoding is not a recommended format. It's a lossy coding that does not preserve the waveform shape. Please use flac or wav format.
But I think the mp3 is representative enough to say that the effect that is heard is not wrong frequency (e.g. pitch shift perceived) but quite bad corruption. If the used format would be lossless e.g. buffer discontinuity errors would be visible. But mp3 format blurs such details.
Jiangxinx commentedon Apr 2, 2019
@bardliao I tried LR_48K using the daily version ofter enable DEBUG in rt5651.c, L/R channel are not separated and can hear the wrong frequency sound when aplay.
Dmesg after enable DEBUG:
Log file:
dmesg.log
LRCK:

BCLK:

MCLK:

bardliao commentedon Apr 2, 2019
@Jiangxinx All LRCK/BCLK/MCLK looks the same? And the frequency is very low. Could you double check it?
Regarding the dmesg, there are too many sof logs. Could you remove
ccflags-y += -DDEBUGfrom linux/sound/soc/sof/Makefile and get the dmesg again?Thanks.
Jiangxinx commentedon Apr 2, 2019
@bardliao Retested the aplay function after removed ccflags-y += -DDEBUG, and attach dmesg info below.By the way,i have checked the LRCK/BCLK/MCLK again, and got the same results.
Git diff:
dmesg:
Log file:
dmesg.log
singalsu commentedon Apr 2, 2019
@Jiangxinx Are the oscilloscope pictures above just mains interference, 50 Hz?
lgirdwood commentedon Apr 2, 2019
Yep, and given LRCLK, BCLK and MCLK are all 50Hz means @Jiangxinx your scope is not correctly connected to the signals and grounded. Please also make sure the playback is enabled and running too (since scopes will "autodetect" the mains if nothing else is propagating).
juimonen commentedon Apr 2, 2019
@lgirdwood don't now about scope grounding, but I just got mb&rt5651 playing first time and the audio is complete bogus. it is like really low frequency brittle or anyway something very difficult to describe. I can switch between hp and speaker so I think my alsamixer setup is at least somehow correct.
bardliao commentedon Apr 2, 2019
@lgirdwood
Does it mean there are something wrong on FW?
lgirdwood commentedon Apr 2, 2019
@bardliao yes, also something wrong with FW here too or driver here too.
1 remaining item
juimonen commentedon Apr 3, 2019
@Jiangxinx did you update SW in between the tests? I don't get why removing DDEBUG would cause error. I mean your first log doesn't contain error and I guess the streaming should not even start if you get this...?
juimonen commentedon Apr 3, 2019
@Jiangxinx @bardliao I have the same error, but it's coming always after streaming when "stop" is triggered. For e.g. I have a experimental pm setup where I'm loading topology always from scratch when streaming starts. So in my opinion this error should not be the cause of corrupted sound...
bardliao commentedon Apr 3, 2019
@juimonen I think we didn't see the error in the first log is that there are too many logs and it exceeds the buffer of dmesg. So we can only see the recent log.
juimonen commentedon Apr 3, 2019
@bardliao yes understood it also later... would it be possible for you to check we are setting the codec parameters ok? Otherwise I can't think of anything else than the dma to dsp is different in this platform and/or we are copying some total garbage to codec.
juimonen commentedon Apr 3, 2019
@bardliao sorry to confuse you, I think there's no issue with the codec. I had myself some issues with the build system (I think I was building some garbage firmware) see my comments in: #1215
[-]Hear the wrong frequency sound when aplay correct params on BYT-rt5651 platform.[/-][+]Noise when aplay correct params on BYT-rt5651 platform.[/+][-]Noise when aplay correct params on BYT-rt5651 platform.[/-][+]Get noise when aplay on BYT-rt5651 platform.[/+]bardliao commentedon Apr 4, 2019
@juimonen No problem. Hope it can be fixed soon :)
wenqingfu commentedon Apr 4, 2019
@juimonen , is this a duplicate of #1215?
juimonen commentedon Apr 4, 2019
@wenqingfu not 100% sure but really looks like it.
wenqingfu commentedon Apr 4, 2019
mark as duplicate of #1215 . @tlauda @juimonen please move covnversation to #1215. @Jiangxinx please provide testing support to #1215 and reopen this bug if you can still reproduce it after #1215 is fixed.