⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 Ƕ

📁 2410uda1341的测试代码
💻
📖 第 1 页 / 共 5 页
字号:
                        s3c2410_dma_config(channel, 2, dcon);</FONT> <BR><FONT 
                        color=red>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
                        &nbsp; s3c2410_dma_set_buffdone_fn(channel, 
                        audio_dmain_done_callback);</FONT> <BR><FONT 
                        color=red>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
                        &nbsp; s3c2410_dma_setflags(channel, flags);</FONT> 
                        <BR><FONT color=red>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
                        &nbsp; &nbsp; s-&gt;dma_ok =1;</FONT> <BR>&nbsp; &nbsp; 
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return ret ; 
                        <BR>&nbsp; &nbsp; &nbsp; &nbsp;} <BR>else <BR>return 1; 
                        <BR>} <BR><BR>&nbsp; 
                        &nbsp;小弟搞uda1341的录音部分已多时,现在终于可以正常播音、录音了,现把驱程公开,希望对正在为此问题烦恼的朋友有所帮助^_^ 
                        <BR><BR>&nbsp; &nbsp;首先说明一下: <BR><BR>1、 
                        驱程源于中国linux公社-&gt;嵌入式linux2.6内核专题: <BR><A 
                        href="http://www.linuxfans.org/nuke/modules.php?name=Forums&amp;file=viewtopic&amp;t=112750&amp;postdays=0&amp;postorder=asc&amp;start=30" 
                        target=_blank>http://www.linuxfans.org/nuke/modules.php?name=Forums&amp;file=viewtopic&amp;t=112750&amp;postdays=0&amp;postorder=asc&amp;start=30</A> 
                        <BR>上的牛貼,稍加修改就可以使用madplay正常播放mp3,但它提供的源码录音部分没做好。 
                        <BR><BR>2、 
                        小弟参考网上其它大虾的讨论和三星、uda1341的datasheet修改了驱动程序(见红色部分),其中smdk2410_audio_read函数中注释了: 
                        <BR>if (ppos != &amp;file-&gt;f_pos) <BR>return -ESPIPE; 
                        <BR>部分是因为此处会造成死锁的现象,也就是经常在网上看到的: <BR>cat: Read error: 
                        Illegal seek <BR><BR>3、 按照第2步修改了驱动程序后还是不行,出现: <BR>&nbsp; 
                        &nbsp;dma1: loadbuffer:timeout loading buffer 
                        <BR>的错误,一直没搞清楚为什么。 <BR>&nbsp; 
                        &nbsp;最后,参考华恒提供的uda13800驱程,修改了dcon寄存器的配置(如蓝色部分),困扰了我一个月的问题终于解决了^_^ 
                        <BR><BR>&nbsp; &nbsp;借此机会,想向各位刚入门的朋友提点建议: 
                        <BR>1、不要一味的找现在(最好是什么都不用修改)的驱动程序,世界上没有免费的午餐。好好的研究一下驱程并大胆的去修改驱程才会学到更多东西。我在找工的时候总被问到的一个问题是:你在移植哪一部分的时候收获最大,你都移植了些什么,为什么要这样移植? 
                        <BR><BR>2、在发贴之前先看一下论坛上的精华贴。我经常看到同一个问题有不少的人重重复复的去问题,其实问题的答案早在以前的精华贴里。 
                        <BR><BR>3、要学会提问的技巧,不要问“详细移植过程”之类的问题,这应该是最令人讨厌的问题,相信没有几个人愿意回答。问问题的时候把问题写清楚,把出错的提示信息也贴出来,不然的话人家想帮你都难。 
                        <BR><BR>4、不要什么问题都发贴问人,或者已经发贴问人但没人回复的话也不要再发无谓的贴了,自己有能力解决的问题最好留给自己来解决。不要指望别人像老师一样帮你,别人只能提点一下,其它的就要靠你自己了,这是我的切身体会。 
                        <BR><BR><BR>5、饮水要思源,大家把问题解决后希望都写一下总结或把方法往论坛上贴一贴,这样可以帮到更多的人。应该有不少人从论坛上得到帮助的吧,但为何没几个人把解决方法给贴一贴呢,中国人应该互相帮助嘛^_^ 
                        <BR><BR>&nbsp; 
                        &nbsp;顺便提一下,请不要把问题发到我邮箱了,我一般是不回的。直接把它发到论坛上去吧,或许你遇到的问题别人也可能会遇到,然后你们可以互相讨论、互相帮忙。 
                        <BR>&nbsp; 
                        &nbsp;回想我找工的期间,每天打开邮箱都有新邮箱,打开一看都是提问,还以为是哪间公司叫我笔试、面试了,那心情真是失望透顶了~_~</FONT></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width="100%">
                    <TBODY>
                    <TR>
                      <TD><BR><BR><BR></TD></TR></TBODY></TABLE></FONT><BR></TD>
                <TD width=16></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD class=bottomline vAlign=bottom bgColor=#f8f8f8>
            <HR width="100%" color=#000000 SIZE=1>

            <TABLE cellSpacing=0 cellPadding=0 width="100%">
              <TBODY>
              <TR>
                <TD vAlign=bottom><FONT color=#555555>  <IMG height=15 
                  alt=发贴时间 
                  src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/posttime.gif" 
                  width=16 align=absMiddle>2006/11/17 06:48pm <IMG height=15 
                  alt="此 IP 为代理服务器" src="" width=13 align=absMiddle>IP: 
                  已设置保密</FONT></TD>
                <TD vAlign=bottom align=right width=110 nowarp></TD></FORM>
                <TD vAlign=bottom align=right 
        width=4></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
    <TD width=1 bgColor=#000000 height=24></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="97%" align=center bgColor=#000000>
  <TBODY>
  <TR>
    <TD height=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="97%" align=center>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000 height=24></TD>
    <TD bgColor=#eff3f9>
      <TABLE cellSpacing=5 cellPadding=4 width="100%" bgColor=#eff3f9>
        <TBODY>
        <TR>
          <TD vAlign=top width=160 bgColor=#eff3f9 rowSpan=2>
            <TABLE 
              style="FILTER: glow(color=,direction=135)">&nbsp;<FONT><B>mail1&nbsp;</B>
              <TBODY></TBODY></TABLE><FONT color=#555555>&nbsp;头衔: 
            活跃分子</FONT><BR><FONT color=#333333>&nbsp;</FONT> <BR><BR><A title=侠客 
            href="http://www.hhcn.com/cgi-bin/lookinfo.cgi?action=style" 
            target=_blank><IMG 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/pips1.gif" 
            width=100 border=0></A> <BR><FONT color=#555555>信息: <IMG 
            alt=该用户目前不在线 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/offline1.gif" 
            width=15 align=absMiddle> <IMG alt=此人为认证用户 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/teamrz.gif" 
            width=16 align=absMiddle> </FONT><BR><FONT color=#333333>威望: 
            +9</FONT> <BR><FONT color=#555555>来自: 保密 <IMG height=14 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/blank.gif" 
            align=absMiddle></FONT> <BR><FONT color=#333333>总发贴数: <B>24</B> 
            篇</FONT> <BR><FONT title="在线: 50989 秒" color=#555555>注册日期: 
            2006/09/11</FONT><BR></FONT></TD>
          <TD width=1 bgColor=#eff3f9 height="100%" rowSpan=2>
            <TABLE height="100%" cellSpacing=0 cellPadding=0 width=1 
            bgColor=#9898ba>
              <TBODY>
              <TR>
                <TD width=1></TD></TR></TBODY></TABLE></TD>
          <TD vAlign=top width=* bgColor=#eff3f9 height="100%"><SPAN 
            title=发送一个短消息给mail1 style="CURSOR: hand" 
            onclick="javascript:openScript('messanger.cgi?action=new&amp;touser=mail1',420,320)"><IMG 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/message.gif" 
            width=16 align=absMiddle border=0>消息</SPAN> <A title=查看mail1的个人资料 
            href="http://www.hhcn.com/cgi-bin/profile.cgi?action=show&amp;member=mail1"><IMG 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/profile.gif" 
            width=16 align=absMiddle border=0>查看</A> <A title=搜索mail1在本分论坛的全部贴子 
            href="http://www.hhcn.com/cgi-bin/search.cgi?action=startsearch&amp;TYPE_OF_SEARCH=username_search&amp;NAME_SEARCH=topictitle_search&amp;FORUMS_TO_SEARCH=3&amp;SEARCH_STRING=mail1" 
            target=_blank><IMG 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/find.gif" 
            width=16 align=absMiddle border=0>搜索</A> <SPAN title=加mail1为我的好友 
            style="CURSOR: hand" 
            onclick="javascript:openScript('friendlist.cgi?action=adduser&amp;adduser=mail1',420,320)"><IMG 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/friend.gif" 
            width=16 align=absMiddle border=0>好友</SPAN> <A title=复制这个贴子 
            href="http://www.hhcn.com/cgi-bin/post.cgi?action=copy1&amp;forum=3&amp;topic=613&amp;postno=2"><IMG 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/copy.gif" 
            width=16 align=absMiddle border=0>复制</A> <A title=引用回复这个贴子 
            href="http://www.hhcn.com/cgi-bin/post.cgi?action=replyquote&amp;forum=3&amp;topic=613&amp;postno=2"><IMG 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/reply.gif" 
            width=16 align=absMiddle border=0>引用</A> <A 
            href="http://www.hhcn.com/cgi-bin/post.cgi?action=reply&amp;forum=3&amp;topic=613"><IMG 
            alt=回复贴子 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/replynow.gif" 
            width=16 border=0>回复</A> <BR>
            <HR width="100%" color=#000000 SIZE=1>

            <TABLE style="TABLE-LAYOUT: fixed" cellSpacing=0 cellPadding=0 
            width="100%">
              <TBODY>
              <TR>
                <TD vAlign=top width=32><IMG 
                  src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/00.gif">&nbsp;</TD>
                <TD style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word">
                  <TABLE style="TABLE-LAYOUT: fixed" height=70 cellSpacing=0 
                  cellPadding=0 width="100%">
                    <TBODY>
                    <TR vAlign=top>
                      <TD 
                        style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word"><FONT 
                        color=#333333>luofuchong 
                        大大,俺昨天下午也发现了DMA控制寄存器的配置问题,修改完下班因为晚上有事,今天才上班测试,也正常了。实际上输出部分不变,即按照原先 
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dcon = (1&lt;&lt;31); 
                        <BR>输入部分改为如下:<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dcon 
                        = (1&lt;&lt;31) | (2&lt;&lt;24); 即可
                        <P>如果早知道这样,我早就查资料比对寄存器配置了,老是上网在不同代码间比来比去,耽误了不少时间。<BR>多谢大大的慷慨共享,有什么信息多交流。俺EMAIL:hellopeople@126.com</P></FONT></TD></TR></TBODY></TABLE>
                  <TABLE cellSpacing=0 cellPadding=0 width="100%">
                    <TBODY>
                    <TR>
                      <TD><BR><BR><BR></TD></TR></TBODY></TABLE></FONT><BR></TD>
                <TD width=16></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD class=bottomline vAlign=bottom bgColor=#eff3f9>
            <HR width="100%" color=#000000 SIZE=1>

            <TABLE cellSpacing=0 cellPadding=0 width="100%">
              <TBODY>
              <TR>
                <TD vAlign=bottom><FONT color=#333333>  <IMG height=15 
                  alt=发贴时间 
                  src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/posttime.gif" 
                  width=16 align=absMiddle>2006/11/21 09:16am <IMG height=15 
                  alt="此 IP 为代理服务器" 
                  src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/ip.gif" 
                  width=13 align=absMiddle>IP: 已设置保密</FONT></TD>
                <TD vAlign=bottom align=right width=110 nowarp></TD></FORM>
                <TD vAlign=bottom align=right 
        width=4></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
    <TD width=1 bgColor=#000000 height=24></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="97%" align=center bgColor=#000000>
  <TBODY>
  <TR>
    <TD height=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="97%" align=center>
  <TBODY>
  <TR>
    <TD width=1 bgColor=#000000 height=24></TD>
    <TD bgColor=#f8f8f8>
      <TABLE cellSpacing=5 cellPadding=4 width="100%" bgColor=#f8f8f8>
        <TBODY>
        <TR>
          <TD vAlign=top width=160 bgColor=#f8f8f8 rowSpan=2>
            <TABLE 
              style="FILTER: glow(color=#9898BA,direction=135)">&nbsp;<FONT 
              color=#000066><B>hn&nbsp;</B>
              <TBODY></TBODY></TABLE><FONT color=#555555>&nbsp;   -* 未注册 
            *-</FONT><BR><FONT color=#333333>&nbsp;</FONT> <BR><BR><BR><A 
            title=未知 
            href="http://www.hhcn.com/cgi-bin/lookinfo.cgi?action=style" 
            target=_blank></A><BR><FONT color=#555555>信息: <IMG alt=该用户目前不在线 
            src="嵌入式LINUX-2_6内核技术 - uda1341驱程共享(支持放音、录音).files/offline1.gif" 
            width=15 align=absMiddle> </FONT><BR><FONT color=#333333>威望: 
            未知</FONT> <BR><FONT color=#555555>来自: 未知</FONT> <BR><FONT 
            color=#333333>总发贴数: <B>0</B> 篇</FONT> <BR><FONT title="在线: 0 秒" 
            color=#555555>注册日期: 未知</FONT><BR></FONT></TD>
          <TD width=1 bgColor=#f8f8f8 height="100%" rowSpan=2>
            <TABLE height="100%" cellSpacing=0 cellPadding=0 width=1 
            bgColor=#9898ba>
              <TBODY>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -