Menu

Switch to the dark mode that's kinder on your eyes at night time.

Switch to the light mode that's kinder on your eyes at day time.

Switch to the dark mode that's kinder on your eyes at night time.

Switch to the light mode that's kinder on your eyes at day time.

in ,

Still debugging youuuu! Yep, still figuring out how to get I2S audio working on STM32F7


More debugging… I was out of luck because nxplayer just blocks when I tried to play some audio, so I modified nxplayer_main.c to just read the argument from argv(1) and play it. This way I could start up nxplayer in background and run dmesg to see what is happening:

NuttShell (NSH) NuttX-12.5.1                                                    
nsh> mount -t tmpfs /tmp                                                        
nsh> rz                                                                         
**B0800000000022d                                                               
nsh> ls /tmp                                                                    
/tmp:                                                                           
 yes.wav                                                                        
nsh> dmesg                                                                      
board_cs4344_initialize: minor 0                                                
stm32_i2sbus_initialize: port: 2                                                
i2s_dump_regs: I2S2: After initialization                                       
i2s_dump_regs:     CR1:0000    CR2:0700     SR:0002      DR:0000                
i2s_dump_regs:     I2SCFGR:0000    I2SPR:0002                                   
i2s_dump_regs:     PLLI2SCFGR:44013000                                          
cs4344_reset: WARNING: MCLK could not be set on lower half                      
i2s_mckdivider: Entry                                                           
i2s_dump_regs: I2S2: After i2s_mckdivider                                       
i2s_dump_regs:     CR1:0000    CR2:0700     SR:0002      DR:0000                
i2s_dump_regs:     I2SCFGR:0e00    I2SPR:020d                                   
i2s_dump_regs:     PLLI2SCFGR:20003540                                          
cs4344_setbitrate: sample rate=16000 nchannels=1 bpsamp=16                      
audio_register: Registering /dev/audio/pcm0                                     
nsh> nxplayer /tmp/yes.wav &                                                    
nxplayer (10:100)                                                               
nsh> NxPlayer version 1.05                                                      
h for commands, q to exit                                                       
                                                                                
                                                                                
nsh> dmesg                                                                      
   0x46464952                                                                   
pcm_dump:     Chunk Size:      4292                                             
pcm_dump:     Format:          0x45564157                                       
pcm_dump:   Format Chunk:                                                       
pcm_dump:     Chunk ID:        0x20746d66                                       
pcm_dump:     Chunk Size:      16                                               
pcm_dump:     Audio Format:    0x0001                                           
pcm_dump:     Num. Channels:   1                                                
pcm_dump:     Sample Rate:     8000                                             
pcm_dump:     Byte Rate:       16000                                            
pcm_dump:     Block Align:     2                                                
pcm_dump:     Bits Per Sample: 16                                               
pcm_dump:   Data Chunk:                                                         
pcm_dump:     Chunk ID:        0x61746164                                       
pcm_dump:     Chunk Size:      4256                                             
cs4344_configure: ac_type: 2                                                    
cs4344_configure:   AUDIO_TYPE_OUTPUT:                                          
cs4344_configure:     Number of channels: 1                                     
cs4344_configure:     Sample rate:        8000                                  
cs4344_configure:     Sample width:       16                                    
cs4344_configure: ERROR: Unsupported combination of sample rate anddata width   
pcm_enqueuebuffer: ERROR: Failed to set PCM configuration: -22                  
nxplayer_enqueuebuffer: ERROR: AUDIOIOC_ENQUEUEBUFFER ioctl failed: 22          
nxplayer_playthread: 0 buffers queued, running=1 streaming=0                    
nxplayer_playthread: Playing...                                                 
nsh>

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

GIPHY App Key not set. Please check settings

NTFS Filesystem: Alternate Data Stream (ADS)

NY governor says cyberattack on legislative office is holding up state budget

Back to Top
close

Log In

Forgot password?

Forgot password?

Enter your account data and we will send you a link to reset your password.

Your password reset link appears to be invalid or expired.

Log in

Privacy Policy

To use social login you have to agree with the storage and handling of your data by this website. %privacy_policy%

Add to Collection

No Collections

Here you'll find all collections you've created before.