AC'97 problem with new kernel

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm struggling to get sound working with a main line kernel linux-2.6.31.6

At boot I'm getting...

Quote:

dw_dmac.0: DesignWare DMA Controller, 3 channels
Advanced Linux Sound Architecture Driver Version 1.0.20.
AC'97 0 does not respond - RESET
AC'97 0 access is not valid [0xffffffff], removing mixer.
atmel_ac97c: probe of atmel_ac97c.0 failed with error -5
ALSA device list:
No soundcards found.

Is this failure to reset the problem, or is that a red-herring?

The H/W is based on the old STK1002 board.

Steven

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you define the I/O lined used for resetting the external codec in your board code? The AC97C now takes an I/O line which is toggled to reset the external codec.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I believe I have the RESET line configured correctly. In my board support code I have

Quote:
#include
...
#define PIN_AC97_RST_N GPIO_PIN_PB(16) /* AC97 reset output pin */
...

static struct ac97c_platform_data __initdata ac97c0_data = {
.reset_pin = PIN_AC97_RST_N,
};

void __init setup_board(void)
{
...
at32_add_device_ac97c(0, &ac97c0_data, AC97C_BOTH);
...
}

Steven

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kernel seems well configured!

Are you sure your ac97 sound codec is good? Does stk1002 has a sound codec on board or did you make a board with it?

Sérgio

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TheSergon13 wrote:
Are you sure your ac97 sound codec is good? Does stk1002 has a sound codec on board or did you make a board with it?

I'm fairly sure the codec is good. I have two units that are know to work with older kernels and they both fail in the same way.

We have a Wolfson WM9715L Codec directly connected to the AC97 controller in the AT32AP7001 (PB20-23) and a GPIO line (PB126) directly connected to the RESET of the WM9715L.

On a scope I see a 4us low pulse on the RESET line - good logic levels. I don't see any activity on any of the other AC97 lines. I was expecting to see a clock from the codec after the hard reset - is that right?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I was expecting to see a clock from the codec after the hard reset - is that right?

Yes, the codec should start providing clock signal after the reset. Usually there are some mode lines on the codec that needs to be pull-up or pull-down, configuring the codec to start the oscillator after a reset. You do have a 24.576 MHz crystal on the codec? Or whatever it needs to start cooking?

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hce wrote:
Quote:
Yes, the codec should start providing clock signal after the reset. Usually there are some mode lines on the codec that needs to be pull-up or pull-down, configuring the codec to start the oscillator after a reset. You do have a 24.576 MHz crystal on the codec? Or whatever it needs to start cooking?

We do have a 24.576MHz crystal and we know the arrangement works as it was working with an earlier kernel.

Do I need to 'reserve' the GPIO lines used for the AC97 in some way? Just wondering if there's some way that they have got set as outputs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nope, everything is handled by the sound/atmel/ac97c.c driver. Hmm... or perhaps it would be safer to do a at32_select_gpio(pin, mode) in the board code. Try that and see if it improves. But as you have figured out already, it is really toggling.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm facing exactly the same problem. After the RESET signal I have no clock in SCLK pin, and my oscillator is not providing any clock.
Any suggestions?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We spent a happy hour or two this afternoon looking at the signals and comparing old and new kernels. They look quite different. However, neither seems to produce the same timing as suggested by the Wolfson datasheet.

The old kernel pulls the reset low for about 380ms, then releases it high for about 10ms before pulsing it low for 10us. Sync also goes high at about the same time, but we don't see the clock for another 1.1ms later (datasheet suggest it should start in about 680ns).

With the new kernel the the reset stays high and all we see is a 4us pulse low. All all other signals start low or or are pulled low at least 400ms before the reset and are inactive from then on.

It looks like it might be that the I/O lines are not being configured correctly. Either that or the changes made to the way reset works are aversely affecting the Wolfson device we are using.

Sérgio, it somehow reassuring that I'm not the only ones having problems! Are you using the Wolfsom device or some other Codec?

Steven

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using an ac97 codec, LM4550 from National Semiconductors, and NGW100 board

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Steven,
Got something?

Last Edited: Fri. May 14, 2010 - 04:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Slight delay here while I look at something else. Will be back soon.

When I do, my plan is to see if I can get the clock out of the codec manually. I'm going to cut the tracks to the processor (in case they are conflicting) and try a h/w reset (pulse RESET low manually). That ought to cause an clock output to start from the codec.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, I have the same problem here anybody figured it out something useful ?
I would be very happy if you share with me (us). :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

make a search with google for "ac97c.c"
There are a lot of hits solving the problem.
as there is:
http://www.linuxhq.com/kernel/v2...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

asbela wrote:
Thank you!

Has that fixed it for you?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

not at all, because the difference of the two source was the upgrade for the AT91 series.

so still no sound. :(

but now I am designing a new board with WM9705, maybe with that I will have a better luck.

but it really annoys me that the price of the AP7000 doubled in the last year :(

maybe the MICROCHIP will buy ATMEL after all ????