snd_au8820 0000:01:04.0: BUG: , pos = 16386, buffer size = 16384, period size = 1024

Bug #1551041 reported by sudodus
46
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Kernel oops in a new installed system, that I configuring ...

ProblemType: KernelOops
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-8-generic 4.4.0-8.23
ProcVersionSignature: Ubuntu 4.4.0-8.23-generic 4.4.2
Uname: Linux 4.4.0-8-generic i686
NonfreeKernelModules: nvidia
Annotation: Your system might become unstable now and might need to be restarted.
ApportVersion: 2.20-0ubuntu3
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: olle 1606 F.... pulseaudio
 /dev/snd/controlC0: olle 1606 F.... pulseaudio
Date: Mon Feb 29 00:00:56 2016
Failure: oops
HibernationDevice: RESUME=UUID=03bed9e9-e39b-4107-8cd6-c2612af9a6aa
InstallationDate: Installed on 2016-02-28 (0 days ago)
InstallationMedia: Lubuntu 16.04 LTS "Xenial Xerus" - Alpha i386 (20160226)
IwConfig:
 enp31s0 no wireless extensions.

 lo no wireless extensions.
MachineType: Hewlett-Packard HP xw8400 Workstation
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-8-generic root=UUID=2160f8ed-4aa3-4243-b5d6-f87c1967e253 ro quiet splash
PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
RelatedPackageVersions: kerneloops-daemon 0.12+git20090217-3ubuntu9
RfKill:

SourcePackage: linux
Title: snd_au8820 0000:01:04.0: BUG: , pos = 16386, buffer size = 16384, period size = 1024
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/09/2009
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 786D5 v02.37
dmi.board.name: 0A08h
dmi.board.vendor: Hewlett-Packard
dmi.board.version: NA
dmi.chassis.asset.tag: CZC722497N
dmi.chassis.type: 6
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvr786D5v02.37:bd07/09/2009:svnHewlett-Packard:pnHPxw8400Workstation:pvr:rvnHewlett-Packard:rn0A08h:rvrNA:cvnHewlett-Packard:ct6:cvr:
dmi.product.name: HP xw8400 Workstation
dmi.sys.vendor: Hewlett-Packard

Revision history for this message
sudodus (nio-wiklund) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Critical
penalvch (penalvch)
tags: added: bios-outdated-2.38
Changed in linux (Ubuntu):
importance: Critical → Low
status: Confirmed → Incomplete
Revision history for this message
sudodus (nio-wiklund) wrote :

Thank you for working with this bug :-)

But I must admit, that I don't understand what is the problem. Except from the automatic prompting for bug reports, I do not notice any problem. The computer run happily like it has been running with older versions of Lubuntu and Xubuntu.

And since I see no problem, I am scared of flashing a new BIOS. I have no UPS, so with bad luck, I think I could brick my old workstation.

I know (I read the wiki page) that I should be brave and flash the BIOS, but ...

Please explain the bug, and what I would improve by getting rid of it :-)

Revision history for this message
sudodus (nio-wiklund) wrote :

I upgraded to a new kernel today and it works well. No kernel oops during normal operation.

I started a virtual machine in VirtualBox - still no kernel oops. I closed the virtual machine, and then there was a kernel oops, bug report #1554980

But I notice no other problem (than prompting the bug report). I'm still thinking like this: 'If it ain't broke, don't fix it' and I hesitate to tamper with the BIOS.

Revision history for this message
Raymond (superquad-vortex2) wrote :

snd_au8820 0000:01:04.0: BUG: , pos = 16386, buffer size = 16384, period size = 1024 snd_au8820 0000:01:04.0: BUG: , pos = 16386, buffer size = 16384, period size = 1024

Any steps to reprodcue these message

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/au88x0

This mean snd_vortex_pcm_pointer return a value larger than period size
most likely bug in vortex_adbdma_getlinearpos(chip, dma)

Do the error ocurr on other ubuntu version 14.04 or 12.04 live cd?

affects: linux (Ubuntu) → alsa-driver (Ubuntu)
Revision history for this message
sudodus (nio-wiklund) wrote :

I have been running 12.04 LTS i386 (the precise kernel series) for years in this hp xw8400 workstation without any such problem (including VirtualBox).

I have been running 12.04 LTS amd64 and 14.04 LTS, both i386 and amd64 (the precise kernel series) less frequently for years in this hp xw8400 workstation without any such problem (including VirtualBox, I used an amd64 system as host for amd64 guest systems in VirtualBox.)

I will try to boot from live USB drives.

- What iso files do you want me to clone into boot drives?

- And what tasks do you want me to perform in the live systems?

Revision history for this message
sudodus (nio-wiklund) wrote :

I should mention that I have installed pulseaudio and pavucontrol and use them to manage audio. Does this make a difference concerning ALSA?

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

It is not related to the above two patch if your au8820 still work without the error on ubuntu 14.4 live cd

Revision history for this message
sudodus (nio-wiklund) wrote :

Maybe I understand what you mean, but I don't know what to do :-)

Which iso file?

Ubuntu 14.04.1 LTS - trusty kernel
Ubuntu 14.04 2 LTS - utopic kernel
Ubuntu 14.04.3 LTS - vivid kernel
Ubuntu 14.04.4 LTS - wily kernel

and since I have the problem in i386 architecture I suppose I should use the same for testing with an iso file.

My audio is working now (although I get these kernel oops prompts to file bug reports).

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/core?id=d507941beb1ef98c19e2902007aee4faf36f854f

ALSA: pcm: Correct PCM BUG error message
While converting to dev_*(), the message showing the invalid PCM
position was wrongly tagged as if an XRUN although it's actually a
BUG. This patch corrects the message again.

@@ -345,7 +345,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
    snd_pcm_debug_name(substream, name, sizeof(name));
    xrun_log_show(substream);
    pcm_err(substream->pcm,
- "XRUN: %s, pos = %ld, buffer size = %ld, period size = %ld\n",
+ "BUG: %s, pos = %ld, buffer size = %ld, period size = %ld\n",
     name, pos, runtime->buffer_size,
     runtime->period_size);
   }

Revision history for this message
Raymond (superquad-vortex2) wrote :

Do the message appear in every application or occur everytime when playing sound?

aplay -D hw:CARD=AU8820 anystereo.wav

speaker-test -c2 -t wav -D hw:CARD=AU8820

Revision history for this message
sudodus (nio-wiklund) wrote :

These commands do not work:
--
$ aplay -D hw:CARD=AU8820 ./test/test0/'hello world.wav' # which is a real file that works with mplayer
ALSA lib pcm_hw.c:1700:(_snd_pcm_hw_open) Invalid value for card
aplay: main:722: fel vid öppning av ljud: Enheten finns inte

$ speaker-test -c2 -t wav -D hw:CARD=AU8820

speaker-test 1.1.0

Uppspelningsenhet är hw:CARD=AU8820
Strömparametrar är 48000 Hz, S16_LE, 2 kanaler
WAV-fil(er)
ALSA lib pcm_hw.c:1700:(_snd_pcm_hw_open) Invalid value for card
Fel vid öppning av uppspelningsenhet: -19, Enheten finns inte
--

But I can play with espeak, and I can play music with for example mplayer without any more complaints about kernel oops, and it works with 2 channels

'AUDIO: 48000 Hz, 2 ch, floatle, 384.0 kbit/12.50% (ratio: 48000->384000)
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)' as illustrated here:
--
$ mplayer Halleluja-15_c.mp4
MPlayer2 2.0-728-g2c378c7-4build2 (C) 2000-2012 MPlayer Team
[ass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.0.1 (COMPLEX)
[ass] Using font provider fontconfig
Cannot open file '/home/olle/.mplayer/input.conf': No such file or directory
Failed to open /home/olle/.mplayer/input.conf.
Cannot open file '/etc/mplayer/input.conf': No such file or directory
Failed to open /etc/mplayer/input.conf.

Playing Halleluja-15_c.mp4.
Detected file format: QuickTime / MOV (libavformat)
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (ac3), -aid 0, -alang und
[ass] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.0.1 (COMPLEX)
[ass] Using font provider fontconfig
Clip info:
 major_brand: isom
 minor_version: 512
 compatible_brands: isomiso2avc1mp41
 creation_time: 1970-01-01 00:00:00
 encoder: Lavf53.3.0
Load subtitles in .
Selected video codec: H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 [libavcodec]
Selected audio codec: ATSC A/52A (AC-3) [libavcodec]
AUDIO: 48000 Hz, 2 ch, floatle, 384.0 kbit/12.50% (ratio: 48000->384000)
AO: [pulse] 48000Hz 2ch floatle (4 bytes per sample)
Starting playback...
VIDEO: 720x576 25.000 fps 2047.4 kbps (255.9 kB/s)
Aspect ratio is 1.33:1 - scaling to correct movie aspect.
VO: [vdpau] 720x576 => 768x576 Planar YV12
[vdpau] Got display refresh rate 60.000 Hz.
[vdpau] If that value looks wrong give the -vo vdpau:fps=X suboption manually.
A: 47.2 V: 47.2 A-V: 0.000 ct: 0.000 0/ 0 0% 1% 0.4% 0 0
--

Revision history for this message
sudodus (nio-wiklund) wrote :

There is a damaged onboard audio device. There is also an audio device built into the graphics card, but I don't use hdmi.

This is the reason why I use the old Aureal Vortex 1 card (au 8820). Could the damaged onboard audio device cause some confusion?

Revision history for this message
sudodus (nio-wiklund) wrote :

aplay ./test/test0/'hello world.wav'

and

speaker-test -c2 -t wav

work correctly (through the Aureal device) without your explicit specification.

'Front left' 'Front right' ... is put out from the correct loudspeakers :-)

They work without 'complaints'.

But it seems that when I have the pavucontrol settings menu open, there are 'complaints' alias prompts to file bug reports about kernel oops. (I have seen it three times, so it seems repeatable.)

Revision history for this message
Raymond (superquad-vortex2) wrote :

Should use au8820 instead of AU8820 when using aplay and speaker-test

Do device 3 of au8820 work or not? never work on au8830

hw:CARD=au8820,3

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://git.alsa-project.org/?p=alsa-tools.git;a=blob;f=hwmixvolume/README;hb=HEAD

You can use hwmixvolume to change the playback volume of each application which use hw device of au8820

It allow up to 8 stereo streams or 16 mono streams

card 1: au8820 [Aureal Vortex au8820], device 0: Aureal Vortex ADB [au8820 adb] Subdevices: 16/16 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 Subdevice #8: subdevice #8 Subdevice #9: subdevice #9 Subdevice #10: subdevice #10 Subdevice #11: subdevice #11 Subdevice #12: subdevice #12 Subdevice #13: subdevice #13 Subdevice #14: subdevice #14 Subdevice #15: subdevice #15

Revision history for this message
Raymond (superquad-vortex2) wrote :

How often do the message appear in system log? (BUG 16.04 or XRUN before 14.04)

it mean the value return is larger than buffer size or the interrupt is not handled properly

static inline int vortex_adbdma_getlinearpos(vortex_t * vortex, int adbdma) { stream_t *dma = &vortex->dma_adb[adbdma]; int temp, page, delta; temp = hwread(vortex->mmio, VORTEX_ADBDMA_STAT + (adbdma << 2)); page = (temp & ADB_SUBBUF_MASK) >> ADB_SUBBUF_SHIFT; if (dma->nr_periods >= 4) delta = (page - dma->period_real) & 3; else { delta = (page - dma->period_real); if (delta < 0) delta += dma->nr_periods; } return (dma->period_virt + delta) * dma->period_bytes + (temp & (dma->period_bytes - 1)); }

Revision history for this message
Raymond (superquad-vortex2) wrote :

dev_info(vortex->card->dev, "%d virt=%d, real=%d, delta=%d\n", adbdma, dma->period_virt, dma->period_real, delta);

Do you find the above info in system log when you specify small fragment

 --period-size=16 when using aplay

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
sudodus (nio-wiklund) wrote :

Last night I shut down the computer. This morning, when I cold booted it and logged in, I was spammed with around ten prompts to file bug reports about kernel oops (at once, not after starting any application program). But still the audio works like it should (playing video and running your test command lines).

--

'Should use au8820 instead of AU8820 when using aplay and speaker-test'

Yes, it works with lower case au8820 :-)

'Do device 3 of au8820 work or not? never work on au8830

hw:CARD=au8820,3'

I don't know if there is a third device of au8820. Anyway,

$ aplay -D hw:CARD=au8820,2 /media/multimed-2/test/test0/'hello world.wav'
aplay: main:722: fel vid öppning av ljud: Filen eller katalogen finns inte
- no such file

$ aplay -D hw:CARD=au8820,1 /media/multimed-2/test/test0/'hello world.wav'
aplay: main:722: fel vid öppning av ljud: Filen eller katalogen finns inte
- no such file

$ aplay -D hw:CARD=au8820 /media/multimed-2/test/test0/'hello world.wav'
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
- playing like it should

$ aplay -D hw:CARD=au8820,3 /media/multimed-2/test/test0/'hello world.wav'
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
^CAvbruten av signal Avbruten (SIGINT)...
aplay: pcm_write:1940: skrivfel: In/ut-fel
- no complaint: 'no such file', just silent until I stop it with ctrl C.

--

So far there are no more kernel oops complaints ...

Revision history for this message
sudodus (nio-wiklund) wrote :

'You can use hwmixvolume to change the playback volume of each application which use hw device of au8820'

I use pavucontrol, and yes, I can change the playback volume also of each individual channel (left and right).

Do you want me to test something else?

Revision history for this message
sudodus (nio-wiklund) wrote :

'How often do the message appear in system log? (BUG 16.04 or XRUN before 14.04)

it mean the value return is larger than buffer size or the interrupt is not handled properly'

Please tell me which log file I should look into, and which string to look for! Maybe I can use grep.

--

'dev_info(vortex->card->dev, "%d virt=%d, real=%d, delta=%d\n", adbdma, dma->period_virt, dma->period_real, delta);

Do you find the above info in system log when you specify small fragment

 --period-size=16 when using aplay'

Please tell me which log file I should look into (the file name of it)!

Revision history for this message
sudodus (nio-wiklund) wrote :

Directly at login after reboot I had many prompts to send a bug report about kernel oops. I tried to count them. think this report is responding to the 26th prompt to send a bug report, and a few seconds later there was one more prompt to send a bug report.

The above event created the bug report #1555487
--

Before this reboot and login, I had started to suspect than the Aureal sound card is starting to fail, so I rebooted into

1. The old Precise system with the 3.2.0-97-generic-pae kernel

2. The newer Trusty system with the 4.4.0-11-generic kernel
--
$ uname -a
Linux xw8400 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
--
Both of these systems work well. There is no sign of failure of the Aureal sound card, and there are no kernel oops.

Revision history for this message
sudodus (nio-wiklund) wrote :

Correction:

2. The newer Trusty system with the 3.13.0-79-generic kernel

Revision history for this message
sudodus (nio-wiklund) wrote :

Please tell me which log file I should look into (the file name of it)!

Revision history for this message
Raymond (superquad-vortex2) wrote :

The wavetable is not implememted since dma since not start for au8830

card 1: au8820 [Aureal Vortex au8820], device 3: Aureal Vortex WT [au8820 wt] Subdevices: 32/32 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 Subdevice #4: subdevice #4 Subdevice #5: subdevice #5 Subdevice #6: subdevice #6 Subdevice #7: subdevice #7 Subdevice #8: subdevice #8 Subdevice #9: subdevice #9 Subdevice #10: subdevice #10 Subdevice #11: subdevice #11 Subdevice #12: subdevice #12 Subdevice #13: subdevice #13 Subdevice #14: subdevice #14 Subdevice #15: subdevice #15 Subdevice #16: subdevice #16 Subdevice #17: subdevice #17 Subdevice #18: subdevice #18 Subdevice #19: subdevice #19 Subdevice #20: subdevice #20 Subdevice #21: subdevice #21 Subdevice #22: subdevice #22 Subdevice #23: subdevice #23 Subdevice #24: subdevice #24 Subdevice #25: subdevice #25 Subdevice #26: subdevice #26 Subdevice #27: subdevice #27 Subdevice #28: subdevice #28 Subdevice #29: subdevice #29 Subdevice #30: subdevice #30 Subdevice #31: subdevice #31

Revision history for this message
Raymond (superquad-vortex2) wrote :

System log

dmesg

Look for "virt" or "delta" when you use aplay with small period size, the sound card has four subbuffer for each playback stream

http://www.google.com/patents/US6167465

Revision history for this message
sudodus (nio-wiklund) wrote :
Download full text (5.1 KiB)

No output to /var/log/dmesg

