Re: NULL pointer dereference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin,

I have used the same agrsm tarball you use and the modem
works Ok for the kernels 2.6.28-2.6.31. I use vanilla linux
kernels only, not the ones supplied with Ubuntu. I don't know if
it matters or not, I am just mentioning it because people who
had problems with this particular driver/modem usually have Ubuntu
branded kernels.

Please see my included ModemData.txt for comparison:
$ diff -Naur yourModemData.txt myModemData.txt | vi -
or something like that.

Please try to build/install/load the driver with the included hda_codec.h
Maybe it will help.

Also, IMHO the instructions at
http://linmodems.technion.ac.il/packages/ltmodem/11c11040/HOWTO-Agere-11c11040-HDA.html
are outdated.

Another thing to mention: Once the driver crapped out on you with the NULL
complaint like this:

> >>>> [ 1794.432654] BUG: unable to handle kernel NULL pointer dereference at 00000168

the game is over - you need to reboot the laptop if you want to continue playing
with the driver, load/unload other modules, etc. NULL pointer dereference
has an unpredictable effect on the running kernel as a whole.

-- 
Nick Zhuravlev
www.auriga.com


On Tue, Feb 02, 2010 at 05:53:43PM -0200, Kevin Fernandez <siegfri3d@xxxxxxxxx> wrote:

> Same result:
> [ 1327.264918] agrmodem: disagrees about version of symbol snd_cards
> [ 1327.264929] agrmodem: Unknown symbol snd_cards
> [ 1327.266032] agrmodem: disagrees about version of symbol snd_hda_codec_read
> [ 1327.266039] agrmodem: Unknown symbol snd_hda_codec_read
> [ 1327.266576] agrmodem: disagrees about version of symbol snd_hda_codec_write
> [ 1327.266582] agrmodem: Unknown symbol snd_hda_codec_write
> [ 1429.327198] agrmodem: disagrees about version of symbol snd_cards
> [ 1429.327204] agrmodem: Unknown symbol snd_cards
> [ 1429.327722] agrmodem: disagrees about version of symbol snd_hda_codec_read
> [ 1429.327725] agrmodem: Unknown symbol snd_hda_codec_read
> [ 1429.327992] agrmodem: disagrees about version of symbol snd_hda_codec_write
> [ 1429.327995] agrmodem: Unknown symbol snd_hda_codec_write
> 
> by the way my ubuntu kernel is unchanged, i didn't add the things
> written in: http://linmodems.technion.ac.il/packages/ltmodem/11c11040/HOWTO-Agere-11c11040-HDA.html
> as the kernel module wasn't compiling after.
> 
> Thanks!
> Kevin
> 
> 2010/2/2 Bjorn Wielens <Uniacke1@xxxxxxxx>:
> > Hi Kevin,
> > Yes, only the alsa-drivers need be built/installed-these are what agrsm
> > interacts with.
> >
> > This may be the result of DKMS's build environment.
> >
> > Can you try building the agrsm drivers from source (not DKMS) too?
> > The package I use on my system is here:
> >
> > http://linmodems.technion.ac.il/packages/ltmodem/11c11040/agrsm-2.6.30.tar.bz2
> >
> > Best,
> > Bjorn.
> >
> > On 02/02/2010 03:35 PM, Kevin Fernandez wrote:
> >> Should I recompile only alsa-drivers 1.0.20?
> >> I've installed it, reinstalled the module with dkms, and got this
> >> while inserting:
> >> FATAL: Error inserting agrmodem
> >> (/lib/modules/2.6.31-18-generic/updates/dkms/agrmodem.ko): Unknown
> >> symbol in module, or unknown parameter (see dmesg
> >>
> >> and in dmesg:
> >>
> >> [  206.082405] agrmodem: disagrees about version of symbol snd_cards
> >> [  206.082415] agrmodem: Unknown symbol snd_cards
> >> [  206.083454] agrmodem: disagrees about version of symbol snd_hda_codec_read
> >> [  206.083460] agrmodem: Unknown symbol snd_hda_codec_read
> >> [  206.084078] agrmodem: disagrees about version of symbol snd_hda_codec_write
> >> [  206.084084] agrmodem: Unknown symbol snd_hda_codec_write
> >>
> >> Thanks!
> >> Kevin
> >>
> >> 2010/2/2 Bjorn Wielens <Uniacke1@xxxxxxxx>:
> >>> Hey,
> >>> Definitely looks like an ALSA issue.... The problem seems to be here:
> >>>
> >>> chip_temp = snd_cards[0]->private_data;  //probe
> >>> bus_temp = chip_temp->bus;
> >>>
> >>> and if I'm not mistaken, the agrsm grabs the snd_cards from ALSA.
> >>>
> >>> Bjorn.
> >>>
> >>> On 02/02/2010 02:43 PM, Kevin Fernandez wrote:
> >>>> Got this output now, after doing what you asked me:
> >>>>
> >>>> [ 1762.812880] Loading module Agere Modem Controller driver version
> >>>> 2.1.80 (2007-10-01)
> >>>> [ 1762.812887] Disabling lock debugging due to kernel taint
> >>>> [ 1765.337117] serial8250_register_ports: BaseAddress 0x8004 Irq 20
> >>>> [ 1765.337124] ttyAGS3 at I/O 0x8004 (irq = 20) is a AgereModem
> >>>> [ 1765.337198] agrserial - ret_val 0, call: lt_modem_ops.init_modem
> >>>> [ 1765.337203] Loading module Agere Modem Interface driver version
> >>>> 2.1.80.0 (2007-10-01)
> >>>> [ 1794.432614] ==> codecType = 0x32
> >>>> [ 1794.432654] BUG: unable to handle kernel NULL pointer dereference at 00000168
> >>>> [ 1794.432666] IP: [<fc97b88d>] HDAdump+0xd/0x80 [agrmodem]
> >>>> [ 1794.432735] *pde = 7eeb3067
> >>>> [ 1794.432743] Oops: 0000 [#1] SMP
> >>>> [ 1794.432751] last sysfs file: /sys/devices/system/cpu/cpu1/topology/core_id
> >>>> [ 1794.432759] Modules linked in: agrserial agrmodem snd_hda_codec
> >>>> snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss
> >>>> snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer
> >>>> snd_seq_device snd soundcore snd_page_alloc wlan_ccmp binfmt_misc
> >>>> ppdev vboxnetflt vboxnetadp vboxdrv isofs udf crc_itu_t joydev
> >>>> iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4
> >>>> iptable_mangle wlan_scan_sta ath_rate_sample iptable_filter ip_tables
> >>>> x_tables uvcvideo videodev v4l1_compat pcmcia psmouse serio_raw
> >>>> sdhci_pci sdhci led_class yenta_socket rsrc_nonstatic pcmcia_core
> >>>> ath_pci wlan ath_hal sbp2 lp parport dm_raid45 xor fbcon tileblit font
> >>>> bitblit softcursor i915 drm i2c_algo_bit ohci1394 ieee1394 r8169 mii
> >>>> intel_agp agpgart video output
> >>>> [ 1794.432918]
> >>>> [ 1794.432927] Pid: 25093, comm: wvdialconf Tainted: P
> >>>> (2.6.31-18-generic #55-Ubuntu) MSI Notebook VR601
> >>>> [ 1794.432935] EIP: 0060:[<fc97b88d>] EFLAGS: 00010296 CPU: 1
> >>>> [ 1794.432993] EIP is at HDAdump+0xd/0x80 [agrmodem]
> >>>> [ 1794.432999] EAX: 00000000 EBX: fca7f0c4 ECX: 00000000 EDX: 00000383
> >>>> [ 1794.433006] ESI: fca7f0c4 EDI: fca7f028 EBP: eda3dcf8 ESP: eda3dcd8
> >>>> [ 1794.433012]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
> >>>> [ 1794.433019] Process wvdialconf (pid: 25093, ti=eda3c000
> >>>> task=edb6bed0 task.ti=eda3c000)
> >>>> [ 1794.433024] Stack:
> >>>> [ 1794.433028]  fc8a500e fca7f0c4 eda3dd00 fc960380 eda3dcf4 eda3dd6f
> >>>> fca7f0c4 fca7f0c4
> >>>> [ 1794.433046] <0> eda3dd00 fc97b908 eda3dd20 fc966769 fca895e9
> >>>> fca895ea eda3dd20 c05718fc
> >>>> [ 1794.433064] <0> fc994dd3 eda3dd6f eda3dd90 fc94f9f1 fca7f0c4
> >>>> fc9f6048 00000008 00000001
> >>>> [ 1794.433084] Call Trace:
> >>>> [ 1794.433144]  [<fc8a500e>] ? x_do_gettimeofday+0xe/0x20 [agrmodem]
> >>>> [ 1794.433240]  [<fc960380>] ? lin_timer_ms+0x12/0x36 [agrmodem]
> >>>> [ 1794.433314]  [<fc97b908>] ? azlGetResourceInformation+0x8/0x20 [agrmodem]
> >>>> [ 1794.433391]  [<fc966769>] ? CAzlIntelInit+0x2d/0x3c4 [agrmodem]
> >>>> [ 1794.433417]  [<c05718fc>] ? printk+0x18/0x1c
> >>>> [ 1794.433504]  [<fc94f9f1>] ? LXHardwareStart+0x11de/0x13fb [agrmodem]
> >>>> [ 1794.433532]  [<c01b7ea5>] ? get_page_from_freelist+0x1c5/0x370
> >>>> [ 1794.433542]  [<c0573cba>] ? _spin_lock_irqsave+0x2a/0x40
> >>>> [ 1794.433629]  [<fc94b1a8>] ? linux_modem_open+0x45/0x10e [agrmodem]
> >>>> [ 1794.433651]  [<c0150bbb>] ? mod_timer+0xcb/0x140
> >>>> [ 1794.433710]  [<fc8a52a8>] ? wrap_linux_modem_open+0x8/0x10 [agrmodem]
> >>>> [ 1794.433768]  [<fc8a5308>] ? modemPortOpen+0x8/0x20 [agrmodem]
> >>>> [ 1794.433780]  [<fcb30fe0>] ? serial8250_startup+0x210/0x380 [agrserial]
> >>>> [ 1794.433791]  [<c039ceb6>] ? uart_startup+0x46/0x140
> >>>> [ 1794.433799]  [<c039d9f2>] ? uart_open+0x102/0x220
> >>>> [ 1794.433809]  [<c0384af3>] ? __tty_open+0x1a3/0x460
> >>>> [ 1794.433817]  [<c0384dcf>] ? tty_open+0x1f/0x40
> >>>> [ 1794.433828]  [<c01eabfd>] ? chrdev_open+0xcd/0x190
> >>>> [ 1794.433837]  [<c01e5bd9>] ? __dentry_open+0xb9/0x230
> >>>> [ 1794.433845]  [<c01e5e35>] ? nameidata_to_filp+0x55/0x70
> >>>> [ 1794.433855]  [<c01eab30>] ? chrdev_open+0x0/0x190
> >>>> [ 1794.433865]  [<c01f3b8a>] ? do_filp_open+0x53a/0x890
> >>>> [ 1794.433876]  [<c01e5970>] ? do_sys_open+0x50/0x150
> >>>> [ 1794.433885]  [<c01e9425>] ? fput+0x15/0x20
> >>>> [ 1794.433893]  [<c01e5847>] ? filp_close+0x47/0x70
> >>>> [ 1794.433902]  [<c01e5ad9>] ? sys_open+0x29/0x40
> >>>> [ 1794.433911]  [<c01033ac>] ? syscall_call+0x7/0xb
> >>>> [ 1794.433916] Code: 89 44 24 08 e8 79 60 bf c3 89 1d 4c e3 9c fc 8b
> >>>> 43 04 83 e0 0f eb c4 8d b4 26 00 00 00 00 55 89 e5 56 53 83 ec 18 a1
> >>>> e0 d0 50 fc <8b> 98 68 01 00 00 8b 43 28 c7 04 24 1b 6a 99 fc 89 44 24
> >>>> 04 e8
> >>>> [ 1794.434026] EIP: [<fc97b88d>] HDAdump+0xd/0x80 [agrmodem] SS:ESP
> >>>> 0068:eda3dcd8
> >>>> [ 1794.434089] CR2: 0000000000000168
> >>>> [ 1794.434153] ---[ end trace d4263b1fcdf89f3c ]---
> >>>>
> >>>>
> >>>> I will try to install ALSA from the official site.
> >>>> Thanks!
> >>>> Kevin
> >>>>
> >>>> 2010/2/2 Marvin Stodolsky <marvin.stodolsky@xxxxxxxxx>:
> >>>>> Kevin,
> >>>>>
> >>>>> Prepare for Bjorn's suggested edit by:
> >>>>> $ dkms status
> >>>>> whose output on my System includes:
> >>>>> agrsm-11c11040, 2.1.80, 2.6.31-17-generic, i686: installed
> >>>>> Then do:
> >>>>> $ sudo dkms remove -m agrsm-11c11040 -v 2.1.80 --all
> >>>>> This cleans a copy of the code package from the /var/lib/dkms/ folders,
> >>>>> wherein DKMS does the actual compiles
> >>>>>
> >>>>> Next to Bjorn's edit.
> >>>>>  Then reinstall with
> >>>>> $ sudo ./dodkms
> >>>>>
> >>>>> MarvS
> >>>>>
> >>>>> MarvS
> >>>>>
> >>>>>
> >>>>> On Tue, Feb 2, 2010 at 6:46 AM, Bjorn Wielens <Uniacke1@xxxxxxxx> wrote:
> >>>>>> Hmm... Your system is an MSI laptop too :)
> >>>>>> Anyway, looks like it's hanging trying to locate the modem's HDA codec.
> >>>>>>
> >>>>>> Can you edit the HDA.c file in the source and uncomment the line
> >>>>>> #define HDAdbg (located just before the code starts, after comments.)
> >>>>>> Then recompile the drivers (Not sure how to do this with DKMS- I"ve
> >>>>>> always used Makefiles, but I think it is along the lines of sudo
> >>>>>> dpkg-reconfigure <package name>)
> >>>>>>
> >>>>>> This will likely provide more kernel output in your syslog, which should
> >>>>>> provide extra info on the cause of the crash.
> >>>>>>
> >>>>>> Another thing worth trying is doing a "stock" driver install of the
> >>>>>> alsa-drivers-1.0.20 package from alsa-project.org. Sometimes distros may
> >>>>>> apply patches to the source which adversely affect driver function.
> >>>>>> The problem with the agrsm drivers is that they are VERY specific. :(
> >>>>>>
> >>>>>> Best,
> >>>>>> Bjorn.
> >>>>>>
> >>>>>>
> >>>>>> On 02/02/2010 12:55 AM, Kevin Fernandez wrote:
> >>>>>>> Hello Bjorn,
> >>>>>>> I have ALSA 1.0.20, the package i've used right now is
> >>>>>>> agrsm-11c11040-2.1.80~20091225.tar.bz2
> >>>>>>> I've used dodkms and a kernel i didn't use before (2.6.31-16-generic).
> >>>>>>> I've booted into that kernel, ran twice Marv's unloading script (if i
> >>>>>>> run it twice it unloads more):
> >>>>>>>
> >>>>>>> MODULES_FINAL=isofs binfmt_misc joydev psmouse fbcon tileblit font
> >>>>>>> bitblit softcursor i915 drm i2c_algo_bit intel_agp agpgart video
> >>>>>>> output
> >>>>>>>
> >>>>>>> then loaded agrmodem and agrserial:
> >>>>>>> [  112.493879] * Hello Agere Driver **
> >>>>>>> [  112.493950] usbcore: registered new interface driver agr12dec2006
> >>>>>>> [  112.970170]   alloc irq_desc for 20 on node -1
> >>>>>>> [  112.970174]   alloc kstat_irqs on node -1
> >>>>>>> [  112.970182] pci 0000:00:1b.0: PCI INT A -> GSI 20 (level, low) -> IRQ 20
> >>>>>>> [  115.917518] Loading module Agere Modem Controller driver version
> >>>>>>> 2.1.80 (2007-10-01)
> >>>>>>> [  115.917525] Disabling lock debugging due to kernel taint
> >>>>>>> [  123.858338] serial8250_register_ports: BaseAddress 0x8004 Irq 20
> >>>>>>> [  123.858350] ttyAGS3 at I/O 0x8004 (irq = 20) is a AgereModem
> >>>>>>> [  123.858455] agrserial - ret_val 0, call: lt_modem_ops.init_modem
> >>>>>>> [  123.858463] Loading module Agere Modem Interface driver version
> >>>>>>> 2.1.80.0 (2007-10-01)
> >>>>>>>
> >>>>>>> (is this rev_val 0 line normal?)
> >>>>>>> Made a symlink /dev/modem to /dev/ttyAGS3 and /dev/ttySAGS to
> >>>>>>> /dev/ttyAGS3 (i think i read somewhere to do this for wvdialconf to
> >>>>>>> find the modem).
> >>>>>>>
> >>>>>>> Ran sudo wvdialconf /etc/wvdial.conf (instead of wvdial this time) and got this:
> >>>>>>>
> >>>>>>> [  181.005484] ==> codecType = 0x32
> >>>>>>> [  181.005512] BUG: unable to handle kernel NULL pointer dereference at 00000168
> >>>>>>> [  181.005523] IP: [<f8f68818>] azlGetResourceInformation+0x8/0x60 [agrmodem]
> >>>>>>> [  181.005592] *pde = 7f322067
> >>>>>>> [  181.005599] Oops: 0000 [#1] SMP
> >>>>>>> [  181.005607] last sysfs file: /sys/devices/system/cpu/cpu1/topology/core_id
> >>>>>>> [  181.005614] Modules linked in: agrserial agrmodem snd_hda_codec
> >>>>>>> snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss
> >>>>>>> snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer
> >>>>>>> snd_seq_device snd soundcore snd_page_alloc isofs binfmt_misc joydev
> >>>>>>> psmouse fbcon tileblit font bitblit softcursor i915 drm i2c_algo_bit
> >>>>>>> intel_agp agpgart video output [last unloaded: wlan]
> >>>>>>> [  181.005692]
> >>>>>>> [  181.005701] Pid: 5655, comm: wvdialconf Tainted: P
> >>>>>>> (2.6.31-16-generic #53-Ubuntu) MSI Notebook VR601
> >>>>>>> [  181.005708] EIP: 0060:[<f8f68818>] EFLAGS: 00010286 CPU: 0
> >>>>>>> [  181.005766] EIP is at azlGetResourceInformation+0x8/0x60 [agrmodem]
> >>>>>>> [  181.005773] EAX: 00000000 EBX: f86af0c4 ECX: 00000000 EDX: 0000020b
> >>>>>>> [  181.005779] ESI: f86af0c4 EDI: f86af028 EBP: f02efd00 ESP: f02efd00
> >>>>>>> [  181.005785]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
> >>>>>>> [  181.005792] Process wvdialconf (pid: 5655, ti=f02ee000
> >>>>>>> task=f02a3240 task.ti=f02ee000)
> >>>>>>> [  181.005797] Stack:
> >>>>>>> [  181.005801]  f02efd20 f8f53769 f86b95e9 f86b95ea f02efd20 c056ea7c
> >>>>>>> f8f81c93 f02efd6f
> >>>>>>> [  181.005818] <0> f02efd90 f8f3c9f1 f86af0c4 f8521048 00000008
> >>>>>>> 00000001 f86af39c 00000004
> >>>>>>> [  181.005837] <0> c162c2a0 00000000 c0784e40 00000000 c01b7e2d
> >>>>>>> 00000001 00000041 ffffffff
> >>>>>>> [  181.005857] Call Trace:
> >>>>>>> [  181.005934]  [<f8f53769>] ? CAzlIntelInit+0x2d/0x3c4 [agrmodem]
> >>>>>>> [  181.005952]  [<c056ea7c>] ? printk+0x18/0x1c
> >>>>>>> [  181.006038]  [<f8f3c9f1>] ? LXHardwareStart+0x11de/0x13fb [agrmodem]
> >>>>>>> [  181.006057]  [<c01b7e2d>] ? get_page_from_freelist+0x1bd/0x360
> >>>>>>> [  181.006066]  [<c0570e3a>] ? _spin_lock_irqsave+0x2a/0x40
> >>>>>>> [  181.006153]  [<f8f381a8>] ? linux_modem_open+0x45/0x10e [agrmodem]
> >>>>>>> [  181.006167]  [<c0150c2b>] ? mod_timer+0xcb/0x140
> >>>>>>> [  181.006226]  [<f8e922a8>] ? wrap_linux_modem_open+0x8/0x10 [agrmodem]
> >>>>>>> [  181.006284]  [<f8e92308>] ? modemPortOpen+0x8/0x20 [agrmodem]
> >>>>>>> [  181.006296]  [<f857cfe0>] ? serial8250_startup+0x210/0x380 [agrserial]
> >>>>>>> [  181.006308]  [<c0399376>] ? uart_startup+0x46/0x140
> >>>>>>> [  181.006317]  [<c0399eb2>] ? uart_open+0x102/0x220
> >>>>>>> [  181.006326]  [<c0380f53>] ? __tty_open+0x1a3/0x460
> >>>>>>> [  181.006335]  [<c038122f>] ? tty_open+0x1f/0x40
> >>>>>>> [  181.006344]  [<c01eaa5d>] ? chrdev_open+0xcd/0x190
> >>>>>>> [  181.006353]  [<c01e5a39>] ? __dentry_open+0xb9/0x230
> >>>>>>> [  181.006361]  [<c01e5c95>] ? nameidata_to_filp+0x55/0x70
> >>>>>>> [  181.006370]  [<c01ea990>] ? chrdev_open+0x0/0x190
> >>>>>>> [  181.006379]  [<c01f39ea>] ? do_filp_open+0x53a/0x890
> >>>>>>> [  181.006389]  [<c01e57d0>] ? do_sys_open+0x50/0x150
> >>>>>>> [  181.006397]  [<c01e9285>] ? fput+0x15/0x20
> >>>>>>> [  181.006405]  [<c01e56a7>] ? filp_close+0x47/0x70
> >>>>>>> [  181.006412]  [<c01e5939>] ? sys_open+0x29/0x40
> >>>>>>> [  181.006421]  [<c010336c>] ? syscall_call+0x7/0xb
> >>>>>>> [  181.006426] Code: 10 75 e8 b8 fd ff ff ff 5d c3 90 31 c0 5d c3 8d
> >>>>>>> 74 26 00 89 15 ac b0 fb f8 8b 42 04 5d 83 e0 0f c3 66 90 a1 e0 50 63
> >>>>>>> fd 55 89 e5 <8b> 80 68 01 00 00 8b 48 74 31 c0 90 8d 74 26 00 8b 54 81
> >>>>>>> 34 85
> >>>>>>> [  181.006535] EIP: [<f8f68818>] azlGetResourceInformation+0x8/0x60
> >>>>>>> [agrmodem] SS:ESP 0068:f02efd00
> >>>>>>> [  181.006598] CR2: 0000000000000168
> >>>>>>> [  181.006606] ---[ end trace c5d7e7cd560c2388 ]---
> >>>>>>>
> >>>>>>>
> >>>>>>> After this i tried to boot in rescue mode (only with terminal) to have
> >>>>>>> even less modules loaded, ran unloading twice, tried wvdial, same..
> >>>>>>> Everytime i have this, the device is busy after and i have to reboot.
> >>>>>>>
> >>>>>>> Thanks for your time!
> >>>>>>> Kevin
> >>>>>>>
> >>>>>>> 2010/2/1 Bjorn Wielens <Uniacke1@xxxxxxxx>:
> >>>>>>>> Marv, Kevin:
> >>>>>>>> Just a heads up- These crashes/segfaults almost ALWAYS caused by a
> >>>>>>>> mismatch between the agrsm driver version and the ALSA version on your
> >>>>>>>> computer.
> >>>>>>>>
> >>>>>>>> Which driver package are you using, and what is the output of
> >>>>>>>> 'cat /proc/asound/version'?
> >>>>>>>>
> >>>>>>>> The ALSA version for my most recently prepared tarball and its
> >>>>>>>> derivatives is 1.0.20. Any newer is not yet supported.
> >>>>>>>>
> >>>>>>>> Thanks,
> >>>>>>>> Bjorn.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 02/01/2010 08:37 PM, Marvin Stodolsky wrote:
> >>>>>>>>> Kevin,
> >>>>>>>>>
> >>>>>>>>> You are using the correct drivers.
> >>>>>>>>> Try detaching external devices as much as possible before bootup, and
> >>>>>>>>> shutting down non-essential programs  before using the modem.  You
> >>>>>>>>> could check whether the problems begin during a simple activation
> >>>>>>>>> with:
> >>>>>>>>> $ sudo wvdialconf  wvtest
> >>>>>>>>> or only during an actual dialout.
> >>>>>>>>>
> >>>>>>>>> I'll also send you an "unloading" script, which tries to unload
> >>>>>>>>> non-essential modules.
> >>>>>>>>> Also try using it before modem usage as:
> >>>>>>>>> $ sudo ./unloading
> >>>>>>>>>
> >>>>>>>>> Sadly we don't have debugging capability for these drivers, because
> >>>>>>>>> there is a closed source component.
> >>>>>>>>>
> >>>>>>>>> MarvS
> >>>>>>>>>
> >>>>>>>>> On Mon, Feb 1, 2010 at 11:59 AM, Kevin Fernandez <siegfri3d@xxxxxxxxx> wrote:
> >>>>>>>>>> Sorry this was an old modemdata, i removed slmodem a long time ago.. I
> >>>>>>>>>> attached a new modemdata.txt.
> >>>>>>>>>> On windows it says:
> >>>>>>>>>> Agere Systems HDA modem
> >>>>>>>>>> Slot 1 (internal High Definition Audio bus)
> >>>>>>>>>>
> >>>>>>>>>> device ID HDAUDIO\FUNC_02&VEN_11C1&DEV_1040&SUBSYS_11C10001&REV_1002
> >>>>>>>>>>
> >>>>>>>>>> Thanks for the help!
> >>>>>>>>>> Kevin
> >>>>>>>>>>
> >>>>>>>>>> 2010/2/1 Marvin Stodolsky <marvin.stodolsky@xxxxxxxxx>:
> >>>>>>>>>>> Kevin,
> >>>>>>>>>>>
> >>>>>>>>>>> Under install the hsfmodem software.  It is for Conexant modem chips
> >>>>>>>>>>> and may be interferring.
> >>>>>>>>>>> Then rerun scanModem
> >>>>>>>>>>> As described in SoftModem.txt, please get diagnostic info under Microsoft too.
> >>>>>>>>>>>
> >>>>>>>>>>> MarvS
> >>>>>>>>>>> scanModem maintainer
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>> On Mon, Feb 1, 2010 at 12:57 AM, Kevin Fernandez <siegfri3d@xxxxxxxxx> wrote:
> >>>>>>>>>>>> Hello there,
> >>>>>>>>>>>> I'm trying to get my modem working for some days, still no luck.
> >>>>>>>>>>>> I've attached the modemdata.
> >>>>>>>>>>>> I compile the driver (agrsm-11c11040-2.1.80~20091225), i install it
> >>>>>>>>>>>> and load the modules, then i get:
> >>>>>>>>>>>> [  677.293574] * Hello Agere Driver **
> >>>>>>>>>>>> [  677.293623] usbcore: registered new interface driver agr12dec2006
> >>>>>>>>>>>> [  680.664348] Loading module Agere Modem Controller driver version
> >>>>>>>>>>>> 2.1.80 (2007-10-01)
> >>>>>>>>>>>> [  680.664354] Disabling lock debugging due to kernel taint
> >>>>>>>>>>>> [  683.898153] serial8250_register_ports: BaseAddress 0x8004 Irq 20
> >>>>>>>>>>>> [  683.898160] ttyAGS3 at I/O 0x8004 (irq = 20) is a AgereModem
> >>>>>>>>>>>> [  683.898229] agrserial - ret_val 0, call: lt_modem_ops.init_modem
> >>>>>>>>>>>> [  683.898234] Loading module Agere Modem Interface driver version
> >>>>>>>>>>>> 2.1.80.0 (2007-10-01)
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> then i fire up wvdial to use the device and i get nothing, but i have
> >>>>>>>>>>>> this in dmesg:
> >>>>>>>>>>>>
> >>>>>>>>>>>> [  694.818705] ==> codecType = 0x32
> >>>>>>>>>>>> [  694.848151] BUG: unable to handle kernel NULL pointer dereference at 00000060
> >>>>>>>>>>>> [  694.848167] IP: [<f986a498>] ResumeCallBack+0x18/0x34 [agrmodem]
> >>>>>>>>>>>> [  694.848264] *pde = 7e584067
> >>>>>>>>>>>> [  694.848271] Oops: 0000 [#1] SMP
> >>>>>>>>>>>> [  694.848280] last sysfs file: /sys/devices/system/cpu/cpu1/topology/core_id
> >>>>>>>>>>>> [  694.848287] Modules linked in: agrserial agrmodem isofs udf
> >>>>>>>>>>>> crc_itu_t binfmt_misc ppdev vboxnetflt vboxnetadp vboxdrv joydev
> >>>>>>>>>>>> snd_hda_codec_realtek wlan_scan_sta ath_rate_sample snd_hda_intel
> >>>>>>>>>>>> pcmcia snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm
> >>>>>>>>>>>> snd_seq_dummy uvcvideo videodev v4l1_compat sdhci_pci sdhci led_class
> >>>>>>>>>>>> yenta_socket rsrc_nonstatic pcmcia_core psmouse serio_raw iptable_nat
> >>>>>>>>>>>> nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_mangle
> >>>>>>>>>>>> iptable_filter ip_tables x_tables ath_pci wlan ath_hal snd_seq_oss
> >>>>>>>>>>>> snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer
> >>>>>>>>>>>> snd_seq_device snd soundcore snd_page_alloc sbp2 lp parport dm_raid45
> >>>>>>>>>>>> xor fbcon tileblit font bitblit softcursor i915 drm i2c_algo_bit
> >>>>>>>>>>>> ohci1394 ieee1394 r8169 mii intel_agp video agpgart output
> >>>>>>>>>>>> [  694.848449]
> >>>>>>>>>>>> [  694.848457] Pid: 7339, comm: wvdial Tainted: P
> >>>>>>>>>>>> (2.6.31-18-generic #55-Ubuntu) MSI Notebook VR601
> >>>>>>>>>>>> [  694.848465] EIP: 0060:[<f986a498>] EFLAGS: 00010282 CPU: 0
> >>>>>>>>>>>> [  694.848550] EIP is at ResumeCallBack+0x18/0x34 [agrmodem]
> >>>>>>>>>>>> [  694.848557] EAX: f02c0800 EBX: 00000000 ECX: 01828000 EDX: f986a480
> >>>>>>>>>>>> [  694.848563] ESI: e650dc9c EDI: f02c0800 EBP: e650dc58 ESP: e650dc40
> >>>>>>>>>>>> [  694.848569]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
> >>>>>>>>>>>> [  694.848577] Process wvdial (pid: 7339, ti=e650c000 task=e6e9e480
> >>>>>>>>>>>> task.ti=e650c000)
> >>>>>>>>>>>> [  694.848582] Stack:
> >>>>>>>>>>>> [  694.848586]  00000000 00000003 0002a22c f02c0800 e650dc9c f02c0800
> >>>>>>>>>>>> e650dc64 f8bdeca2
> >>>>>>>>>>>> [  694.848604] <0> f02c0800 e650dc70 f8bdcd84 efcfa200 e650dc94
> >>>>>>>>>>>> f8bdce20 100f0000 0100cc9f
> >>>>>>>>>>>> [  694.848622] <0> e650dc9c efcfa274 000f0000 e650dc9c f9947028
> >>>>>>>>>>>> e650dca8 f8bdde41 ffffffff
> >>>>>>>>>>>> [  694.848643] Call Trace:
> >>>>>>>>>>>> [  694.848668]  [<f8bdeca2>] ? hda_call_codec_resume+0x42/0x70 [snd_hda_codec]
> >>>>>>>>>>>> [  694.848691]  [<f8bdcd84>] ? snd_hda_power_up+0x34/0x60 [snd_hda_codec]
> >>>>>>>>>>>> [  694.848711]  [<f8bdce20>] ? codec_exec_verb+0x70/0xc0 [snd_hda_codec]
> >>>>>>>>>>>> [  694.848741]  [<f8bdde41>] ? snd_hda_codec_read+0x31/0x40 [snd_hda_codec]
> >>>>>>>>>>>> [  694.848801]  [<f989a999>] ? LnxTransferCodecVerbs+0x49/0x60 [agrmodem]
> >>>>>>>>>>>> [  694.848890]  [<f9884b1b>] ? VerbTransfer+0x2f/0x3c [agrmodem]
> >>>>>>>>>>>> [  694.848976]  [<f9884b73>] ? GetAzCodecID+0x4b/0x63 [agrmodem]
> >>>>>>>>>>>> [  694.849063]  [<f9885788>] ? CAzlIntelInit+0x4c/0x3c4 [agrmodem]
> >>>>>>>>>>>> [  694.849085]  [<c05718fc>] ? printk+0x18/0x1c
> >>>>>>>>>>>> [  694.849173]  [<f986e9f1>] ? LXHardwareStart+0x11de/0x13fb [agrmodem]
> >>>>>>>>>>>> [  694.849199]  [<c01b7ea5>] ? get_page_from_freelist+0x1c5/0x370
> >>>>>>>>>>>> [  694.849209]  [<c0573cba>] ? _spin_lock_irqsave+0x2a/0x40
> >>>>>>>>>>>> [  694.849295]  [<f986a1a8>] ? linux_modem_open+0x45/0x10e [agrmodem]
> >>>>>>>>>>>> [  694.849316]  [<c0150bbb>] ? mod_timer+0xcb/0x140
> >>>>>>>>>>>> [  694.849376]  [<f97c42a8>] ? wrap_linux_modem_open+0x8/0x10 [agrmodem]
> >>>>>>>>>>>> [  694.849435]  [<f97c4308>] ? modemPortOpen+0x8/0x20 [agrmodem]
> >>>>>>>>>>>> [  694.849447]  [<f818cfe0>] ? serial8250_startup+0x210/0x380 [agrserial]
> >>>>>>>>>>>> [  694.849457]  [<c039ceb6>] ? uart_startup+0x46/0x140
> >>>>>>>>>>>> [  694.849465]  [<c039d9f2>] ? uart_open+0x102/0x220
> >>>>>>>>>>>> [  694.849475]  [<c0384af3>] ? __tty_open+0x1a3/0x460
> >>>>>>>>>>>> [  694.849483]  [<c0384dcf>] ? tty_open+0x1f/0x40
> >>>>>>>>>>>> [  694.849493]  [<c01eabfd>] ? chrdev_open+0xcd/0x190
> >>>>>>>>>>>> [  694.849502]  [<c01e5bd9>] ? __dentry_open+0xb9/0x230
> >>>>>>>>>>>> [  694.849511]  [<c01e5e35>] ? nameidata_to_filp+0x55/0x70
> >>>>>>>>>>>> [  694.849520]  [<c01eab30>] ? chrdev_open+0x0/0x190
> >>>>>>>>>>>> [  694.849530]  [<c01f3b8a>] ? do_filp_open+0x53a/0x890
> >>>>>>>>>>>> [  694.849540]  [<c01e5970>] ? do_sys_open+0x50/0x150
> >>>>>>>>>>>> [  694.849548]  [<c01e9425>] ? fput+0x15/0x20
> >>>>>>>>>>>> [  694.849556]  [<c01e5847>] ? filp_close+0x47/0x70
> >>>>>>>>>>>> [  694.849564]  [<c01e5ad9>] ? sys_open+0x29/0x40
> >>>>>>>>>>>> [  694.849573]  [<c01033ac>] ? syscall_call+0x7/0xb
> >>>>>>>>>>>> [  694.849578] Code: 89 d8 83 c4 2c 5b 5e 5f 5d c3 90 90 90 90 90 90
> >>>>>>>>>>>> 90 90 90 55 89 e5 53 83 ec 14 8b 1d e8 e3 8e f9 c7 44 24 04 03 00 00
> >>>>>>>>>>>> 00 89 1c 24 <ff> 53 60 c7 44 24 04 00 00 00 00 89 1c 24 ff 53 60 b8 00
> >>>>>>>>>>>> 00 00
> >>>>>>>>>>>> [  694.849687] EIP: [<f986a498>] ResumeCallBack+0x18/0x34 [agrmodem]
> >>>>>>>>>>>> SS:ESP 0068:e650dc40
> >>>>>>>>>>>> [  694.849777] CR2: 0000000000000060
> >>>>>>>>>>>> [  694.849784] ---[ end trace e662cdc749dd82f6 ]---
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> As you can see i'm running ubuntu karmic, kernel 2.6.31-18-generic .
> >>>>>>>>>>>> Sometimes wvdial even freezes my computer.
> >>>>>>>>>>>> Any help is appreciated!
> >>>>>>>>>>>> Thanks
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>
> >
> >
 Only plain text email is forwarded by the  Discuss@xxxxxxxxxxxxx List Server,
 as HTML can contain viruses. Use as the email Subject Line:
           YourName, YourCountry  kernel 2.6.31.7 
 With this Subject Line cogent experts will be alerted, and useful case names left in the Archive.
 YourCountry will enable Country specific guidance. Linux experts in YourCountry 
 can be found through: http://www.linux.org/groups/index.html.
They will know your Country's modem code, which may be essential for dialup service.
Responses from Discuss@xxxxxxxxxxxxx are sometimes blocked by an Internet Provider mail filters.
 So in a day, also check the Archived responses at http://www.linmodems.org 
--------------------------  System information ----------------------------
CPU=i686,  
Linux version 2.6.31.7 (ndz@toshi) (gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4)) #1 SMP Mon Dec 14 01:14:41 MSK 2009
 scanModem update of:  2010_01_22


The dkms driver upgrade utilities are installed,

 There are no blacklisted modem drivers in /etc/modprobe*  files 

 Potentially useful modem drivers now loaded are:
       snd_hda_intel           

Attached USB devices are:
 ID 1d6b:0002  
 ID 0bda:8197 Realtek Semiconductor Corp. 
 ID 1d6b:0002  
 ID 1d6b:0001  
 ID 1d6b:0001  
 ID 1d6b:0001  
 ID 1d6b:0001  
 ID 1d6b:0001  
If a cellphone is not detected, see http://ubuntuforums.org/archive/index.php/t-878554.html
A sample report is:  http://linmodems.technion.ac.il/bigarch/archive-nineth/msg00578.html

If a USB modem or cellphone is attached and was not detected, please
provide available information in your request to discuss@xxxxxxxxxxxxx

For candidate card in slot 00:1b.0, firmware information and bootup diagnostics are:
 PCI slot	PCI ID		SubsystemID	Name
 ----------	---------	---------	--------------
 00:1b.0	8086:284b	1179:ff40	Audio device: Intel Corporation 82801H 

 Modem interrupt assignment and sharing: 
 22:        544   IO-APIC-fasteoi   HDA Intel
 --- Bootup diagnostics for card in PCI slot 00:1b.0 ----
[    0.117581] pci 0000:00:1b.0: reg 10 64bit mmio: [0xfeaf8000-0xfeafbfff]
[    0.117631] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    0.117636] pci 0000:00:1b.0: PME# disabled
[   17.620029] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[   17.620064] HDA Intel 0000:00:1b.0: setting latency timer to 64

 The PCI slot 00:1b.0 of the modem card may be disabled early in 
 a bootup process,  but then enabled later. If modem drivers load 
 but the  modem is not responsive, read DOCs/Bootup.txt about possible fixes.
 Send dmesg.txt along with ModemData.txt to discuss@xxxxxxxxxxxxx
 if help is needed.
 


===== Advanced Linux Sound Architecture (ALSA) diagnostics ===== 
The ALSA packages provide audio support and also drivers for some modems.
ALSA diagnostics are written during bootup to /proc/asound/ folders.

The ALSA verion is 1.0.20
The modem cards detected by "aplay -l"  are: None


The /proc/asound/pcm file reports:
-----------------------
00-00: ALC660-VD Analog : ALC660-VD Analog : playback 1 : capture 1

about /proc/asound/cards:
------------------------
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xfeaf8000 irq 22

 PCI slot 00:1b.0 has a High Definition Audio Card
 The drivers are in the kernel modules tree at:
 /lib/modules/2.6.22-15-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
/lib/modules/2.6.27-rc9/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.29.1/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.22-16-generic/ubuntu/media/snd-hda-intel/snd-hda-intel.ko
/lib/modules/2.6.30-rc6/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.31.7/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.32.1/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.24-26-generic/ubuntu/sound/alsa-driver/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.31.4/kernel/sound/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.24-24-generic/ubuntu/sound/alsa-driver/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.24-23-generic/ubuntu/sound/alsa-driver/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.24-25-generic/ubuntu/sound/alsa-driver/pci/hda/snd-hda-intel.ko
/lib/modules/2.6.28.10/kernel/sound/pci/hda/snd-hda-intel.ko
 The modem codec file for the HDA card is: /proc/asound/card0/codec#1
--------------------------------------------------------
Codec: LSI ID 1040
Address: 1
Function Id: 0x2
Vendor Id: 0x11c11040
Subsystem Id: 0x11790001
Revision Id: 0x100200
Modem Function Group: 0x1

 The audio card hosts a softmodem chip:  0x11c11040
If not a Conexant modem, the driver agrsm with its dependent drivers:

----------
provide audio + modem support with the modem chip residing on the subsystem.
Any particular card can host any one of several soft modem chips. 

=== Finished firmware and bootup diagnostics, next deducing cogent software. ===

Predictive  diagnostics for card in bus 00:1b.0:
	Modem chipset  detected on
NAME="Audio device: Intel Corporation 82801H "
CLASS=0403
PCIDEV=8086:284b
SUBSYS=1179:ff40
IRQ=22
HDA=8086:284b
SOFT=8086:284b.HDA
HDAchipVendorID=11c1
CHIP=0x11c11040
IDENT=agrsm
Driver=agrsm

 For candidate modem in:  00:1b.0
   0403 Audio device: Intel Corporation 82801H 
      Primary device ID:  8086:284b
    Subsystem PCI_id  1179:ff40 
    Softmodem codec or chipset from diagnostics: 0x11c11040
                               from    Archives: 
                        The HDA card softmodem chip is 0x11c11040
      

Support type needed or chipset:	agrsm


Writing DOCs/Intel.txt

The AgereSystems/LSI agrsm code supports compiling of a agrmodem + agrserial driver pair.
There are a few different chipsets which use this driver pair, but they use different code resources:
Chipsets			KV*	PackageNames (most current as of November 2009)
----------------------------------------------------------------------------------------------
11c1:048c and 11c1:048f         2.6.29	agrsm048pci-2.1.60_20100108_i386.deb or agrsm048pci-2.1.60_20100108.tar.gz
11c1:0620                       2.6.31  agrsm06pci-2.1.80_20100106_i386.deb or agrsm06pci-2.1.80~20100106.tar.gz !!
11c11040 (on HDA audio cards)   2.6.31  agrsm-11c11040-2.1.80~20091225.tar.bz2  !!
   All available at: http://linmodems.technion.ac.il/packages/ltmodem/11c11040/   , whereat additionally
automation & testing                    agrsm-tools_0.0.1_all.deb or agrsm-tools-0.0.1-2.noarch.rpm
General background                      agrsm_howto.txt 
for rpm variants of dkms-agrsm , see  http://linux.zsolttech.com/linmodem/agrsm/
------------------------------------------------------------------------------------------------
* KV == latest kernel release with a reported success 
!! Latest update with major credit to  Nikolay Zhuravlev
   But see conflict issue: http://linmodems.technion.ac.il/bigarch/archive-nineth/msg02753.html 
Report from  Bjorn Wielens:
Please note- trying to load the modules on a OpenSuSE 11.2 system gives
 an error about the module_version symbol. Using:
# modprobe --force agrmodem
# modprobe --force agrserial 
is necessary to load the drivers, and does not appear to cause ill effects.


All of the above packages are dkms competent.  This means that if your Linux distros dkms package
is previously installed, if provides for future updates matching forthcoming kernels.

-------------- end Agere Systems section -------------------

 Completed candidate modem analyses.

 The base of the UDEV device file system is: /dev/.udev

 Versions adequately match for the compiler installed: 4.2.4
             and the compiler used in kernel assembly: 4.2.4


 
 Minimal compiling resources appear complete:
   make utility - /usr/bin/make
   Compiler version 4.2
   linuc_headers base folder /lib/modules/2.6.31.7/build

 However some compilations and executable functions may need additional files,
 in the FileNames.h (so called kernel "h"eaders) collection installed in  /usr/include/ .
 For martian_modem, additional required packages are needed. The also required headers of package libc6 are commonly installed by default. 
 Compiling hsfmodem drivers does require linux-libc-dev and libc6-dev packages, for kernels 2.6.24 and later versions.
 In not included on your install CD, search for them at http://packages.ubuntu.com
 or comparable Repository for other Linux distros.
 When compiling ALSA drivers, the utility "patch" will also be needed.


Compressed files at: /usr/src/kqemu.tar.bz2


If a driver compilation fails, with message including some lack of some FileName.h (stdio.h for example), then
Some additional kernel-header files need installation to /usr/include. The minimal additional packages are libc6-dev
and any of its dependents, under Ubuntu linux-libc-dev

If an alternate ethernet connection is available,
$  apt-get update
$  apt-get -s install linux-kernel-devel
will install needed packages.
For Debian/Ubuntu related distributions, run the following command to display the needed package list:

Otherwise packages have to be found through http://packages.ubuntu.com
Once downloaded and transferred into a Linux partition,
they can be installed alltogether with:
$ sudo dpkg -i *.deb


Checking pppd properties:
	-rwsr-xr-- 1 root dip 269256 2007-10-04 23:57 /usr/sbin/pppd

In case of an "error 17" "serial loopback" problem, see:
    http://linmodems.technion.ac.il/linmodems/archive-sixth/msg02637.html

To enable dialout without Root permission do:
	$ su - root  (not for Ubuntu)
        sudo chmod a+x /usr/sbin/pppd
or under Ubuntu related Linuxes
	sudo chmod a+x /usr/sbin/pppd

Checking settings of:	/etc/ppp/options
asyncmap 0
noauth
crtscts
lock
hide-password
modem
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
noipx

In case of a message like:
   Warning: Could not modify /etc/ppp/pap-secrets: Permission denied
see http://linmodems.technion.ac.il/bigarch/archive-sixth/msg04656.html

For guidance on FAX usage, get from http://linmodems.technion.ac.il/packages/  get faxing.tar.gz
It has samples for a modem using port /dev/ttySL0, which must be changed to match your modem's port.

Read Modem/DOCs/YourSystem.txt concerning other COMM channels: eth0 wlan0 wmaster0
Which can interfere with Browser naviagation.

 Don't worry about the following, it is for experts should trouble shooting be necessary.
==========================================================

 Checking for modem support lines:
 --------------------------------------
     /device/modem symbolic link:   
slmodemd created symbolic link /dev/ttySL0:  
     Within /etc/udev/ files:

     Within /etc/modprobe.conf files:
/etc/modprobe.d/alsa-base:options snd-atiixp-modem index=-2
/etc/modprobe.d/alsa-base:options snd-via82xx-modem index=-2
/etc/modprobe.d/blacklist-modem:# Uncomment these entries in order to blacklist unwanted modem drivers
/etc/modprobe.d/blacklist-modem:# blacklist snd-atiixp-modem
/etc/modprobe.d/blacklist-modem:# blacklist snd-via82xx-modem
     Within any ancient /etc/devfs files:

     Within ancient kernel 2.4.n /etc/module.conf files:

--------- end modem support lines --------

/*
 * Universal Interface for Intel High Definition Audio Codec
 *
 * Copyright (c) 2004 Takashi Iwai <tiwai@xxxxxxx>
 *
 *  This program is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the Free
 *  Software Foundation; either version 2 of the License, or (at your option)
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful, but WITHOUT
 *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 *  more details.
 *
 *  You should have received a copy of the GNU General Public License along with
 *  this program; if not, write to the Free Software Foundation, Inc., 59
 *  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef __SOUND_HDA_CODEC_H
#define __SOUND_HDA_CODEC_H

#include <linux/version.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/hwdep.h>

#if defined(CONFIG_PM) || defined(CONFIG_SND_HDA_POWER_SAVE)
#define SND_HDA_NEEDS_RESUME	/* resume control code is required */
#endif

/*
 * nodes
 */
#define	AC_NODE_ROOT		0x00

/*
 * function group types
 */
enum {
	AC_GRP_AUDIO_FUNCTION = 0x01,
	AC_GRP_MODEM_FUNCTION = 0x02,
};
	
/*
 * widget types
 */
enum {
	AC_WID_AUD_OUT,		/* Audio Out */
	AC_WID_AUD_IN,		/* Audio In */
	AC_WID_AUD_MIX,		/* Audio Mixer */
	AC_WID_AUD_SEL,		/* Audio Selector */
	AC_WID_PIN,		/* Pin Complex */
	AC_WID_POWER,		/* Power */
	AC_WID_VOL_KNB,		/* Volume Knob */
	AC_WID_BEEP,		/* Beep Generator */
	AC_WID_VENDOR = 0x0f	/* Vendor specific */
};

/*
 * GET verbs
 */
#define AC_VERB_GET_STREAM_FORMAT		0x0a00
#define AC_VERB_GET_AMP_GAIN_MUTE		0x0b00
#define AC_VERB_GET_PROC_COEF			0x0c00
#define AC_VERB_GET_COEF_INDEX			0x0d00
#define AC_VERB_PARAMETERS			0x0f00
#define AC_VERB_GET_CONNECT_SEL			0x0f01
#define AC_VERB_GET_CONNECT_LIST		0x0f02
#define AC_VERB_GET_PROC_STATE			0x0f03
#define AC_VERB_GET_SDI_SELECT			0x0f04
#define AC_VERB_GET_POWER_STATE			0x0f05
#define AC_VERB_GET_CONV			0x0f06
#define AC_VERB_GET_PIN_WIDGET_CONTROL		0x0f07
#define AC_VERB_GET_UNSOLICITED_RESPONSE	0x0f08
#define AC_VERB_GET_PIN_SENSE			0x0f09
#define AC_VERB_GET_BEEP_CONTROL		0x0f0a
#define AC_VERB_GET_EAPD_BTLENABLE		0x0f0c
#define AC_VERB_GET_DIGI_CONVERT_1		0x0f0d
#define AC_VERB_GET_DIGI_CONVERT_2		0x0f0e /* unused */
#define AC_VERB_GET_VOLUME_KNOB_CONTROL		0x0f0f
/* f10-f1a: GPIO */
#define AC_VERB_GET_GPIO_DATA			0x0f15
#define AC_VERB_GET_GPIO_MASK			0x0f16
#define AC_VERB_GET_GPIO_DIRECTION		0x0f17
#define AC_VERB_GET_GPIO_WAKE_MASK		0x0f18
#define AC_VERB_GET_GPIO_UNSOLICITED_RSP_MASK	0x0f19
#define AC_VERB_GET_GPIO_STICKY_MASK		0x0f1a
#define AC_VERB_GET_CONFIG_DEFAULT		0x0f1c
/* f20: AFG/MFG */
#define AC_VERB_GET_SUBSYSTEM_ID		0x0f20
#define AC_VERB_GET_CVT_CHAN_COUNT		0x0f2d
#define AC_VERB_GET_HDMI_DIP_SIZE		0x0f2e
#define AC_VERB_GET_HDMI_ELDD			0x0f2f
#define AC_VERB_GET_HDMI_DIP_INDEX		0x0f30
#define AC_VERB_GET_HDMI_DIP_DATA		0x0f31
#define AC_VERB_GET_HDMI_DIP_XMIT		0x0f32
#define AC_VERB_GET_HDMI_CP_CTRL		0x0f33
#define AC_VERB_GET_HDMI_CHAN_SLOT		0x0f34

/*
 * SET verbs
 */
#define AC_VERB_SET_STREAM_FORMAT		0x200
#define AC_VERB_SET_AMP_GAIN_MUTE		0x300
#define AC_VERB_SET_PROC_COEF			0x400
#define AC_VERB_SET_COEF_INDEX			0x500
#define AC_VERB_SET_CONNECT_SEL			0x701
#define AC_VERB_SET_PROC_STATE			0x703
#define AC_VERB_SET_SDI_SELECT			0x704
#define AC_VERB_SET_POWER_STATE			0x705
#define AC_VERB_SET_CHANNEL_STREAMID		0x706
#define AC_VERB_SET_PIN_WIDGET_CONTROL		0x707
#define AC_VERB_SET_UNSOLICITED_ENABLE		0x708
#define AC_VERB_SET_PIN_SENSE			0x709
#define AC_VERB_SET_BEEP_CONTROL		0x70a
#define AC_VERB_SET_EAPD_BTLENABLE		0x70c
#define AC_VERB_SET_DIGI_CONVERT_1		0x70d
#define AC_VERB_SET_DIGI_CONVERT_2		0x70e
#define AC_VERB_SET_VOLUME_KNOB_CONTROL		0x70f
#define AC_VERB_SET_GPIO_DATA			0x715
#define AC_VERB_SET_GPIO_MASK			0x716
#define AC_VERB_SET_GPIO_DIRECTION		0x717
#define AC_VERB_SET_GPIO_WAKE_MASK		0x718
#define AC_VERB_SET_GPIO_UNSOLICITED_RSP_MASK	0x719
#define AC_VERB_SET_GPIO_STICKY_MASK		0x71a
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_0	0x71c
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1	0x71d
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2	0x71e
#define AC_VERB_SET_CONFIG_DEFAULT_BYTES_3	0x71f
#define AC_VERB_SET_EAPD				0x788
#define AC_VERB_SET_CODEC_RESET			0x7ff
#define AC_VERB_SET_CVT_CHAN_COUNT		0x72d
#define AC_VERB_SET_HDMI_DIP_INDEX		0x730
#define AC_VERB_SET_HDMI_DIP_DATA		0x731
#define AC_VERB_SET_HDMI_DIP_XMIT		0x732
#define AC_VERB_SET_HDMI_CP_CTRL		0x733
#define AC_VERB_SET_HDMI_CHAN_SLOT		0x734

/*
 * Parameter IDs
 */
#define AC_PAR_VENDOR_ID		0x00
#define AC_PAR_SUBSYSTEM_ID		0x01
#define AC_PAR_REV_ID			0x02
#define AC_PAR_NODE_COUNT		0x04
#define AC_PAR_FUNCTION_TYPE		0x05
#define AC_PAR_AUDIO_FG_CAP		0x08
#define AC_PAR_AUDIO_WIDGET_CAP		0x09
#define AC_PAR_PCM			0x0a
#define AC_PAR_STREAM			0x0b
#define AC_PAR_PIN_CAP			0x0c
#define AC_PAR_AMP_IN_CAP		0x0d
#define AC_PAR_CONNLIST_LEN		0x0e
#define AC_PAR_POWER_STATE		0x0f
#define AC_PAR_PROC_CAP			0x10
#define AC_PAR_GPIO_CAP			0x11
#define AC_PAR_AMP_OUT_CAP		0x12
#define AC_PAR_VOL_KNB_CAP		0x13
#define AC_PAR_HDMI_LPCM_CAP		0x20

/*
 * AC_VERB_PARAMETERS results (32bit)
 */

/* Function Group Type */
#define AC_FGT_TYPE			(0xff<<0)
#define AC_FGT_TYPE_SHIFT		0
#define AC_FGT_UNSOL_CAP		(1<<8)

/* Audio Function Group Capabilities */
#define AC_AFG_OUT_DELAY		(0xf<<0)
#define AC_AFG_IN_DELAY			(0xf<<8)
#define AC_AFG_BEEP_GEN			(1<<16)

/* Audio Widget Capabilities */
#define AC_WCAP_STEREO			(1<<0)	/* stereo I/O */
#define AC_WCAP_IN_AMP			(1<<1)	/* AMP-in present */
#define AC_WCAP_OUT_AMP			(1<<2)	/* AMP-out present */
#define AC_WCAP_AMP_OVRD		(1<<3)	/* AMP-parameter override */
#define AC_WCAP_FORMAT_OVRD		(1<<4)	/* format override */
#define AC_WCAP_STRIPE			(1<<5)	/* stripe */
#define AC_WCAP_PROC_WID		(1<<6)	/* Proc Widget */
#define AC_WCAP_UNSOL_CAP		(1<<7)	/* Unsol capable */
#define AC_WCAP_CONN_LIST		(1<<8)	/* connection list */
#define AC_WCAP_DIGITAL			(1<<9)	/* digital I/O */
#define AC_WCAP_POWER			(1<<10)	/* power control */
#define AC_WCAP_LR_SWAP			(1<<11)	/* L/R swap */
#define AC_WCAP_CP_CAPS			(1<<12) /* content protection */
#define AC_WCAP_CHAN_CNT_EXT		(7<<13)	/* channel count ext */
#define AC_WCAP_DELAY			(0xf<<16)
#define AC_WCAP_DELAY_SHIFT		16
#define AC_WCAP_TYPE			(0xf<<20)
#define AC_WCAP_TYPE_SHIFT		20

/* supported PCM rates and bits */
#define AC_SUPPCM_RATES			(0xfff << 0)
#define AC_SUPPCM_BITS_8		(1<<16)
#define AC_SUPPCM_BITS_16		(1<<17)
#define AC_SUPPCM_BITS_20		(1<<18)
#define AC_SUPPCM_BITS_24		(1<<19)
#define AC_SUPPCM_BITS_32		(1<<20)

/* supported PCM stream format */
#define AC_SUPFMT_PCM			(1<<0)
#define AC_SUPFMT_FLOAT32		(1<<1)
#define AC_SUPFMT_AC3			(1<<2)

/* GP I/O count */
#define AC_GPIO_IO_COUNT		(0xff<<0)
#define AC_GPIO_O_COUNT			(0xff<<8)
#define AC_GPIO_O_COUNT_SHIFT		8
#define AC_GPIO_I_COUNT			(0xff<<16)
#define AC_GPIO_I_COUNT_SHIFT		16
#define AC_GPIO_UNSOLICITED		(1<<30)
#define AC_GPIO_WAKE			(1<<31)

/* Converter stream, channel */
#define AC_CONV_CHANNEL			(0xf<<0)
#define AC_CONV_STREAM			(0xf<<4)
#define AC_CONV_STREAM_SHIFT		4

/* Input converter SDI select */
#define AC_SDI_SELECT			(0xf<<0)

/* Unsolicited response control */
#define AC_UNSOL_TAG			(0x3f<<0)
#define AC_UNSOL_ENABLED		(1<<7)
#define AC_USRSP_EN			AC_UNSOL_ENABLED

/* Unsolicited responses */
#define AC_UNSOL_RES_TAG		(0x3f<<26)
#define AC_UNSOL_RES_TAG_SHIFT		26
#define AC_UNSOL_RES_SUBTAG		(0x1f<<21)
#define AC_UNSOL_RES_SUBTAG_SHIFT	21
#define AC_UNSOL_RES_ELDV		(1<<1)	/* ELD Data valid (for HDMI) */
#define AC_UNSOL_RES_PD			(1<<0)	/* pinsense detect */
#define AC_UNSOL_RES_CP_STATE		(1<<1)	/* content protection */
#define AC_UNSOL_RES_CP_READY		(1<<0)	/* content protection */

/* Pin widget capabilies */
#define AC_PINCAP_IMP_SENSE		(1<<0)	/* impedance sense capable */
#define AC_PINCAP_TRIG_REQ		(1<<1)	/* trigger required */
#define AC_PINCAP_PRES_DETECT		(1<<2)	/* presence detect capable */
#define AC_PINCAP_HP_DRV		(1<<3)	/* headphone drive capable */
#define AC_PINCAP_OUT			(1<<4)	/* output capable */
#define AC_PINCAP_IN			(1<<5)	/* input capable */
#define AC_PINCAP_BALANCE		(1<<6)	/* balanced I/O capable */
/* Note: This LR_SWAP pincap is defined in the Realtek ALC883 specification,
 *       but is marked reserved in the Intel HDA specification.
 */
#define AC_PINCAP_LR_SWAP		(1<<7)	/* L/R swap */
/* Note: The same bit as LR_SWAP is newly defined as HDMI capability
 *       in HD-audio specification
 */
#define AC_PINCAP_HDMI			(1<<7)	/* HDMI pin */
#define AC_PINCAP_VREF			(0x37<<8)
#define AC_PINCAP_VREF_SHIFT		8
#define AC_PINCAP_EAPD			(1<<16)	/* EAPD capable */
/* Vref status (used in pin cap) */
#define AC_PINCAP_VREF_HIZ		(1<<0)	/* Hi-Z */
#define AC_PINCAP_VREF_50		(1<<1)	/* 50% */
#define AC_PINCAP_VREF_GRD		(1<<2)	/* ground */
#define AC_PINCAP_VREF_80		(1<<4)	/* 80% */
#define AC_PINCAP_VREF_100		(1<<5)	/* 100% */

/* Amplifier capabilities */
#define AC_AMPCAP_OFFSET		(0x7f<<0)  /* 0dB offset */
#define AC_AMPCAP_OFFSET_SHIFT		0
#define AC_AMPCAP_NUM_STEPS		(0x7f<<8)  /* number of steps */
#define AC_AMPCAP_NUM_STEPS_SHIFT	8
#define AC_AMPCAP_STEP_SIZE		(0x7f<<16) /* step size 0-32dB
						    * in 0.25dB
						    */
#define AC_AMPCAP_STEP_SIZE_SHIFT	16
#define AC_AMPCAP_MUTE			(1<<31)    /* mute capable */
#define AC_AMPCAP_MUTE_SHIFT		31

/* Connection list */
#define AC_CLIST_LENGTH			(0x7f<<0)
#define AC_CLIST_LONG			(1<<7)

/* Supported power status */
#define AC_PWRST_D0SUP			(1<<0)
#define AC_PWRST_D1SUP			(1<<1)
#define AC_PWRST_D2SUP			(1<<2)
#define AC_PWRST_D3SUP			(1<<3)

/* Power state values */
#define AC_PWRST_SETTING		(0xf<<0)
#define AC_PWRST_ACTUAL			(0xf<<4)
#define AC_PWRST_ACTUAL_SHIFT		4
#define AC_PWRST_D0			0x00
#define AC_PWRST_D1			0x01
#define AC_PWRST_D2			0x02
#define AC_PWRST_D3			0x03

/* Processing capabilies */
#define AC_PCAP_BENIGN			(1<<0)
#define AC_PCAP_NUM_COEF		(0xff<<8)
#define AC_PCAP_NUM_COEF_SHIFT		8

/* Volume knobs capabilities */
#define AC_KNBCAP_NUM_STEPS		(0x7f<<0)
#define AC_KNBCAP_DELTA			(1<<7)

/* HDMI LPCM capabilities */
#define AC_LPCMCAP_48K_CP_CHNS		(0x0f<<0) /* max channels w/ CP-on */	
#define AC_LPCMCAP_48K_NO_CHNS		(0x0f<<4) /* max channels w/o CP-on */
#define AC_LPCMCAP_48K_20BIT		(1<<8)	/* 20b bitrate supported */
#define AC_LPCMCAP_48K_24BIT		(1<<9)	/* 24b bitrate supported */
#define AC_LPCMCAP_96K_CP_CHNS		(0x0f<<10) /* max channels w/ CP-on */	
#define AC_LPCMCAP_96K_NO_CHNS		(0x0f<<14) /* max channels w/o CP-on */
#define AC_LPCMCAP_96K_20BIT		(1<<18)	/* 20b bitrate supported */
#define AC_LPCMCAP_96K_24BIT		(1<<19)	/* 24b bitrate supported */
#define AC_LPCMCAP_192K_CP_CHNS		(0x0f<<20) /* max channels w/ CP-on */	
#define AC_LPCMCAP_192K_NO_CHNS		(0x0f<<24) /* max channels w/o CP-on */
#define AC_LPCMCAP_192K_20BIT		(1<<28)	/* 20b bitrate supported */
#define AC_LPCMCAP_192K_24BIT		(1<<29)	/* 24b bitrate supported */
#define AC_LPCMCAP_44K			(1<<30)	/* 44.1kHz support */
#define AC_LPCMCAP_44K_MS		(1<<31)	/* 44.1kHz-multiplies support */

/*
 * Control Parameters
 */

/* Amp gain/mute */
#define AC_AMP_MUTE			(1<<7)
#define AC_AMP_GAIN			(0x7f)
#define AC_AMP_GET_INDEX		(0xf<<0)

#define AC_AMP_GET_LEFT			(1<<13)
#define AC_AMP_GET_RIGHT		(0<<13)
#define AC_AMP_GET_OUTPUT		(1<<15)
#define AC_AMP_GET_INPUT		(0<<15)

#define AC_AMP_SET_INDEX		(0xf<<8)
#define AC_AMP_SET_INDEX_SHIFT		8
#define AC_AMP_SET_RIGHT		(1<<12)
#define AC_AMP_SET_LEFT			(1<<13)
#define AC_AMP_SET_INPUT		(1<<14)
#define AC_AMP_SET_OUTPUT		(1<<15)

/* DIGITAL1 bits */
#define AC_DIG1_ENABLE			(1<<0)
#define AC_DIG1_V			(1<<1)
#define AC_DIG1_VCFG			(1<<2)
#define AC_DIG1_EMPHASIS		(1<<3)
#define AC_DIG1_COPYRIGHT		(1<<4)
#define AC_DIG1_NONAUDIO		(1<<5)
#define AC_DIG1_PROFESSIONAL		(1<<6)
#define AC_DIG1_LEVEL			(1<<7)

/* DIGITAL2 bits */
#define AC_DIG2_CC			(0x7f<<0)

/* Pin widget control - 8bit */
#define AC_PINCTL_VREFEN		(0x7<<0)
#define AC_PINCTL_VREF_HIZ		0	/* Hi-Z */
#define AC_PINCTL_VREF_50		1	/* 50% */
#define AC_PINCTL_VREF_GRD		2	/* ground */
#define AC_PINCTL_VREF_80		4	/* 80% */
#define AC_PINCTL_VREF_100		5	/* 100% */
#define AC_PINCTL_IN_EN			(1<<5)
#define AC_PINCTL_OUT_EN		(1<<6)
#define AC_PINCTL_HP_EN			(1<<7)

/* Pin sense - 32bit */
#define AC_PINSENSE_IMPEDANCE_MASK	(0x7fffffff)
#define AC_PINSENSE_PRESENCE		(1<<31)
#define AC_PINSENSE_ELDV		(1<<30)	/* ELD valid (HDMI) */

/* EAPD/BTL enable - 32bit */
#define AC_EAPDBTL_BALANCED		(1<<0)
#define AC_EAPDBTL_EAPD			(1<<1)
#define AC_EAPDBTL_LR_SWAP		(1<<2)

/* HDMI ELD data */
#define AC_ELDD_ELD_VALID		(1<<31)
#define AC_ELDD_ELD_DATA		0xff

/* HDMI DIP size */
#define AC_DIPSIZE_ELD_BUF		(1<<3) /* ELD buf size of packet size */
#define AC_DIPSIZE_PACK_IDX		(0x07<<0) /* packet index */

/* HDMI DIP index */
#define AC_DIPIDX_PACK_IDX		(0x07<<5) /* packet idnex */
#define AC_DIPIDX_BYTE_IDX		(0x1f<<0) /* byte index */

/* HDMI DIP xmit (transmit) control */
#define AC_DIPXMIT_MASK			(0x3<<6)
#define AC_DIPXMIT_DISABLE		(0x0<<6) /* disable xmit */
#define AC_DIPXMIT_ONCE			(0x2<<6) /* xmit once then disable */
#define AC_DIPXMIT_BEST			(0x3<<6) /* best effort */

/* HDMI content protection (CP) control */
#define AC_CPCTRL_CES			(1<<9) /* current encryption state */
#define AC_CPCTRL_READY			(1<<8) /* ready bit */
#define AC_CPCTRL_SUBTAG		(0x1f<<3) /* subtag for unsol-resp */
#define AC_CPCTRL_STATE			(3<<0) /* current CP request state */

/* Converter channel <-> HDMI slot mapping */
#define AC_CVTMAP_HDMI_SLOT		(0xf<<0) /* HDMI slot number */
#define AC_CVTMAP_CHAN			(0xf<<4) /* converter channel number */

/* configuration default - 32bit */
#define AC_DEFCFG_SEQUENCE		(0xf<<0)
#define AC_DEFCFG_DEF_ASSOC		(0xf<<4)
#define AC_DEFCFG_ASSOC_SHIFT		4
#define AC_DEFCFG_MISC			(0xf<<8)
#define AC_DEFCFG_MISC_SHIFT		8
#define AC_DEFCFG_MISC_NO_PRESENCE	(1<<0)
#define AC_DEFCFG_COLOR			(0xf<<12)
#define AC_DEFCFG_COLOR_SHIFT		12
#define AC_DEFCFG_CONN_TYPE		(0xf<<16)
#define AC_DEFCFG_CONN_TYPE_SHIFT	16
#define AC_DEFCFG_DEVICE		(0xf<<20)
#define AC_DEFCFG_DEVICE_SHIFT		20
#define AC_DEFCFG_LOCATION		(0x3f<<24)
#define AC_DEFCFG_LOCATION_SHIFT	24
#define AC_DEFCFG_PORT_CONN		(0x3<<30)
#define AC_DEFCFG_PORT_CONN_SHIFT	30

/* device device types (0x0-0xf) */
enum {
	AC_JACK_LINE_OUT,
	AC_JACK_SPEAKER,
	AC_JACK_HP_OUT,
	AC_JACK_CD,
	AC_JACK_SPDIF_OUT,
	AC_JACK_DIG_OTHER_OUT,
	AC_JACK_MODEM_LINE_SIDE,
	AC_JACK_MODEM_HAND_SIDE,
	AC_JACK_LINE_IN,
	AC_JACK_AUX,
	AC_JACK_MIC_IN,
	AC_JACK_TELEPHONY,
	AC_JACK_SPDIF_IN,
	AC_JACK_DIG_OTHER_IN,
	AC_JACK_OTHER = 0xf,
};

/* jack connection types (0x0-0xf) */
enum {
	AC_JACK_CONN_UNKNOWN,
	AC_JACK_CONN_1_8,
	AC_JACK_CONN_1_4,
	AC_JACK_CONN_ATAPI,
	AC_JACK_CONN_RCA,
	AC_JACK_CONN_OPTICAL,
	AC_JACK_CONN_OTHER_DIGITAL,
	AC_JACK_CONN_OTHER_ANALOG,
	AC_JACK_CONN_DIN,
	AC_JACK_CONN_XLR,
	AC_JACK_CONN_RJ11,
	AC_JACK_CONN_COMB,
	AC_JACK_CONN_OTHER = 0xf,
};

/* jack colors (0x0-0xf) */
enum {
	AC_JACK_COLOR_UNKNOWN,
	AC_JACK_COLOR_BLACK,
	AC_JACK_COLOR_GREY,
	AC_JACK_COLOR_BLUE,
	AC_JACK_COLOR_GREEN,
	AC_JACK_COLOR_RED,
	AC_JACK_COLOR_ORANGE,
	AC_JACK_COLOR_YELLOW,
	AC_JACK_COLOR_PURPLE,
	AC_JACK_COLOR_PINK,
	AC_JACK_COLOR_WHITE = 0xe,
	AC_JACK_COLOR_OTHER,
};

/* Jack location (0x0-0x3f) */
/* common case */
enum {
	AC_JACK_LOC_NONE,
	AC_JACK_LOC_REAR,
	AC_JACK_LOC_FRONT,
	AC_JACK_LOC_LEFT,
	AC_JACK_LOC_RIGHT,
	AC_JACK_LOC_TOP,
	AC_JACK_LOC_BOTTOM,
};
/* bits 4-5 */
enum {
	AC_JACK_LOC_EXTERNAL = 0x00,
	AC_JACK_LOC_INTERNAL = 0x10,
	AC_JACK_LOC_SEPARATE = 0x20,
	AC_JACK_LOC_OTHER    = 0x30,
};
enum {
	/* external on primary chasis */
	AC_JACK_LOC_REAR_PANEL = 0x07,
	AC_JACK_LOC_DRIVE_BAY,
	/* internal */
	AC_JACK_LOC_RISER = 0x17,
	AC_JACK_LOC_HDMI,
	AC_JACK_LOC_ATAPI,
	/* others */
	AC_JACK_LOC_MOBILE_IN = 0x37,
	AC_JACK_LOC_MOBILE_OUT,
};

/* Port connectivity (0-3) */
enum {
	AC_JACK_PORT_COMPLEX,
	AC_JACK_PORT_NONE,
	AC_JACK_PORT_FIXED,
	AC_JACK_PORT_BOTH,
};

/* max. connections to a widget */
#define HDA_MAX_CONNECTIONS	32

/* max. codec address */
#define HDA_MAX_CODEC_ADDRESS	0x0f

/*
 * generic arrays
 */
struct snd_array {
	unsigned int used;
	unsigned int alloced;
	unsigned int elem_size;
	unsigned int alloc_align;
	void *list;
};

void *snd_array_new(struct snd_array *array);
void snd_array_free(struct snd_array *array);
static inline void snd_array_init(struct snd_array *array, unsigned int size,
				  unsigned int align)
{
	array->elem_size = size;
	array->alloc_align = align;
}

static inline void *snd_array_elem(struct snd_array *array, unsigned int idx)
{
	return array->list + idx * array->elem_size;
}

static inline unsigned int snd_array_index(struct snd_array *array, void *ptr)
{
	return (unsigned long)(ptr - array->list) / array->elem_size;
}

/*
 * Structures
 */

struct hda_bus;
struct hda_beep;
struct hda_codec;
struct hda_pcm;
struct hda_pcm_stream;
struct hda_bus_unsolicited;

/* NID type */
typedef u16 hda_nid_t;

/* bus operators */
struct hda_bus_ops {
	/* send a single command */
	int (*command)(struct hda_bus *bus, unsigned int cmd);
	/* get a response from the last command */
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 31)
	unsigned int (*get_response)(struct hda_bus *bus, unsigned int addr);
#else
	/* 2.6.30 */
	unsigned int (*get_response)(struct hda_bus *bus);
#endif
	/* free the private data */
	void (*private_free)(struct hda_bus *);
	/* attach a PCM stream */
	int (*attach_pcm)(struct hda_bus *bus, struct hda_codec *codec,
			  struct hda_pcm *pcm);
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 31)
	/* reset bus for retry verb */
	void (*bus_reset)(struct hda_bus *bus);
#endif
#ifdef CONFIG_SND_HDA_POWER_SAVE
	/* notify power-up/down from codec to controller */
	void (*pm_notify)(struct hda_bus *bus);
#endif
};

/* template to pass to the bus constructor */
struct hda_bus_template {
	void *private_data;
	struct pci_dev *pci;
	const char *modelname;
	int *power_save;
	struct hda_bus_ops ops;
};

/*
 * codec bus
 *
 * each controller needs to creata a hda_bus to assign the accessor.
 * A hda_bus contains several codecs in the list codec_list.
 */
struct hda_bus {
	struct snd_card *card;

	/* copied from template */
	void *private_data;
	struct pci_dev *pci;
	const char *modelname;
	int *power_save;
	struct hda_bus_ops ops;

	/* codec linked list */
	struct list_head codec_list;
	/* link caddr -> codec */
	struct hda_codec *caddr_tbl[HDA_MAX_CODEC_ADDRESS + 1];

	struct mutex cmd_mutex;

	/* unsolicited event queue */
	struct hda_bus_unsolicited *unsol;
	char workq_name[16];
	struct workqueue_struct *workq;	/* common workqueue for codecs */

	/* assigned PCMs */
	DECLARE_BITMAP(pcm_dev_bits, SNDRV_PCM_DEVICES);

	/* misc op flags */
	unsigned int needs_damn_long_delay :1;
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 31)
	unsigned int allow_bus_reset:1;	/* allow bus reset at fatal error */
	unsigned int sync_write:1;	/* sync after verb write */
	/* status for codec/controller */
#endif
	unsigned int shutdown :1;	/* being unloaded */
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 31)
	unsigned int rirb_error:1;	/* error in codec communication */
	unsigned int response_reset:1;	/* controller was reset */
	unsigned int in_reset:1;	/* during reset operation */
#endif
};

/*
 * codec preset
 *
 * Known codecs have the patch to build and set up the controls/PCMs
 * better than the generic parser.
 */
struct hda_codec_preset {
	unsigned int id;
	unsigned int mask;
	unsigned int subs;
	unsigned int subs_mask;
	unsigned int rev;
	hda_nid_t afg, mfg;
	const char *name;
	int (*patch)(struct hda_codec *codec);
};
	
struct hda_codec_preset_list {
	const struct hda_codec_preset *preset;
	struct module *owner;
	struct list_head list;
};

/* initial hook */
int snd_hda_add_codec_preset(struct hda_codec_preset_list *preset);
int snd_hda_delete_codec_preset(struct hda_codec_preset_list *preset);

/* ops set by the preset patch */
struct hda_codec_ops {
	int (*build_controls)(struct hda_codec *codec);
	int (*build_pcms)(struct hda_codec *codec);
	int (*init)(struct hda_codec *codec);
	void (*free)(struct hda_codec *codec);
	void (*unsol_event)(struct hda_codec *codec, unsigned int res);
#ifdef SND_HDA_NEEDS_RESUME
	int (*suspend)(struct hda_codec *codec, pm_message_t state);
	int (*resume)(struct hda_codec *codec);
#endif
#ifdef CONFIG_SND_HDA_POWER_SAVE
	int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
#endif
};

/* record for amp information cache */
struct hda_cache_head {
	u32 key;		/* hash key */
	u16 val;		/* assigned value */
	u16 next;		/* next link; -1 = terminal */
};

struct hda_amp_info {
	struct hda_cache_head head;
	u32 amp_caps;		/* amp capabilities */
	u16 vol[2];		/* current volume & mute */
};

struct hda_cache_rec {
	u16 hash[64];			/* hash table for index */
	struct snd_array buf;		/* record entries */
};

/* PCM callbacks */
struct hda_pcm_ops {
	int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec,
		    struct snd_pcm_substream *substream);
	int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec,
		     struct snd_pcm_substream *substream);
	int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec,
		       unsigned int stream_tag, unsigned int format,
		       struct snd_pcm_substream *substream);
	int (*cleanup)(struct hda_pcm_stream *info, struct hda_codec *codec,
		       struct snd_pcm_substream *substream);
};

/* PCM information for each substream */
struct hda_pcm_stream {
	unsigned int substreams;	/* number of substreams, 0 = not exist*/
	unsigned int channels_min;	/* min. number of channels */
	unsigned int channels_max;	/* max. number of channels */
	hda_nid_t nid;	/* default NID to query rates/formats/bps, or set up */
	u32 rates;	/* supported rates */
	u64 formats;	/* supported formats (SNDRV_PCM_FMTBIT_) */
	unsigned int maxbps;	/* supported max. bit per sample */
	struct hda_pcm_ops ops;
};

/* PCM types */
enum {
	HDA_PCM_TYPE_AUDIO,
	HDA_PCM_TYPE_SPDIF,
	HDA_PCM_TYPE_HDMI,
	HDA_PCM_TYPE_MODEM,
	HDA_PCM_NTYPES
};

/* for PCM creation */
struct hda_pcm {
	char *name;
	struct hda_pcm_stream stream[2];
	unsigned int pcm_type;	/* HDA_PCM_TYPE_XXX */
	int device;		/* device number to assign */
	struct snd_pcm *pcm;	/* assigned PCM instance */
};

/* codec information */
struct hda_codec {
	struct hda_bus *bus;
	unsigned int addr;	/* codec addr*/
	struct list_head list;	/* list point */

	hda_nid_t afg;	/* AFG node id */
	hda_nid_t mfg;	/* MFG node id */

	/* ids */
	u32 function_id;
	u32 vendor_id;
	u32 subsystem_id;
	u32 revision_id;

	/* detected preset */
	const struct hda_codec_preset *preset;
	struct module *owner;
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 31)
	const char *vendor_name;	/* codec vendor name */
	const char *chip_name;		/* codec chip name */
#else
	/* 2.6.30 */
	const char *name;	/* codec name */
#endif
	const char *modelname;	/* model name for preset */

	/* set by patch */
	struct hda_codec_ops patch_ops;

	/* PCM to create, set by patch_ops.build_pcms callback */
	unsigned int num_pcms;
	struct hda_pcm *pcm_info;

	/* codec specific info */
	void *spec;

	/* beep device */
	struct hda_beep *beep;

	/* widget capabilities cache */
	unsigned int num_nodes;
	hda_nid_t start_nid;
	u32 *wcaps;

	struct snd_array mixers;	/* list of assigned mixer elements */

	struct hda_cache_rec amp_cache;	/* cache for amp access */
	struct hda_cache_rec cmd_cache;	/* cache for other commands */

	struct mutex spdif_mutex;
	struct mutex control_mutex;
	unsigned int spdif_status;	/* IEC958 status bits */
	unsigned short spdif_ctls;	/* SPDIF control bits */
	unsigned int spdif_in_enable;	/* SPDIF input enable? */
	hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
	struct snd_array init_pins;	/* initial (BIOS) pin configurations */
	struct snd_array driver_pins;	/* pin configs set by codec parser */

#ifdef CONFIG_SND_HDA_HWDEP
	struct snd_hwdep *hwdep;	/* assigned hwdep device */
	struct snd_array init_verbs;	/* additional init verbs */
	struct snd_array hints;		/* additional hints */
	struct snd_array user_pins;	/* default pin configs to override */
#endif

	/* misc flags */
	unsigned int spdif_status_reset :1; /* needs to toggle SPDIF for each
					     * status change
					     * (e.g. Realtek codecs)
					     */
	unsigned int pin_amp_workaround:1; /* pin out-amp takes index
					    * (e.g. Conexant codecs)
					    */
#ifdef CONFIG_SND_HDA_POWER_SAVE
	unsigned int power_on :1;	/* current (global) power-state */
	unsigned int power_transition :1; /* power-state in transition */
	int power_count;	/* current (global) power refcount */
	struct delayed_work power_work; /* delayed task for powerdown */
#endif

	/* codec-specific additional proc output */
	void (*proc_widget_hook)(struct snd_info_buffer *buffer,
				 struct hda_codec *codec, hda_nid_t nid);
};

/* direction */
enum {
	HDA_INPUT, HDA_OUTPUT
};


/*
 * constructors
 */
int snd_hda_bus_new(struct snd_card *card, const struct hda_bus_template *temp,
		    struct hda_bus **busp);
int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 32)
		      struct hda_codec **codecp);
int snd_hda_codec_configure(struct hda_codec *codec);
#else
		      int do_init, struct hda_codec **codecp);
#endif

/*
 * low level functions
 */
unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid,
				int direct,
				unsigned int verb, unsigned int parm);
int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct,
			unsigned int verb, unsigned int parm);
#define snd_hda_param_read(codec, nid, param) \
	snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param)
int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid,
			  hda_nid_t *start_id);
int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
			    hda_nid_t *conn_list, int max_conns);

struct hda_verb {
	hda_nid_t nid;
	u32 verb;
	u32 param;
};

void snd_hda_sequence_write(struct hda_codec *codec,
			    const struct hda_verb *seq);

/* unsolicited event */
int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex);

/* cached write */
#ifdef SND_HDA_NEEDS_RESUME
int snd_hda_codec_write_cache(struct hda_codec *codec, hda_nid_t nid,
			      int direct, unsigned int verb, unsigned int parm);
void snd_hda_sequence_write_cache(struct hda_codec *codec,
				  const struct hda_verb *seq);
void snd_hda_codec_resume_cache(struct hda_codec *codec);
#else
#define snd_hda_codec_write_cache	snd_hda_codec_write
#define snd_hda_sequence_write_cache	snd_hda_sequence_write
#endif

/* the struct for codec->pin_configs */
struct hda_pincfg {
	hda_nid_t nid;
	unsigned int cfg;
};

unsigned int snd_hda_codec_get_pincfg(struct hda_codec *codec, hda_nid_t nid);
int snd_hda_codec_set_pincfg(struct hda_codec *codec, hda_nid_t nid,
			     unsigned int cfg);
int snd_hda_add_pincfg(struct hda_codec *codec, struct snd_array *list,
		       hda_nid_t nid, unsigned int cfg); /* for hwdep */

/*
 * Mixer
 */
int snd_hda_build_controls(struct hda_bus *bus);
int snd_hda_codec_build_controls(struct hda_codec *codec);

/*
 * PCM
 */
int snd_hda_build_pcms(struct hda_bus *bus);
int snd_hda_codec_build_pcms(struct hda_codec *codec);
void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
				u32 stream_tag,
				int channel_id, int format);
void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid);
unsigned int snd_hda_calc_stream_format(unsigned int rate,
					unsigned int channels,
					unsigned int format,
					unsigned int maxbps);
int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid,
				unsigned int format);

/*
 * Misc
 */
void snd_hda_get_codec_name(struct hda_codec *codec, char *name, int namelen);

/*
 * power management
 */
#ifdef CONFIG_PM
#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 31)
int snd_hda_suspend(struct hda_bus *bus);
#else
/* 2.6.30 */
int snd_hda_suspend(struct hda_bus *bus, pm_message_t state);
#endif
int snd_hda_resume(struct hda_bus *bus);
#endif

