Skip to contentSkip to conversation

: Conexant Moden "not ready"

ALSA - driver 0000509 [email protected] 1 participant 1 message Sep 23, 2004

lore
Share & tools
lore
#0 lore raw

A BUGNOTE has been added to this bug.
======================================================================
https://bugtrack.alsa-project.org/alsa-bug/bug_view_advanced_page.php?bug_id=0000509
======================================================================

Reported By:                gbilotta
Assigned To:                sashak
======================================================================
Project:                    ALSA - driver
Bug ID:                     509
Category:                   PCI - intel8x0m
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     assigned
Distribution:               Debian GNU/Linux Testing
Kernel Version:             2.6.7
======================================================================
Date Submitted:             09-20-2004 19:20 CEST
Last Modified:              09-23-2004 14:33 CEST

======================================================================
Summary: Conexant Moden "not ready"
Description:
modprobing for snd_intel8x0m gives the following error:

MC'97 1 converters and GPIO not ready (0xff00)
======================================================================

----------------------------------------------------------------------
sashak - 09-20-2004 22:23 CEST
----------------------------------------------------------------------
Hello Giuseppe "Oblomov",

I'm not sure that this is the reason, but according to AC97 spec (rev.2.3 at least) modem reset should be performed by writing something to register AC97_EXTENDED_MID (0x3c) and AC97_RESET (0x0) should not be touched. So probably this hw just works in right way.

Just for clarification could you try this patch ( cd linux-2.6.7 ; patch -p0 ):

--- sound/pci/ac97/ac97_codec.c.orig 2004-09-20 23:00:24.903845416
+0300
+++ sound/pci/ac97/ac97_codec.c 2004-09-20 23:07:23.341233264 +0300 @@ -1784,7 +1784,16 @@

                goto __access_ok;
        }

+#define JUST_FORCHECK 1
+#ifdef JUST_FORCHECK
+ /* reset to defaults */
+ if(ac97->scaps & AC97_SCAP_SKIP_AUDIO)
+ snd_ac97_write(ac97, AC97_EXTENDED_MID, 0); /* modem
*/
+ else
+ snd_ac97_write(ac97, AC97_RESET, 0); /* audio */
+#else

        snd_ac97_write(ac97, AC97_RESET, 0);    /* reset to defaults */
+#endif
        if (bus->wait)
                bus->wait(ac97);
        else {

----------------------------------------------------------------------
gbilotta - 09-22-2004 00:24 CEST
----------------------------------------------------------------------
Yes, your diagnosis seems to be correct. With the separate init code for the modem I don't get the "not ready" error. Of course I'm still not 100% sure whether I can use the modem or not ... is there some way I can check?

----------------------------------------------------------------------
sashak - 09-22-2004 02:16 CEST
----------------------------------------------------------------------
Good for start. Thanks. :)
You may try to capture sound from phone line (with arecord) - when line is connected you should be able to record dial tone in grabbed file. If it will ok. Try to dial with slmodem-2.9.9-alsa
(http://linmodems.technion.ac.il/packages/smartlink/).
If not please send again '/proc/asound/Modem/codec97#0/mc97#1-1+regs'.

----------------------------------------------------------------------
gbilotta - 09-22-2004 13:52 CEST
----------------------------------------------------------------------
I only get silence (except for an initial and final click) when trying to record, and still a couple of errors. I'm uploading a test.out file showing the (console) outputs from the recording and from cat'ing the /proc regs file.

----------------------------------------------------------------------
sashak - 09-22-2004 19:53 CEST
----------------------------------------------------------------------
Could you try patch below with 8000 rate arecord:

arecord -D hw:1 -v -d 5 -f S16_LE -r 8000 -t wav result.wav

And please grab '/proc/asound/Modem/codec97#0/mc97#1-1+regs' during arecord or aplay.

Thanks.

pci/intel8x0m.c 2004-09-22 20:48:53.969919792 +0200 renamed from pci/intel8x0m.c.orig 2004-09-22 20:34:21.929490088 +0200 +0 -2
@@ -643,12 +643,10 @@
        /* TODO: move it to ac97 controls */
        switch (cmd) {
        case SNDRV_PCM_TRIGGER_START:
-               snd_ac97_update_bits(ichdev->ac97, AC97_GPIO_STATUS,
-                                    AC97_GPIO_LINE1_OH,

AC97_GPIO_LINE1_OH);
+ snd_ac97_write(ichdev->ac97, AC97_GPIO_STATUS, 0x31)

                break;
        case SNDRV_PCM_TRIGGER_STOP:

- snd_ac97_update_bits(ichdev->ac97, AC97_GPIO_STATUS,
- AC97_GPIO_LINE1_OH,
~AC97_GPIO_LINE1_OH);
+ snd_ac97_write(ichdev->ac97, AC97_GPIO_STATUS, 0x20)

                break;
        default:
                return -EINVAL;
@@ -684,9 +682,9 @@
        .rate_max =             16000,
        .channels_min =         1,
        .channels_max =         1,
-       .buffer_bytes_max =     32 * 1024,
+       .buffer_bytes_max =     64 * 1024,
        .period_bytes_min =     32,
-       .period_bytes_max =     32 * 1024,
+       .period_bytes_max =     64 * 1024,
        .periods_min =          1,
        .periods_max =          1024,
        .fifo_size =            0,

@@ -818,8 +816,8 @@
.suffix = "Modem",
.playback_ops = &snd_intel8x0m_playback_ops, .capture_ops = &snd_intel8x0m_capture_ops,

-               .prealloc_size = 4 * 1024,
-               .prealloc_max_size = 16 * 1024,
+               .prealloc_size = 32 * 1024,
+               .prealloc_max_size = 64 * 1024,
        },

};

----------------------------------------------------------------------
gbilotta - 09-23-2004 14:33 CEST
----------------------------------------------------------------------
Bad news. I had to rebuild the kernel because of other issues I was having, and now even with your initial patch I get the "GPIO not ready" error.

The new patch (which is lacking a coule of ;, BTW :)) (yes, I tried using it even though I got the error message) has the effect of having arecord fail complaining about the number of channels not being available, even when -c 1 was specified on the comand line.

I'm attaching cat_regs and cat_regs2, which is the cat of /proc/...+regs during arecord execution, before and after the application of the patch.

Bug History
Date Modified Username Field Change
======================================================================

09-20-04 19:20 gbilotta       New Bug                                      
09-20-04 19:20 gbilotta       File Added: asound.tar.bz2                    
09-20-04 19:20 gbilotta       Distribution              => Debian GNU/Linux Testing
09-20-04 19:20 gbilotta       Kernel Version            => 2.6.7           
09-20-04 19:21 gbilotta       File Added: lspci.out                        
09-20-04 22:23 sashak         Bugnote Added: 0001795                       
09-22-04 00:24 gbilotta       Bugnote Added: 0001809                       
09-22-04 02:16 sashak         Bugnote Added: 0001810                       
09-22-04 13:52 gbilotta       Bugnote Added: 0001812                       
09-22-04 13:53 gbilotta       File Added: test.out                         
09-22-04 19:53 sashak         Bugnote Added: 0001818                       
09-23-04 14:33 gbilotta       Bugnote Added: 0001826                       

======================================================================

-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php