I am listening to a broadcasting track at the same time. A minute after this aplay test was finished, I had an new prompt to file a bug report about a kernel oops. But there is still nothing in /var/log/dmesg

--
$ while true; do aplay -D hw:CARD=au8820 /media/multimed-2/test/test0/'hello world.wav';tail /var/log/dmesg;done
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAVE '/media/multimed-2/test/test0/hello world.wav' : Signed 16 bit Little Endian, Frekvens 22050 Hz, Mono
(Nothing has been logged yet.)
Spelar upp WAV...

Read more...

Revision history for this message
Raymond (superquad-vortex2) wrote :

/* pointer callback */
static snd_pcm_uframes_t snd_vortex_pcm_pointer(struct snd_pcm_substream *substream)
{
vortex_t *chip = snd_pcm_substream_chip(substream);
stream_t *stream = (stream_t *) substream->runtime->private_data;
int dma = stream->dma;
snd_pcm_uframes_t current_ptr = 0;
 spin_lock(&chip->lock);
if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) current_ptr = vortex_adbdma_getlinearpos(chip, dma);
#ifndef CHIP_AU8810
else current_ptr = vortex_wtdma_getlinearpos(chip, dma);
#endif
//printk(KERN_INFO "vortex: pointer = 0x%x\n", current_ptr); spin_unlock(&chip->lock);
 return (bytes_to_frames(substream->runtime, current_ptr)); }

It mean current_ptr is incorrect when return value is greater than buffer size

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
sudodus (nio-wiklund) wrote :

Please bear with me. It was long ago that I was programming compiled languages. And it was application programs simulating physical processes. I was never near the kernel of any operating system.

I think you have to explain in a very detailed way, you you want me to do things from source code ;-)

Revision history for this message
Raymond (superquad-vortex2) wrote :

The dirty hack is to ensure current_ptr is less than buffer size in the above routine

Revision history for this message
sudodus (nio-wiklund) wrote :

I see. Will you upload a compiled version of it for testing?

Revision history for this message
Raymond (superquad-vortex2) wrote :

You have to recompile alsa driver by adding

if (current_ptr > runtime->buffer_size)
   current_ptr = runtime->buffer_size;

Revision history for this message
Raymond (superquad-vortex2) wrote :

dmesg is the command which show the system log similar to

https://launchpadlibrarian.net/243848211/CurrentDmesg.txt

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://mailman.alsa-project.org/pipermail/alsa-devel/2014-September/081501.html

 you can try Alexander's pcm_avail.c and post the output using your au8820

It is rather strange that only 2 frames since dma transfer in brust

Revision history for this message
Raymond (superquad-vortex2) wrote :

[11.080876] snd_au8820 0000:01:04.0: init started snd_au8820 0000:01:04.0: init.... done.
[ 11.837183] gameport gameport0: AU88x0 Gameport is pci0000:01:04.0/gameport0, speed 1087kHz

in theory, you should look for au8820 in system log since those dev_info also print the dev name

Revision history for this message
Raymond (superquad-vortex2) wrote :

Can you post output for your au8820 pci ssid 12eb:0001

do it support D3?

lspci -vvvv

[ 0.244875] pci 0000:01:04.0: [12eb:0001] type 00 class 0x040100
 [ 0.244898] pci 0000:01:04.0: reg 0x10: [mem 0xfb100000-0xfb11ffff]
[ 0.244908] pci 0000:01:04.0: reg 0x14: [io 0x2000-0x2007]
[ 0.244917] pci 0000:01:04.0: reg 0x18: [io 0x2008-0x200f]
 [ 0.244971] pci 0000:01:04.0: supports D2

Revision history for this message
sudodus (nio-wiklund) wrote :

I have not rebooted after my previous comments (and the test with aplay).

Now I can give you better feedback :-)

olle@xenial32 ~ $ dmesg|wc -c
64123
olle@xenial32 ~ $ dmesg|grep -i au88
[ 12.021036] snd_au8820 0000:01:04.0: init started
[ 12.777390] snd_au8820 0000:01:04.0: init.... done.
[ 12.812621] gameport gameport0: AU88x0 Gameport is pci0000:01:04.0/gameport0, speed 1087kHz
[ 1851.807772] snd_au8820 0000:01:04.0: BUG: , pos = 16388, buffer size = 16384, period size = 1024
[ 1874.676798] snd_au8820 0000:01:04.0: BUG: , pos = 16385, buffer size = 16384, period size = 1024
[ 2237.851784] snd_au8820 0000:01:04.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024
[ 2428.313947] snd_au8820 0000:01:04.0: BUG: , pos = 16387, buffer size = 16384, period size = 1024
[ 2553.923292] snd_au8820 0000:01:04.0: BUG: , pos = 16385, buffer size = 16384, period size = 1024
[ 2588.056299] snd_au8820 0000:01:04.0: BUG: , pos = 16385, buffer size = 16384, period size = 1024
[ 2596.930892] snd_au8820 0000:01:04.0: BUG: , pos = 16386, buffer size = 16384, period size = 1024
[ 2687.724641] snd_au8820 0000:01:04.0: BUG: , pos = 16387, buffer size = 16384, period size = 1024
[ 3117.800141] snd_au8820 0000:01:04.0: BUG: , pos = 16387, buffer size = 16384, period size = 1024
[ 3639.693323] snd_au8820 0000:01:04.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024

What details do you want?

Revision history for this message
sudodus (nio-wiklund) wrote :

I added the output for the command with sudo to get the capabilities:

$ sudo lspci -vvvv |grep -A16 Multimedia
01:04.0 Multimedia audio controller: Aureal Semiconductor Vortex 1 (rev 02)
 Subsystem: Voyetra Technologies Montego
 Physical Slot: 1
 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 32 (500ns min, 3000ns max), Cache Line Size: 64 bytes
 Interrupt: pin A routed to IRQ 16
 Region 0: Memory at fb100000 (32-bit, non-prefetchable) [size=128K]
 Region 1: I/O ports at 2000 [size=8]
 Region 2: I/O ports at 2008 [size=8]
 Capabilities: [dc] Power Management version 1
  Flags: PMEClk- DSI+ D1- D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
  Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
 Kernel driver in use: snd_au8820
 Kernel modules: snd_au8820

01:05.0 FireWire (IEEE 1394): Texas Instruments TSB43AB22A IEEE-1394a-2000 Controller (PHY/Link) [iOHCI-Lynx] (prog-if 10 [OHCI])

Revision history for this message
sudodus (nio-wiklund) wrote :

'You have to recompile alsa driver by adding

if (current_ptr > runtime->buffer_size)
   current_ptr = runtime->buffer_size;'
--
'http://mailman.alsa-project.org/pipermail/alsa-devel/2014-September/081501.html

 you can try Alexander's pcm_avail.c and post the output using your au8820

It is rather strange that only 2 frames since dma transfer in brust'
--

I must admit that I don't know what to do with these comments.

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://packages.ubuntu.com/search?lang=en&keywords=libasound2-dev

For pcm_avail.c

You need to install libasound2-dev and gcc

sudo apt-get install libasound2-dev

gcc pcm_avail.c -o pcm_avail -l asound

./pcm_avail

Revision history for this message
sudodus (nio-wiklund) wrote :

It complains:

pcm_avail.c:5:23: fatal error: asoundlib.h: no such file

I guess I need some library?

Revision history for this message
Raymond (superquad-vortex2) wrote :

Did his program use #include <alsa/asoundlib.h> similar to aplay.c?

http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=aplay/aplay.c;hb=HEAD

Revision history for this message
Raymond (superquad-vortex2) wrote :

Are you the kernel oops is related to au8820 since it just flooding the system log with BUGS message but no seg fault or dump

it is strange that your bug report did not have pulselist or pulseaudio log

Revision history for this message
sudodus (nio-wiklund) wrote :

It should be there:

sudo apt-get install libasound2-dev
Läser paketlistor… Färdig
Bygger beroendeträd
Läser tillståndsinformation… Färdig
libasound2-dev is already the newest version (1.1.0-0ubuntu1).
Följande paket har installerats automatiskt och är inte längre nödvändiga:
  kubuntu-debug-installer libqapt3 libqapt3-runtime qapt-batch
Använd ”sudo apt autoremove” för att ta bort dem.
0 att uppgradera, 0 att nyinstallera, 0 att ta bort och 0 att inte uppgradera.

Are there problems with different real path and expected path?

Revision history for this message
sudodus (nio-wiklund) wrote :

No, I changed it according to your tips and could compile without complaints.

/* #include <asoundlib.h> */
#include <alsa/asoundlib.h>

$ l
totalt 24
-rwxrwxr-x 1 olle olle 39 mar 10 15:06 maker
-rwxrwxr-x 1 olle olle 13240 mar 10 16:02 pcm_avail
-rw-rw-r-- 1 olle olle 3703 mar 10 16:02 pcm_avail.c
olle@xenial32 /media/multimed-2/test/test0/snd_au8820 $ ./pcm_avail
Playback open error: No such file or directory

Now what?

Revision history for this message
sudodus (nio-wiklund) wrote :

'Are you the kernel oops is related to au8820 since it just flooding the system log with BUGS message but no seg fault or dump

it is strange that your bug report did not have pulselist or pulseaudio log'

No I'm not sure at all. It says 'snd_au8820' in the automatically created bug report, but I do not understand what it happening :-P

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
sudodus (nio-wiklund) wrote :

I see: 'The kerneloops-daemon scans dmesg for common crash signatures, among which is 'BUG:'. The message emitted by the PCM library is really a warning, so the most expedient thing to do seems to be to change the string.'

Yes, this might be the problem :-)

Can you help getting rid of it (how to implement it)?

Revision history for this message
Raymond (superquad-vortex2) wrote :

You have to send email to the author and commiter since flooding the system log with message is useless

Revision history for this message
sudodus (nio-wiklund) wrote :

Thank you very much for investigating this issue, Raymond :-)

Revision history for this message
sudodus (nio-wiklund) wrote :

I have written directly to the author and committer, but also made a comment in their old bug report.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1305480/comments/13

Revision history for this message
Raymond (superquad-vortex2) wrote :

His program hardcode to use card 0, you have to change the card number if ypur au8820 is card 1

or change the order of your two cards by adding specify card number for the two drivers in /etc/modprobe.d/alsa-base.conf

Revision history for this message
sudodus (nio-wiklund) wrote :

Raymond,

The committer, Takashi Iwai, decided to help us. Can you use this patch (and help me test it) :-)

Nio
-----

OK, I see why this bogus report reappears again. The message tag was
reverted back after some commit for correctness.

Now I rephrased the text again so that it won't hit some stupid daemon
any longer. It'll be included in 4.6 kernel, and then backported to
stable kernels later.

But, note that this doesn't fix the issue. For a proper fix, a patch
like below would be needed. Let me know if this works for you. (But
I have no idea about Ubuntu, so I cannot tell you how to apply the
patch, ask other Ubuntu people about it

Takashi

-- 8< --
From: Takashi Iwai at SUSE
Subject: [PATCH] ALSA: au88x0: Fix overlapped PCM pointer

au88x0 hardware seems returning the current pointer at the buffer
boundary instead of going back to zero. This results in spewing
warnings from PCM core.

This patch corrects the return value from the pointer callback within
the proper value range, just returning zero if the position is equal
or above the buffer size.

Signed-off-by: Takashi Iwai at SUSE
---
 sound/pci/au88x0/au88x0_pcm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index a6d6d8d0867a..df5741a78fd2 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -432,7 +432,10 @@ static snd_pcm_uframes_t snd_vortex_pcm_pointer(struct snd_pcm_substream *substr
 #endif
  //printk(KERN_INFO "vortex: pointer = 0x%x\n", current_ptr);
  spin_unlock(&chip->lock);
- return (bytes_to_frames(substream->runtime, current_ptr));
+ current_ptr = bytes_to_frames(substream->runtime, current_ptr);
+ if (current_ptr >= substream->runtime->buffer_size)
+ current_ptr = 0;
+ return current_ptr;
 }

 /* operators */
--
2.7.2

Revision history for this message
penalvch (penalvch) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

There will be volume slider(hardware per stream volume control) for each application if the application use hw instead of pulse

pavucontrol provide sofware per stream volume control

Revision history for this message
Raymond (superquad-vortex2) wrote :

Each subdevice has its own volume control

control.59 { iface PCM name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } }

control.60 { iface PCM subdevice 1 name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } }

control.61 { iface PCM subdevice 2 name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } }

 control.62 { iface PCM subdevice 3 name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } }

control.63 { iface PCM subdevice 4 name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } }

control.64 { iface PCM subdevice 5 name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } } control.65 { iface PCM subdevice 6 name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } } control.66 { iface PCM subdevice 7 name 'PCM Playback Volume' value.0 0 value.1 0 comment { access 'read write inactive' type INTEGER count 2 range '-128 - 32' dbmin -9600 dbmax 2400 dbvalue.0 0 dbvalue.1 0 } }

Revision history for this message
sudodus (nio-wiklund) wrote : Re: [Bug 1551041] Re: snd_au8820 0000:01:04.0: BUG: , pos = 16386, buffer size = 16384, period size = 1024

Den 2016-03-11 kl. 02:22, skrev Raymond:
> There will be volume slider(hardware per stream volume control) for each
> application if the application use hw instead of pulse
>
> pavucontrol provide sofware per stream volume control
>

Both would be OK for me. But I have learned to use pavucontrol. I don't
understand the ALSA interface (I have failed to find hardware devices
(unless found automatically) and failed to make them work, unless I
install pulseaudio and pavucontrol).

Revision history for this message
sudodus (nio-wiklund) wrote :

I don't understand how to use comment #60.

Revision history for this message
Raymond (superquad-vortex2) wrote :

Run two alsa applications which using hw device, hwmixvolume allow you to change the subdevice PCM volume controls which dB range allow gain in addition to attenuation

For any pulse application, it just control by the subdevice opened by pulseaudio server

The hardware mixed signal are pass through your ac97 codec mixer, pcm playback and master volume for all applications

Revision history for this message
sudodus (nio-wiklund) wrote :

So using the ALSA tools, it is possible to have a better control of the audio, it provides a more advanced mixer. Maybe that is why it is also more difficult to learn :-)

-o-

I will scan the previous few comments and try to perform some tasks, that I might have overlooked. Please remind me, if there is a task that I should do and report, to make it possible for you to continue debugging!

Revision history for this message
Raymond (superquad-vortex2) wrote :

Card numer can be specified by module parameter "index"

Module: snd_hda_intel align_buffer_size : -1 bdl_pos_adj : 32,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 beep_mode : N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y enable_msi : -1 id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null) index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 jackpoll_ms : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 model : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null) patch : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null) position_fix : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 power_save : 0 power_save_controller : Y probe_mask : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 probe_only : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 single_cmd : N snoop : -1 !!Module: snd_au8820 enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null) index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 pcifix : 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255

Revision history for this message
sudodus (nio-wiklund) wrote :

I ran pcm_avail after changing to device #1

/* const char* device = "hw:0"; */
const char* device = "hw:1";

and re-compiling.

I redirected the error output to the attached file.

Revision history for this message
Raymond (superquad-vortex2) wrote :

 the differnce between successive output are almost 5 frames

The only bad thing

 ptr is not always at period boundary 1024, 2048, 3072 and 4096

Revision history for this message
Raymond (superquad-vortex2) wrote :

You may need to dump mmio VORTEX_SMP_TIME which is tick at 48000 * 256 Hz (what is the clock printed at the oscillator on your au8820 sound card) to find out the elapsed time between periods is correct or not

- return (bytes_to_frames(substream->runtime, current_ptr));
+ current_ptr = bytes_to_frames(substream->runtime, current_ptr);
+ if (current_ptr >= substream->runtime->buffer_size) {
+ dev_info(vortex->card->dev, "ptr : %x. time : %x/n", current_ptr, hwread(vortex->mmio, VORTEX_SMP_TIME ));
+ current_ptr = 0;
+ }
+ return current_ptr;

Revision history for this message
Raymond (superquad-vortex2) wrote :

The oscillator is the silver metal component just above the au8820 chip of your montego card

Revision history for this message
Raymond (superquad-vortex2) wrote :

no need to perform git bisect since you already know the reason of kernel ops is due to "BUG:"

Do ubuntu allow user just build alsa driver as module instead of recompile the whole kernel

https://git.kernel.org/cgit/linux/kernel/git/tiwai/alsa-driver-build.git/

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/

Revision history for this message
Raymond (superquad-vortex2) wrote :

http://mailman.alsa-project.org/pipermail/alsa-devel/2013-February/059559.html

You need to install many packages in order to build alsa driver

git, autoconf, kernel-header,....

You need to rebuild the alsa driver whenever kernel change

Revision history for this message
sudodus (nio-wiklund) wrote :

I have been away from the keyboard for a few hours. It is nice weather, so nice outdoors here today :-)

Would you say it is meaningful to build a new alsa driver (even if it is means installing many packages?

If that is the case, should I do it in a separate system (to avoid damaging the current system)? I have a multiboot system already.

Or should I just press alt + F4 to get rid of the windows that want me to file bug reports until the fix promised by Takashi Iwai will trickle down to my system?

Revision history for this message
sudodus (nio-wiklund) wrote :

Raymond,

I can re-phrase the question like this:

Do you want to fix the alsa-driver to eliminate the problem with the pointer? In that case I am willing to help testing it :-)

Otherwise I can wait for the fix, where the string 'BUG' is replaced with 'XRUN'

- "BUG: %s, pos = %ld, buffer size = %ld, period size = %ld\n",
+ "XRUN: %s, pos = %ld, buffer size = %ld, period size = %ld\n",

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=0ab1ace856205d10cbc1924b2d931c01ffd216a6

This patch only prevent kerneloops pop up, your system log still flooding with invalid position message every 0.371 second (assume once per buffer time) when playing audio

Revision history for this message
sudodus (nio-wiklund) wrote :

Yes, I understand.

penalvch (penalvch)
tags: added: cherry-pick
Changed in alsa-driver (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Raymond (superquad-vortex2) wrote :

Can you post the output of pcm_avail.c when using rate 44100 Hz instead of 48000Hz?

print the time at the same time to check whether the ptr is monotically increasing as expected rate

Revision history for this message
Raymond (superquad-vortex2) wrote :

Time diffenece between successive output and frames difference will tell you whether the card is accurate enoung for pulseaudio timer scheduling

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugs.freedesktop.org/show_bug.cgi?id=84585#c60

Modified version

You can compare the result

Revision history for this message
sudodus (nio-wiklund) wrote :

'Can you post the output of pcm_avail.c when using rate 44100 Hz instead of 48000Hz?

print the time at the same time to check whether the ptr is monotically increasing as expected rate'

I attach a file with the specified rate. I don't know/remember C well enough, so I need your help to print the time (in a new attempt).

Revision history for this message
Raymond (superquad-vortex2) wrote :

As there is no datasheet, we can only follow the patent description

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/au88x0/au8820.h#n26

FIG. 15c is a diagrammatic block diagram of a mode register 382 of sub-buffer table 380(3) of FIG. 15b. Mode register 382 includes a check for fault flag 382(a), a had fault flag 382(b), a data format register 382(c), a read/write flag 382(d), an interrupt enable flag 382(e) and a current position register 382(f).

Based upon the current sub-buffer and information about the previous value of the current sub-buffer table the CPU can determine that the peripheral has moved on to the next data segment. CPU 210 may then update the sub-buffer table.

Current position register 382(f) is initially set by CPU 210 when the DMA channel is first established to indicate where to begin reading (or writing) data 150 from main memory 212 within the current data segment (e.g., 150(3)). During the process of retrieving data 150 from main memory 212, DMA engine 372 keeps track of the next location to be read from in the current data segment (e.g., 150(3)). The location of the next piece of data is stored in current position register 382(f). Thus, current position register 382(f) typically contains an offset address relative to the address of the current data segment (e.g., 150(3)).

Revision history for this message
sudodus (nio-wiklund) wrote :

Raymond, do you need anything from me now? In that case, please me what to do?

Revision history for this message
sudodus (nio-wiklund) wrote :

fixed typing error: please *tell* me what to do

Revision history for this message
Raymond (superquad-vortex2) wrote :

Can you change

periods from 4 to 16

and period_size from 1024 to 256

post the output of pcm_avail.c

Revision history for this message
Raymond (superquad-vortex2) wrote :

Do the number of BUG messsges in system log still 2 frames larger than buffer size

Revision history for this message
sudodus (nio-wiklund) wrote :

'Can you change

periods from 4 to 16

and period_size from 1024 to 256

post the output of pcm_avail.c'

Done. See the attached file.

Revision history for this message
sudodus (nio-wiklund) wrote :

'Do the number of BUG messsges in system log still 2 frames larger than buffer size'

I don't understand how to do this or check this. Please explain!

Revision history for this message
Raymond (superquad-vortex2) wrote :

dmesg | grep -i "au88"

Since pcm_avail.c only write buffer size once, it is unable to trigger the bug which ptr > buffer size

so we need to modify the logic to loop more data

Revision history for this message
sudodus (nio-wiklund) wrote :

$ dmesg | grep -i "au88"
[ 12.425799] snd_au8820 0000:01:04.0: init started
[ 13.157353] snd_au8820 0000:01:04.0: init.... done.
[ 13.192583] gameport gameport0: AU88x0 Gameport is pci0000:01:04.0/gameport0, speed 1087kHz
[ 2357.843401] snd_au8820 0000:01:04.0: BUG: , pos = 16385, buffer size = 16384, period size = 1024
[10547.789231] snd_au8820 0000:01:04.0: BUG: , pos = 4099, buffer size = 4096, period size = 256

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/ice1712/ice1712.c?id=4f8e940095536bc002a81666a4107a581c84e9b9

The fix for the other driver in the original bug report

It look like au88x0 pointer callback does not return zero when interrupt occur, just 2 or 3 frames pass the period boundary, the pcm core only regard this error when ptr pass the buffer

However, it is strange that pcm_avail.c return 1024

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/core/pcm_lib.c?id=f5914908a5b7b2338f210e56827a1ef35585dc6d

To debug the ptr position at period interrupt, you need alsa driver build with debug which allow you to enable trace point to log the ptr position in system

Revision history for this message
sudodus (nio-wiklund) wrote :

Do you suggest that I try to build the alsa driver with debug now?

Maybe I should I make a dedicated system alongside the system I am using for general testing.

Revision history for this message
Raymond (superquad-vortex2) wrote :

Sound.git is unstable and not gauarnteed to compile at any time

The safest way is to compile debug kernel/driver at stable ubuntu release

Tiwai expect you to apply the patch and report back whether it has no side effect

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/au88x0?id=54a96dadaa2bbe81006c66447517b57534d80e7f

Before this patch, period_size can be as low as 1 frames,

difference of current page and last page will be 2 or 3 instead of 1

In theory, you should not see the delta 2 or 3 virt, real message after this patch

Revision history for this message
sudodus (nio-wiklund) wrote :

'Sound.git is unstable and not gauarnteed to compile at any time
The safest way is to compile debug kernel/driver at stable ubuntu release'

Do you mean that I should install a system of Ubuntu 14.04.1 LTS or Ubuntu 14.04.4 LTS, *dedicated for this task*, and use that for compiling souund.git?

'Tiwai expect you to apply the patch and report back whether it has no side effect'

Do you mean the commit, where the string 'BUG' is replaced, to avoid spamming with prompts to file bug reports?

(I'm rather sure that it will work, but anyway ...)

Or do you mean the other one, the tip to avoid pointing outside the allowed work-space?
--

I feel very uncertain about how to perform these things, but I will try.

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1551041/comments/57

You have to apply the patch manually at the stable ubuntu kernel/driver and report back to tiwai

Revision history for this message
sudodus (nio-wiklund) wrote :

I understand that tiwai's first fix only removes the symptoms, not the original problem. I thought that I can live with that.

The problem is that I do not understand how to implement tiwai's second fix, and he says that he doesn't know how to do it in Ubuntu. Now you say I have to do it at the stable ubuntu kernel.

I'm lost. I do not undertand the second fix (what it is doing). I do not understand how to apply it and in what system to apply it.

1. Which test system should I install in order to have the stable ubuntu kernel/driver? Which version of Ubuntu, which kernel ... ?

2. Which extra repositories, PPAs, and program packages should I activate/install?

3. Which method should I use to compile it? Should I use a method referred to in comment #58?

4. And how can I find out if it works or not? What should I look for?

Revision history for this message
sudodus (nio-wiklund) wrote :

I tried in the system which is suffering from this bug (Lubuntu Xenial with the kernel

Linux xenial32 4.4.0-11-generic #26-Ubuntu SMP Sat Mar 5 14:22:05 UTC 2016 i686

and I failed with the git command. I replied directly to tiwai, and post a copy here.

*Maybe you can see what is wrong*

- Should I set up another system, which is more likely to manage with this git command?

- Do I need some other tools?

- Are there any unwanted newlines introduced by the email transfer of the patch?

- Other things (beyond my imagination)?

---
Hi again Takashi,

I tried this fix according to the instructions at

https://wiki.ubuntu.com/Kernel/KernelBisection#Testing_a_newly_released_patch_from_upstream

but I failed. I don't know what I'm doing, so it might be my fault. But I have one question. What about the #endif string? Is it matched?

See the output from my command line:

Klonar till "linux"...
remote: Counting objects: 4583735, done.
remote: Compressing objects: 100% (3254/3254), done.
remote: Total 4583735 (delta 1999), reused 0 (delta 0)
Tar emot objekt: 100% (4583735/4583735), 804.14 MiB | 1.05 MiB/s, klart.
Analyserar delta: 100% (3846439/3846439), klart.
Kontrollerar om vi fick alla objekt... klart.
Checkar ut filer: 100% (52916/52916), klart.
patching file /home/olle/linux/drivers/acpi/video.c
Hunk #1 FAILED at 432.
1 out of 1 hunk FAILED -- saving rejects to file /home/olle/linux/drivers/acpi/video.c.rej
patch: **** Can't reopen file /home/olle/linux/drivers/acpi/video.c : No such file or directory
-----
And the rejected stuff:
--- au88x0_pcm.c
+++ au88x0_pcm.c
@@ -432,7 +432,10 @@ static snd_pcm_uframes_t snd_vortex_pcm_pointer(struct snd_pcm_substream *substr
#endif
//printk(KERN_INFO "vortex: pointer = 0x%x\n", current_ptr);
spin_unlock(&chip->lock);
- return (bytes_to_frames(substream->runtime, current_ptr));
+ current_ptr = bytes_to_frames(substream->runtime, current_ptr);
+ if (current_ptr >= substream->runtime->buffer_size)
+ current_ptr = 0;
+ return current_ptr;
}

/* operators */

Revision history for this message
sudodus (nio-wiklund) wrote :

The file /home/olle/linux/drivers/acpi/video.c is missing.

- Is it because of the failed git command?

- Or does the git command fail because it was missing when the file should have been there (put there by previous git commands)?

- Must I install source code before running the git command? How can I do that?

Revision history for this message
sudodus (nio-wiklund) wrote :

>> patching file /home/olle/linux/drivers/acpi/video.c
>> Hunk #1 FAILED at 432.
>> 1 out of 1 hunk FAILED -- saving rejects to file
>> /home/olle/linux/drivers/acpi/video.c.rej
>
> See the file name here: you must be patching a totally different file.
> Or it's about a different patch.
>
> If it's difficult for you, it'd be better to ask someone else for
> building a test kernel or package.
>
>
> Takashi

Hi,

The instructions are not straight-forward. I don't know the

/path/name

to the file that I must patch, and how to modify the git command at the instruction page.

I hope I can get help :-)

Otherwise I will do what other users do - use the old system as long as it is supported, and after that get new hardware (a new computer or in this case only a new card), that works with the new version of the operating system.

But I think your patch #1 (changing 'BUG' to another string) will make the system work well enough for me to continue using it. I'll wait for it to trickle down to us regular users.

Best regards
Nio

Revision history for this message
sudodus (nio-wiklund) wrote :

Looking more at the git command line, it seems the problem is a separate 'patch' command.

--
git config --global user.email "<email address hidden>" && git config --global user.name "Your Name" && cd $HOME && git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git && patch ~/linux/drivers/acpi/video.c ~/Desktop/testfix.patch && cd linux && git add . && git commit
--

So I need to know what /path/name to use for the patch command - the source file to be modified?

Probably I also need help to 'customize' other parts of the string. It is not obvious to me which parts should be used literally and which are only templates.

Maybe you can help me with it, Raymond?

Revision history for this message
Raymond (superquad-vortex2) wrote :

You just use any editor to replace this line in au88x0_pcm.c

  return (bytes_to_frames(substream->runtime, current_ptr));

by following lines

 current_ptr = bytes_to_frames(substream->runtime, current_ptr);
 if (current_ptr >= substream->runtime->buffer_size)
 current_ptr = 0;
 return current_ptr;

Revision history for this message
sudodus (nio-wiklund) wrote :

OK. A small step forward. It seems that I have compiled, but there are errors:

--
scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: Filen eller katalogen finns inte
compilation terminated.
scripts/sign-file.c:23:30: fatal error: openssl/opensslv.h: Filen eller katalogen finns inte
--

Can I use this file? ~/linux/include/linux/bio.h

but there is no file with the name opensslv.h

What is the next step?

Revision history for this message
sudodus (nio-wiklund) wrote :

Or should I try in another version of Ubuntu, for example 14.04.1 LTS? But then I won't get those spammed messages anyway.

Revision history for this message
sudodus (nio-wiklund) wrote :

I installed Lubuntu 15.10 and tried according to the same method

https://wiki.ubuntu.com/Kernel/KernelBisection#Testing_a_newly_released_patch_from_upstream

but it did not work at all.

This is impossible for me. I do not understand the instructions. It is not cherry-picking, it is sour grapes :-(

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/refs/tags

You need to know ubuntu 16.04 using which version of kernel

 You will find those XRUN/BUGS/invalid position message in system log before patching and no more message after patching

Revision history for this message
sudodus (nio-wiklund) wrote :

Is this part of the instruction

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

wrong alias only a template? In that case, should it be

git://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git

or something else?

Revision history for this message
sudodus (nio-wiklund) wrote :

I need detailed instructions as terminal window command lines

I think the only way I can manage this task is that I get detailed instructions as terminal window command lines (or a shellscript file).

Otherwise I will be lost. You know how to do things, and you give instructions on a high level, but I don't know, and I can't understand how to transform those instructions into command lines.

Revision history for this message
Raymond (superquad-vortex2) wrote :

FIG. 15e is a diagrammatic block diagram of a control register of FIG. 15d, in accordance with one embodiment. Control register 384(c) includes a sub-buffer enable interrupt flag 384(c)(0), a stop flag 384(c)(1) and a next segment pointer 384(c)(2). Sub-buffer enable interrupt flag 384(c)(0) typically serves a similar function as enable interrupt flag 382(f), except on the data segment level rather than the channel level.

...

Stop flag 384(c)(1) typically indicates whether the data segment pointed to by data segment pointer 384 is the last data segment 150(n). When stop flag 384(c)(1) is set DMA engine 372 will cease operations for the particular DMA channel and the associated FIFO 306 after all the contents of the particular data segment has been read and processed. If stop flag 384(c)(1) is reset then DMA engine 372 may continue to the next data segment in the sequence.

In theory, stop flag should be set at the last period

how do the driver know which period is the last one?

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/core?id=48d882978eb0a15547093b4542a82b5c22548041

Revision history for this message
sudodus (nio-wiklund) wrote :

Is this part of the instruction

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

wrong alias only a template? In that case, should it be

git clone git://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/core?id=48d882978eb0a15547093b4542a82b5c22548041

(as one line) or something else?

It would be best to give instructions as command lines. Otherwise I cannot use them.

Revision history for this message
sudodus (nio-wiklund) wrote :

I upgraded to a new kernel

$ uname -a
Linux xenial32 4.4.0-12-generic #28-Ubuntu SMP Wed Mar 9 00:33:13 UTC 2016 i686 i686 i686 GNU/Linux

and I am no longer spammed by prompts to report kernel oops. I rebooted and still no such prompts.

- The sound is working as usual. Has some change already tricked down? :-)

- Or is it only a random variation?

Anyway, I will keep running this installed system and report if there will be any more prompts to report kernel oops.

Revision history for this message
sudodus (nio-wiklund) wrote :

Edit: Has some change already *trickled* down? :-)

Revision history for this message
Raymond (superquad-vortex2) wrote :

For building alsa driver as module

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1551041/comments/71

You just follow the instruction in that link

What you need to do is

cd alsa-driver
git checkout build
utils/setup-alsa-kernel -c. ../../sound
./gitcompile --enable-dynamic-minors --with-oss=no --with-cards=all --with-sequencer=yes

Use --with-cards=au8820, hda-intel
If no error when configure and compile , you can

sudo make install

If you just need two drivers

Revision history for this message
Raymond (superquad-vortex2) wrote :

You can specify card to just build the needed driver or specify all cards

Revision history for this message
Raymond (superquad-vortex2) wrote :

A real kernel oops usually consist of stacktrace and dump of all cpu registers

Revision history for this message
sudodus (nio-wiklund) wrote :
Download full text (3.2 KiB)

Following comment #71 caused the following error:

olle@xenial32 ~/linux $ cd ..
olle@xenial32 ~ $ mkdir tiwai; cd tiwai
olle@xenial32 ~/tiwai $ git clone git://github.com/tiwai/alsa-driver-build.git
Klonar till "alsa-driver-build"...
remote: Counting objects: 159995, done.
remote: Total 159995 (delta 0), reused 0 (delta 0), pack-reused 159995
Tar emot objekt: 100% (159995/159995), 37.39 MiB | 4.04 MiB/s, klart.
Analyserar delta: 100% (113780/113780), klart.
Kontrollerar om vi fick alla objekt... klart.
olle@xenial32 ~/tiwai $ git clone git://github.com/tiwai/sound.git
Klonar till "sound"...
remote: Counting objects: 4600984, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 4600984 (delta 8), reused 8 (delta 8), pack-reused 4600959
Tar emot objekt: 100% (4600984/4600984), 1.42 GiB | 3.51 MiB/s, klart.
Analyserar delta: 100% (3802354/3802354), klart.
Kontrollerar om vi fick alla objekt... klart.
Checkar ut filer: 100% (52938/52938), klart.
olle@xenial32 ~/tiwai $ cd alsa-driver-build
olle@xenial32 ~/tiwai/alsa-driver-build $ git checkout build
Grenen build ställdes in att spåra fjärrgrenen build från origin.
Växlade till en ny gren "build"
olle@xenial32 ~/tiwai/alsa-driver-build $ cd alsa
olle@xenial32 ~/tiwai/alsa-driver-build/alsa $ ./utils/setup-alsa-kernel -c ../../sound
olle@xenial32 ~/tiwai/alsa-driver-build/alsa $ ./gitcompile --with-debug=full
gcc utils/mod-deps.c -o utils/mod-deps
utils/mod-deps.c: In function ‘output_card_list’:
utils/mod-deps.c:1086:4: warning: format not a string literal and no format arguments [-Wformat-security]
    printf(card_name);
    ^
utils/mod-deps --basedir /home/olle/tiwai/alsa-driver-build/alsa/alsa-kernel --hiddendir /home/olle/tiwai/alsa-driver-build/alsa --versiondep /home/olle/tiwai/alsa-driver-build/alsa/kconfig-vers --makeconf > toplevel.config.in
can't handle 'default SND_SEQUENCER && SND_RAWMIDI', translating as depends on
can't handle 'default SND_SEQUENCER && SND_OPL3_LIB', translating as depends on
can't handle 'default SND_SEQUENCER && SND_OPL4_LIB', translating as depends on
can't handle 'default SND_SEQUENCER && SND_SBAWE', translating as depends on
can't handle 'default SND_SEQUENCER && SND_EMU10K1', translating as depends on
can't handle word INPUT=y properly, supposing it's OK
can't handle word INPUT=SND_ES1968 properly, supposing it's OK
can't handle word VIDEO_V4L2=y properly, supposing it's OK
can't handle word VIDEO_V4L2=SND_ES1968 properly, supposing it's OK
can't handle word VIDEO_V4L2=y properly, supposing it's OK
can't handle word VIDEO_V4L2=SND_FM801 properly, supposing it's OK
can't handle word INPUT=y properly, supposing it's OK
can't handle word INPUT=SND_MAESTRO3 properly, supposing it's OK
can't handle word INPUT=y properly, supposing it's OK
can't handle word INPUT=SND_HDA properly, supposing it's OK
can't handle word SND_HDA_INPUT_BEEP=y properly, supposing it's OK
can't handle word INPUT=y properly, supposing it's OK
can't handle word INPUT=SND_USB_CAIAQ properly, supposing it's OK
can't handle word DW_DMAC_CORE=y properly, supposing it's OK
can't handle word DW_DMAC_CORE=y properly, supposing it's OK
Wrong condition =
Makefile:152: receptet för mål...

Read more...

Revision history for this message
sudodus (nio-wiklund) wrote :

I don't understand the talk about another computer in the link from comment #71. Does it apply for me?

And the directory structure does not match the instructions. I'm lost again.

Trying to follow comment #112 caused the following error:

olle@xenial32 ~/linux $ cd ~/tiwai/alsa-driver-build/
olle@xenial32 ~/tiwai/alsa-driver-build $ git checkout build
Redan på "build"
Din gren är à jour med "origin/build".
olle@xenial32 ~/tiwai/alsa-driver-build $ utils/setup-alsa-kernel -c. ../../sound
bash: utils/setup-alsa-kernel: Filen eller katalogen finns inte
[127] olle@xenial32 ~/tiwai/alsa-driver-build $ utils/setup-alsa-kernel -c. ../../sound ./gitcompile --enable-dynamic-minors --with-oss=no --with-cards=all --with-sequencer=yes
bash: utils/setup-alsa-kernel: Filen eller katalogen finns inte
[127] olle@xenial32 ~/tiwai/alsa-driver-build $ utils/setup-alsa-kernel -c. ../../sound ./gitcompile --enable-dynamic-minors --with-oss=no --with-cards=all --with-sequencer=yes
bash: utils/setup-alsa-kernel: Filen eller katalogen finns inte
[127] olle@xenial32 ~/tiwai/alsa-driver-build $

Revision history for this message
sudodus (nio-wiklund) wrote :

olle@xenial32 ~/tiwai/alsa-driver-build/alsa $ ./gitcompile --enable-dynamic-minors --with-oss=no --with-cards=au8820,hda-intel --with-sequencer=yes make: Inget behöver göras för ”all-deps”.
./gitcompile: rad 59: aclocal: kommandot finns inte
[1] olle@xenial32 ~/tiwai/alsa-driver-build/alsa $ ./gitcompile --enable-dynamic-minors --with-oss=no --with-cards=au8820 --with-sequencer=yes
make: Inget behöver göras för ”all-deps”.
./gitcompile: rad 59: aclocal: kommandot finns inte

-o-

Where can I find/install aclocal? What about all-deps?

Revision history for this message
Raymond (superquad-vortex2) wrote :

Did you change to alsa directory after git checkout build?

The alsa directory should contain

https://git.kernel.org/cgit/linux/kernel/git/tiwai/alsa-driver-build.git/tree/alsa?h=build

Revision history for this message
Raymond (superquad-vortex2) wrote :

gitcompile.sh and utils subdirectory

Revision history for this message
Raymond (superquad-vortex2) wrote :

Usually the reason fail to compile are those patch in acore directory are out dated and you need to report to alsa-devel mailng list

https://git.kernel.org/cgit/linux/kernel/git/tiwai/alsa-driver-build.git/tree/alsa/acore?h=build

Revision history for this message
sudodus (nio-wiklund) wrote :
Download full text (3.8 KiB)

I think the subdirectories are correct, but still, something is missing.

alias l='ls -l --group-directories-first'

[100] olle@xenial32 ~/tiwai/alsa-driver-build/alsa $ l
totalt 324
drwxrwxr-x 5 olle olle 4096 mar 16 11:23 acore
drwxrwxr-x 27 olle olle 4096 mar 16 11:50 alsa-kernel
drwxrwxr-x 6 olle olle 4096 mar 16 11:23 aoa
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 arm
drwxrwxr-x 3 olle olle 4096 mar 16 11:23 doc
drwxrwxr-x 7 olle olle 4096 mar 16 11:23 drivers
drwxrwxr-x 7 olle olle 4096 mar 16 11:23 firewire
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 hal2
drwxrwxr-x 3 olle olle 4096 mar 16 11:23 hda
drwxrwxr-x 4 olle olle 4096 mar 16 11:23 i2c
drwxrwxr-x 6 olle olle 4096 mar 16 11:53 include
drwxrwxr-x 13 olle olle 4096 mar 16 11:23 isa
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 mips
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 misc
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 modules
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 parisc
drwxrwxr-x 28 olle olle 4096 mar 16 11:23 pci
drwxrwxr-x 4 olle olle 4096 mar 16 11:23 pcmcia
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 ppc
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 sh
drwxrwxr-x 35 olle olle 4096 mar 16 11:23 soc
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 sparc
drwxrwxr-x 3 olle olle 4096 mar 16 11:23 synth
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 test
drwxrwxr-x 9 olle olle 4096 mar 16 11:23 usb
drwxrwxr-x 4 olle olle 4096 mar 16 11:24 utils
-rw-rw-r-- 1 olle olle 0 mar 16 11:25 acinclude.m4
-rw-rw-r-- 1 olle olle 4753 mar 16 11:23 CARDS-STATUS
-rw-rw-r-- 1 olle olle 103109 mar 16 11:23 configure.ac
-rw-rw-r-- 1 olle olle 18009 mar 16 11:23 COPYING
-rw-rw-r-- 1 olle olle 3059 mar 16 11:23 FAQ
-rwxrwxr-x 1 olle olle 2067 mar 16 11:23 gitcompile
-rw-rw-r-- 1 olle olle 12797 mar 16 11:23 INSTALL
-rw-rw-r-- 1 olle olle 5585 mar 16 11:23 install-sh
-rw-rw-r-- 1 olle olle 582 mar 16 11:23 kconfig-vers
-rw-rw-r-- 1 olle olle 10764 mar 16 11:23 Makefile
-rw-rw-r-- 1 olle olle 1864 mar 16 11:23 Makefile.conf.in
-rw-rw-r-- 1 olle olle 1171 mar 16 11:23 README
-rw-rw-r-- 1 olle olle 1503 mar 16 11:23 Rules.make
-rw-rw-r-- 1 olle olle 1603 mar 16 11:23 Rules.make1
-rw-rw-r-- 1 olle olle 6729 mar 16 11:23 snddevices.in
lrwxrwxrwx 1 olle olle 11 mar 16 11:50 sound -> alsa-kernel
-rw-rw-r-- 1 olle olle 420 mar 16 11:23 SUPPORTED_KERNELS
-rw-rw-r-- 1 olle olle 1188 mar 16 11:23 TODO
-rw-rw-r-- 1 olle olle 0 mar 16 11:24 toplevel.config.in
-rw-rw-r-- 1 olle olle 219 mar 16 11:23 WARNING
-rw-rw-r-- 1 olle olle 21 mar 16 11:23 version.in
olle@xenial32 ~/tiwai/alsa-driver-build/alsa $ l utils
totalt 260
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 old
drwxrwxr-x 2 olle olle 4096 mar 16 11:23 patches
-rwxrwxr-x 1 olle olle 32801 mar 16 11:23 alsa-compile.sh
-rw-rw-r-- 1 olle olle 1865 mar 16 11:23 alsa-driver.spec.in
-rwxrwxr-x 1 olle olle 27678 mar 16 11:23 alsa-info.sh
-rw-rw-r-- 1 olle olle 5781 mar 16 11:23 alsasound.in
-rw-rw-r-- 1 olle olle 3264 mar 16 11:23 alsasound.posix.in
-rw-rw-r-- 1 olle olle 917 mar 16 11:23 buildrpm.in
-rwxrwxr-x 1 olle olle 2207 mar 16 11:23 convert_...

Read more...

Revision history for this message
sudodus (nio-wiklund) wrote :

'Usually the reason fail to compile are those patch in acore directory are out dated and you need to report to alsa-devel mailng list

https://git.kernel.org/cgit/linux/kernel/git/tiwai/alsa-driver-build.git/tree/alsa/acore?h=build'

Can you see anything wrong, or should I report to the alsa-devel mailng list? In that case, what mail address is it?

Revision history for this message
Raymond (superquad-vortex2) wrote :

utils/setup-alsa-kernel -c ../../sound

Only use the following option to build debug driver which enable those dev_dbg call

--with-debug=full

Revision history for this message
sudodus (nio-wiklund) wrote :

utils/setup-alsa-kernel -c ../../sound

worked without complaints :-)

