Re: HOWTO for Agere 11C11040 Modem on HDA cards. (Roan, menedas, & others)

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

 



Please try the attached serial patch for the agrsm-ALSA15 source.
Should patch the serial26.c and resolve this error.
Let me know,
Bjorn.


roan wrote:
didn't succeed:

:~/Desktop/agrsm-HDA-20080721-ALSA15$ make module
make -C /lib/modules/`uname -r`/build/ SUBDIRS=/home/roan/Desktop/agrsm-HDA-20080721-ALSA15 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic'
  CC [M] /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.o
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_request_irq’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:284: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_task_queue_init’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:448: warning: assignment from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_task_queue_init_usb’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:460: warning: assignment from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: At top level: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:487: warning: function declaration isn’t a prototype /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:513: warning: function declaration isn’t a prototype /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:523: warning: function declaration isn’t a prototype /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:528: warning: function declaration isn’t a prototype /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_usb_buffer_alloc_kernel’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:623: warning: control reaches end of non-void function /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_usb_buffer_alloc_atomic’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:617: warning: control reaches end of non-void function /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_usb_get_dev’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:577: warning: control reaches end of non-void function /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_usb_alloc_urb_atomic’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:532: warning: control reaches end of non-void function /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: In function ‘x_usb_alloc_urb_kernel’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:527: warning: control reaches end of non-void function /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c: At top level: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/agrsoftmodem.c:133: warning: ‘uss_driver’ defined but not used
  CC [M] /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.o
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:208: warning: function declaration isn’t a prototype /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘GetHDABaseAddress’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:219: warning: assignment makes integer from pointer without a cast /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:221: warning: return makes pointer from integer without a cast /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:211: warning: unused variable ‘codec_temp’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘HDAdump’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:236: warning: format ‘%x’ expects type ‘unsigned int’, but argument 2 has type ‘void *’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:240: warning: format ‘%08X’ expects type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:240: warning: format ‘%08X’ expects type ‘unsigned int’, but argument 4 has type ‘long unsigned int’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:240: warning: format ‘%08X’ expects type ‘unsigned int’, but argument 5 has type ‘long unsigned int’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:240: warning: format ‘%08X’ expects type ‘unsigned int’, but argument 6 has type ‘long unsigned int’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:231: warning: unused variable ‘codec_temp’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘setResumeCallBack’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:279: warning: assignment from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:280: warning: assignment from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘setSuspendCallBack’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:285: warning: assignment from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:286: warning: assignment from incompatible pointer type
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: At top level:
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:290: warning: function declaration isn’t a prototype /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘resetResumeCallBack’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:291: warning: assignment from incompatible pointer type
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: At top level:
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:295: warning: function declaration isn’t a prototype /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘resetSuspendCallBack’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:296: warning: assignment from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘LnxTransferCodecVerbs’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:302: warning: unused variable ‘CodecAddress’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘LnxTransferCodecVerbsWrite’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:323: warning: unused variable ‘CodecAddress’ /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c: In function ‘findHDACodec’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/HDA.c:270: warning: control reaches end of non-void function
  CC [M] /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.o
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c: In function ‘serial8250_startup’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:1434: warning: assignment from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c: In function ‘serial8250_set_termios’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:1699: warning: passing argument 2 of ‘uart_get_baud_rate’ from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:1699: warning: passing argument 3 of ‘uart_get_baud_rate’ from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c: In function ‘serial8250_config_port’: /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:2026: error: ‘UPF_BOOT_ONLYMCA’ undeclared (first use in this function) /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:2026: error: (Each undeclared identifier is reported only once /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:2026: error: for each function it appears in.)
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c: At top level:
/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:2115: warning: initialization from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:2116: warning: initialization from incompatible pointer type /home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.c:2123: warning: initialization from incompatible pointer type make[2]: *** [/home/roan/Desktop/agrsm-HDA-20080721-ALSA15/serial26.o] Error 1 make[1]: *** [_module_/home/roan/Desktop/agrsm-HDA-20080721-ALSA15] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic'
make: *** [module] Error 2
roan@Friend:~/Desktop/agrsm-HDA-20080721-ALSA15$ sudo make module
[sudo] password for roan:
make -C /lib/modules/`uname -r`/build/ SUBDIRS= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic'
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  UPD     include/linux/utsrelease.h
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/docproc
make[2]: *** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'. Stop.
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic'
make: *** [module] Error 2


On Sat, 26 Jul 2008 09:35:15 -0300
 Bjorn Wielens <Uniacke1@xxxxxxxx> wrote:
Hi Roan,
Another step forward, getting the ALSA modules patched... great!
Please try with the 'agrsm-HDA-20080721-ALSA15.tar.bz2' file (also in the 11c11040 pit) That error is likely because the agrsm driver you're compiliing is for alsa 1.0.16 or newer, but the kernel sources have ALSA 1.0.15 or older. After the modules are built (two .ko files) copy them to /lib/modules/(kernel version)/extra and run 'sudo depmod -ae' to have the system recognize them.

after which, you can do 'sudo modprobe agrmodem' and 'sudo modprobe agrserial' If the first one fails with 'disagrees about version snd_cards' in 'dmesg' then retry but with 'sudo modprobe agrmodem --force-modversion'

Good luck!
Bjorn.


roan wrote:
so 'make modules_install' helped instead of 'make modules-install'. new modules from kernel source where installed
now i unpacked agrsm-HDA-20080721.tar.bz2
and in that dir tried to do 'make module'
another error at the end
look at the attachment, pls.


On Fri, 25 Jul 2008 19:01:07 -0300
Bjorn Wielens <Uniacke1@xxxxxxxx> wrote:
Hi Roan,
What happens if you try just 'make modules' and skip the config part?
Otherwise you will need to try 'sudo make yesconfig' and then do 'make modules' etc. but then copy ONLY the snd-hda-intel.ko module, none of the others.
Bjorn.


roan wrote:
i've downloaded linux-source-2.6.24.tar.bz2 to /usr/src/
then
tar jxvf linux-source-2.6.24.tar.bz2
cd /usr/src/linux-source-2.6.24
then edited hda_codec.c
sudo gedit sound/pci/hda/hda_codec.c
saved it
after that i tryed to do 'make cloneconfig' in /usr/src/linux-source-2.6.24 dir
and there was an error:

/usr/src/linux-source-2.6.24$ make cloneconfig
HOSTCC scripts/basic/fixdep
scripts/basic/fixdep.c:399: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
compilation terminated.
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

or then with sudo

/usr/src/linux-source-2.6.24$ sudo -s
/usr/src/linux-source-2.6.24# make cloneconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
make[1]: *** No rule to make target `cloneconfig'. Stop.
make: *** [cloneconfig] Error 2

:(

On Fri, 25 Jul 2008 12:32:36 -0400 (EDT)
Bjorn Wielens <uniacke1@xxxxxxxx> wrote:
Hi Roan,
Sorry this is taking longer than expected, but thanks
for bearing with me... we will get this modem working
in the end.

The version differences between Aplay and the version
file are disturbing... It means things will be more
difficult to figure out for me :)

Anyway, since you have the ALSA _modules_ 1.0.16, the
following should work. (assuming you have kernel
sources installed):

'cd /usr/src/linux'.
MANUALLY edit the file sound/pci/hda/hda_codec.c (or
pci/hda/hda_codec.c if the former is not there) to
have the following two lines. (Put them after the list
of '#includes' at the beginning of the file):

EXPORT_SYMBOL(snd_hda_codec_read);
EXPORT_SYMBOL(snd_hda_codec_write);

Then, in the /usr/src/linux dir, do the following
'make cloneconfig'
'make clean'
'make modules'
'make modules-install'. This will install the fixed
sound modules.
The modem driver for ALSA modules 1.0.16 and newer is
in this tarball:
http://linmodems.technion.ac.il/packages/ltmodem/11c11040/agrsm-HDA-20080721.tar.bz2

extract, and in the dir, do 'make module'. Then copy
the two .ko files to /lib/modules/(kernel
version)/extra and run 'sudo depmod -ae' You should then be able to modprobe the files and the
/dev/ttyAGS3 modem port will be usable.
Hope this helps,
Bjorn.




--- roan <roan@xxxxxxxx> wrote:

hi
nothing is helping or i'm doing smth wrong. if you'd
be so kind please help me to solve the problem step by
step.
i installed fresh new ubuntu 8.04.1 with english
locale and downloaded all upgrades.
and installed build-essential package.

'cat /proc/asound/version' says this:

--------------
$ cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version
1.0.16.
Compiled on Jun 18 2008 for kernel 2.6.24-19-generic

(SMP).
--------------

but 'aplay --version':

--------------
$ aplay --version
aplay: version 1.0.15 by Jaroslav Kysela
<perex@xxxxxxxx>
--------------

then using apt-get i downloaded alsa-source package
and untar it to my home folder.
then downloaded hda_symbols.patch and put it to that

folder with alsa driver source.
applied patch:

--------------
$ patch -p1 < hda_symbols.patch
patching file alsa-kernel/pci/hda/hda_codec.c
Hunk #1 succeeded at 132 (offset 30 lines).
Hunk #2 succeeded at 158 (offset 30 lines).
patching file sound/pci/hda/hda_codec.c
Reversed (or previously applied) patch detected! Assume -R? [n] N
Apply anyway? [n] N
Skipping patch.
patch unexpectedly ends in middle of line
2 out of 2 hunks ignored -- saving rejects to file sound/pci/hda/hda_codec.c.rej
--------------

then i tried to do 'make' (as it goes in first
manual you send) in the same folder but i got an error (look
the attached file)

please tell me what next should i do?
---
Professional hosting for everyone -
http://www.host.ru
> --------------
$make
make all-deps
make[1]: Entering directory
`/home/roan/Desktop/TESTING/modules/alsa-driver'
utils/mod-deps --basedir

/home/roan/Desktop/TESTING/modules/alsa-driver/alsa-kernel
--hiddendir
/home/roan/Desktop/TESTING/modules/alsa-driver
--versiondep

/home/roan/Desktop/TESTING/modules/alsa-driver/kconfig-vers
--makeconf > toplevel.config.in
utils/mod-deps: 1: ELF: not found
utils/mod-deps: 1: @8: not found
utils/mod-deps: 2: @: not found
utils/mod-deps: 3: !
: not found
utils/mod-deps: 4: ��: not found
utils/mod-deps: 1: Syntax error: word unexpected
(expecting ")")
make[1]: *** [toplevel.config.in] Error 2
make[1]: Leaving directory
`/home/roan/Desktop/TESTING/modules/alsa-driver'
make: *** [dummy1] Error 2
--------------




__________________________________________________________________
Looking for the perfect gift? Give the gift of Flickr!
http://www.flickr.com/gift/

---
Professional hosting for everyone - http://www.host.ru



---
Professional hosting for everyone - http://www.host.ru


---
Professional hosting for everyone - http://www.host.ru


--- Modem/serial26.c.orig	2008-02-29 17:20:12.000000000 -0300
+++ Modem/serial26.c	2008-02-29 18:33:15.000000000 -0300
@@ -290,7 +290,7 @@ struct ltmodem_res
 
 struct ltmodem_ops lt_modem_ops;
 struct ltmodem_res lt_modem_res;
-static void agr_rs_interrupt (void);
+static void agr_rs_interrupt (unsigned long dummy);
 static int intf_flag = 0;
 static int uart_flag = 0;
 static int tx_empty_flag = 0;
@@ -929,21 +929,27 @@ static void autoconfig_irq(struct uart_8
 	up->port.irq = (irq > 0) ? irq : 0;
 }
 
-static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop)
+static inline void __stop_tx(struct uart_8250_port *p)
+{
+	if (p->ier & UART_IER_THRI) {
+		p->ier &= ~UART_IER_THRI;
+		serial_out(p, UART_IER, p->ier);
+	}
+}
+
+static void serial8250_stop_tx(struct uart_port *port)
 {
 	struct uart_8250_port *up = (struct uart_8250_port *)port;
 
-	if (up->ier & UART_IER_THRI) {
-		up->ier &= ~UART_IER_THRI;
-		serial_out(up, UART_IER, up->ier);
-	}
-	if (up->port.type == PORT_16C950 && tty_stop) {
+	__stop_tx(up);
+
+	if (up->port.type == PORT_16C950) {
 		up->acr |= UART_ACR_TXDIS;
 		serial_icr_write(up, UART_ACR, up->acr);
 	}
 }
 
-static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start)
+static void serial8250_start_tx(struct uart_port *port)
 {
 	struct uart_8250_port *up = (struct uart_8250_port *)port;
 
@@ -954,7 +960,7 @@ static void serial8250_start_tx(struct u
 	/*
 	 * We only do this from uart_start
 	 */
-	if (tty_start && up->port.type == PORT_16C950) {
+	if (up->port.type == PORT_16C950 && up->acr & UART_ACR_TXDIS) {
 		up->acr &= ~UART_ACR_TXDIS;
 		serial_icr_write(up, UART_ACR, up->acr);
 	}
@@ -1057,14 +1063,18 @@ static _INLINE_ void transmit_chars(stru
 	struct circ_buf *xmit = &up->port.info->xmit;
 	int count;
 
-  if (up->port.x_char) {
+	if (up->port.x_char) {
 		serial_outp(up, UART_TX, up->port.x_char);
 		up->port.icount.tx++;
 		up->port.x_char = 0;
 		return;
 	}
-	if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
-		serial8250_stop_tx(&up->port, 0);
+	if (uart_tx_stopped(&up->port)) {
+		serial8250_stop_tx(&up->port);
+		return;
+	}
+	if (uart_circ_empty(xmit)) {
+		__stop_tx(up);
 		return;
 	}
 
@@ -1083,7 +1093,7 @@ static _INLINE_ void transmit_chars(stru
 	DEBUG_INTR("THRE...");
 
 	if (uart_circ_empty(xmit))
-		serial8250_stop_tx(&up->port, 0);
+		__stop_tx(up);
 }
 
 static _INLINE_ void check_modem_status(struct uart_8250_port *up)
@@ -1196,7 +1206,7 @@ static irqreturn_t serial8250_interrupt(
 }
 
 #ifdef LUCENT_MODEM
-static void agr_rs_interrupt (void)
+static void agr_rs_interrupt (unsigned long dummy)
 {
   serial8250_interrupt(lt_modem_res.Irq,NULL,NULL);
  if(start_int)
@@ -1658,8 +1668,8 @@ static unsigned int serial8250_get_divis
 }
 
 static void
-serial8250_set_termios(struct uart_port *port, struct termios *termios,
-		       struct termios *old)
+serial8250_set_termios(struct uart_port *port, struct ktermios *termios,
+		       struct ktermios *old)
 {
 	struct uart_8250_port *up = (struct uart_8250_port *)port;
 	unsigned char cval, fcr = 0;

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

  Powered by Linux