Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    D1 DMIC+AMIC同时读取,系统出现kernel panic

    MR Series
    3
    10
    3591
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      diguago LV 3 last edited by

      123.png

      首先打开dmic(hw:1,0)和AMIC(hw:0,0)
      snd_pcm_open(&capture_handle, "hw:1,0", SND_PCM_STREAM_CAPTURE, 0));

      snd_pcm_open(&ref_handle, "hw:0,0", SND_PCM_STREAM_CAPTURE, 0));

      配置hw_params

      然后读取数据
      snd_pcm_readi(capture_handle, buffer, buffer_frames)
      snd_pcm_readi(ref_handle, ref_buffer, buffer_frames)
      出现kernel panic

      xiaowenge 1 Reply Last reply Reply Quote Share 0
      • xiaowenge
        DOT小文哥 LV 8 @diguago last edited by

        @diguago 必现吗?用的sipeed那里买的麦克风子板?

        D 3 Replies Last reply Reply Quote Share 0
        • D
          diguago LV 3 @xiaowenge last edited by

          @xiaowenge 必现,hw_param配置:interleaved,16000,S16_LE,DMIC2路,AMIC3路,

          1 Reply Last reply Reply Quote Share 0
          • D
            diguago LV 3 @xiaowenge last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote Share 0
            • D
              diguago LV 3 @xiaowenge last edited by

              @xiaowenge 是Sipeed的板子
              hw_params: rate 16000, format S16_LE, access Interleaved, chan_num DMIC3路,AMIC2路

              xiaowenge 1 Reply Last reply Reply Quote Share 0
              • xiaowenge
                DOT小文哥 LV 8 @diguago last edited by

                @diguago sipeed的板子有贴两种mic?

                xiaowenge 1 Reply Last reply Reply Quote Share 0
                • xiaowenge
                  DOT小文哥 LV 8 @xiaowenge last edited by xiaowenge

                  哦哦,2路amic当回路是吧?
                  //使用arecord命令,在设备硬件设备snddmic上录一个采样率为16000、格式为S16_LE、6声道的音频文件,存到/tmp/test.wav
                  arecord -D hw:snddmic -r 16000 -f S16_LE -c 6 /tmp/test.wav
                  试下能不能录到音,确认一下硬件是不是坏的

                  D 2 Replies Last reply Reply Quote Share 0
                  • D
                    diguago LV 3 @xiaowenge last edited by

                    @xiaowenge arecord是可以的,都可以录制AMIC和DMIC

                    1 Reply Last reply Reply Quote Share 0
                    • D
                      diguago LV 3 @xiaowenge last edited by

                      @xiaowenge 自己相同的代码我录制dmic是好的,只是open时把hw:1,0改成hw:0,0就kernel panic了

                      C 1 Reply Last reply Reply Quote Share 0
                      • C
                        copydog LV 2 @diguago last edited by

                        @diguago 能提供一份可以复现问题的简单示例代码吗?单纯用 arecord 无法复现,而且看上面截图,引起 panic 的是 PID 为 1 的 init 进程,这个是怎么跟录音关联起来的?

                        1 Reply Last reply Reply Quote Share 0
                        • 1 / 1
                        • First post
                          Last post

                        Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                        行为准则 | 用户协议 | 隐私权政策