Please tell me *the whole command line* that should end like that!

--with-debug=full

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/alsa-driver-build.git/log/alsa/gitcompile?h=build

gitcompile only pass the command to configure and run make if no errors

./configure --help

You have to ask the author

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/alsa-driver-build.git/tree/alsa/gitcompile?h=build#n59

It need aclocal and autoconf to generate configure script

Have you installed the packages?

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/alsa-driver-build.git/tree/alsa/gitcompile?h=build

The minimum version of the packages are defined at the first few lines

automake
autoconf
libtool

Revision history for this message
sudodus (nio-wiklund) wrote :

I installed those 3 packages and ran gitcompile:

$ ./gitcompile --enable-dynamic-minors --with-oss=no --with-cards=au8820,hda-intel --with-sequencer=yes --with-debug=full

See the whole output in the attached file.

It worked better, but there are still errors.

make[2]: Går till katalogen ”/home/olle/tiwai/alsa-driver-build/alsa/acore/ioctl32”
make[2]: Lämnar katalogen ”/home/olle/tiwai/alsa-driver-build/alsa/acore/ioctl32”
make[2]: Går till katalogen ”/home/olle/tiwai/alsa-driver-build/alsa/acore/oss”
copying file alsa-kernel/core/oss/mixer_oss.c
patching file mixer_oss.c
Hunk #3 FAILED at 390.
Hunk #4 succeeded at 420 (offset 13 lines).
1 out of 4 hunks FAILED -- saving rejects to file mixer_oss.c.rej
/home/olle/tiwai/alsa-driver-build/alsa/Rules.make:30: receptet för målet ”mixer_oss.c” misslyckades
make[2]: *** [mixer_oss.c] Fel 1
make[2]: Lämnar katalogen ”/home/olle/tiwai/alsa-driver-build/alsa/acore/oss”
/home/olle/tiwai/alsa-driver-build/alsa/Rules.make:35: receptet för målet ”prepare” misslyckades
make[1]: *** [prepare] Fel 1
make[1]: Lämnar katalogen ”/home/olle/tiwai/alsa-driver-build/alsa/acore”
Makefile:175: receptet för målet ”dep” misslyckades
make: *** [dep] Fel 1

Revision history for this message
sudodus (nio-wiklund) wrote :

Since March 15 (during two full days and part of a third day) I am no longer spammed by prompts to report kernel oops like I used to be at login after reboot and shutdown + cold boot. There has been no notification of a kernel oops at all. I have rebooted and still no such prompts. I have also shutdown overnight + cold booted. Something has really changed to the better :-)

I can continue to try helping to improve the driver for the Aureal card (although there are no symptoms in this computer now). But as I said before - I need a lot of help, this task is far beyond what I have been doing before.

Revision history for this message
Raymond (superquad-vortex2) wrote :

You have to send email with the errors to Tiwai

The errors related to file in alsa-driver/alsa/acore are related to changes in sound/core, you need his help to regenerate those patch files in acore

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/core

Revision history for this message
sudodus (nio-wiklund) wrote :

Reply from Tiwai:

The build with alsa-driver external tree is no longer supported.
You need to build the kernel module directly.

Takashi

-o-

And as usual - I need detailed help.

Revision history for this message
Raymond (superquad-vortex2) wrote :

In theory , there is no need to use any patch in oss directory if you have disabled oss enumeration by passing --with-oss=no

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/core/oss

You get checkout or use browser to extract the old version of two file pcm_oss.c and mixer_oss.c at last year 2015 october since acore log was last upated at 2015 october

Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :
Revision history for this message
Raymond (superquad-vortex2) wrote :

The above link is just the oss directory just before

ALSA: oss: underflow in snd_mixer_oss_proc_write(). 2015 october 15

Save the plain text of the two affected files

Revision history for this message
Raymond (superquad-vortex2) wrote :

 it is strange that pcm_avail.c which only wite one buffer can trigger when the messages are rate limited

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/core/pcm_lib.c?id=74d779ab7c9f9024cfead259206e0e0b20ee37e4

Revision history for this message
sudodus (nio-wiklund) wrote :

I can continue to try helping to improve the driver for the Aureal card (although there are no symptoms in this computer now). But as I said before - I need a lot of help, this task is far beyond what I have been doing before.

*An alternative is that you upload kernels that I can test*

If you are not running Ubuntu, but another distro, maybe I can install such a system (for example in an SSD connected via eSATA to my computer with the Aureal card) and try experimental kernels made by you (that work in your 'native' distro).

Revision history for this message
Raymond (superquad-vortex2) wrote :

It seem there is no way to build alsa driver as module after kenerl 4.3 since alsa-driver-build no longer maintained after 2015 october

Revision history for this message
sudodus (nio-wiklund) wrote :

I hope it is still possible to build the alsa driver into a whole kernel ?!

Would it be an alternative that I install the same distro as you are using, and that you compile kernels with the properties that you want me to test. and upload its files for me to download and install?

Then I can run the tests you need to debug and develop the driver (as long as my Aureal card is working :-)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.