/*
 * get widget information
 */
const char *snd_hda_get_jack_connectivity(u32 cfg);
const char *snd_hda_get_jack_type(u32 cfg);
const char *snd_hda_get_jack_location(u32 cfg);

/*
 * power saving
 */
#ifdef CONFIG_SND_HDA_POWER_SAVE
void snd_hda_power_up(struct hda_codec *codec);
void snd_hda_power_down(struct hda_codec *codec);
#define snd_hda_codec_needs_resume(codec) codec->power_count
#else
static inline void snd_hda_power_up(struct hda_codec *codec) {}
static inline void snd_hda_power_down(struct hda_codec *codec) {}
#define snd_hda_codec_needs_resume(codec) 1
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION (2, 6, 32)
#ifdef CONFIG_SND_HDA_PATCH_LOADER
/*
 * patch firmware
 */
int snd_hda_load_patch(struct hda_bus *bus, const char *patch);
#endif
#endif

/*
 * Codec modularization
 */

/* Export symbols only for communication with codec drivers;
 * When built in kernel, all HD-audio drivers are supposed to be statically
 * linked to the kernel.  Thus, the symbols don't have to (or shouldn't) be
 * exported unless it's built as a module.
 */
#ifdef MODULE
#define EXPORT_SYMBOL_HDA(sym) EXPORT_SYMBOL_GPL(sym)
#else
#define EXPORT_SYMBOL_HDA(sym)
#endif

#endif /* __SOUND_HDA_CODEC_H */

[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux