免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1461 | 回复: 0
打印 上一主题 下一主题

how to develop your own alsa sound card driver [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-16 09:36 |只看该作者 |倒序浏览
--------------------------------------------------------------------
jwoithe - 01-16-06 00:32
--------------------------------------------------------------------
In response to eudoxos' request, here's a *really brief* outline of how I went about deducing the connection layout on the S7020.  Note that there may well be a better, more streamlined way of going about this.  However, this worked for me and was quick.
Firstly you really must get hold of the ALC260 datasheet from Realtek.
This is available for download on the realtek website.  The datasheet details the internal arrangement of the ALC260, the IDs of the various widgets, and what command verbs each widget accepts.  Of particular interest are the widget IDs of the the I/O widgets which connect to physical input/output pins on the chip.  It is these which are in turn connected to jacks, internal speakers etc.
It is also quite helpful to understand the basic details about the HDA system structure and how it all fits together.  This can be acquireed by reading the source code or the HDA docs from Intel (downloadable from their website).
Armed with the widget IDs of interest, I hacked the patch-realtek.c module.  In particular I concentrated on the mixer and initialisation verb structures.  Since I did my tests the structure of patch-realtek has changed slightly, but for the purposes of this exercise changing alc260_base_output_mixer and alc260_init_verbs in the most recent versions of alsa-driver (1.0.11rc1 and later) should be fine.
To discover the output routings, add mixer controls for all the output widgets of the ALC260 chip to the mixer definition - alc260_base_output_mixer in this case.  Then add initialisation verbs for each of these widgets to the alc260_init_verbs list, making each of them an output.  Recompile and insert the new hda-* modules.
Use aplay (or anything really) to send output to the chip.  Then play with the controls in alsamixer until you discover which control sends output to what.
The technique for input jacks is pretty much the same, but this time you're configuring widgets for input and using a capture program instead of a player.  It's most convenient to use one which has input level meters of some kind so you can monitor what the chip ADC is seeing as you change the capture source in alsamixer.
At the end of all this you should end up with a list of widgets and which jacks/devices each is connected to.  This can then be used to construct a new ALC260 model in patch-realtek.c in a similar way as for the existing HP and Fujitsu models.
If you require more details, please contact me via the alsa-devel mailing list and we'll pick this up off-list.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4353/showart_68193.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP