[CA0106 - CA0106, playback] Playback problem - Surround dies, no valid output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ALSA driver |
Unknown
|
Medium
|
|||
alsa-driver (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
This is tested against a Creative Labs Sounblaster live! (sb0410) card and a SoundBlaster Audigy se (sb0570). Both of them behave strangely, output coming through some, but not all speakers, etc. This was working in 13.10 under the sb0410. the ca0106 driver is the same for both cards.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: alsa-base 1.0.25+
ProcVersionSign
Uname: Linux 3.13.0-24-generic i686
ApportVersion: 2.14.1-0ubuntu3
Architecture: i386
AudioDevicesInUse:
USER PID ACCESS COMMAND
/dev/snd/
/dev/snd/
CurrentDesktop: Unity
Date: Thu May 1 21:37:12 2014
InstallationDate: Installed on 2014-04-28 (3 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release i386 (20140417)
PackageArchitec
SourcePackage: alsa-driver
Symptom: audio
Symptom_
Symptom_Card: Built-in Audio - Intel ICH6
Symptom_Type: None of the above
Title: [CA0106 - CA0106, playback] Playback problem
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/03/2006
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A08
dmi.board.name: 0G8310
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 3
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.
dmi.product.name: OptiPlex GX280
dmi.sys.vendor: Dell Inc.
Joshua Panter (josh.p) wrote : | #1 |
- AlsaInfo.txt Edit (32.9 KiB, text/plain; charset="utf-8")
- BootDmesg.txt Edit (53.0 KiB, text/plain; charset="utf-8")
- CurrentDmesg.txt Edit (7.8 KiB, text/plain; charset="utf-8")
- Dependencies.txt Edit (3.0 KiB, text/plain; charset="utf-8")
- ProcEnviron.txt Edit (103 bytes, text/plain; charset="utf-8")
- PulseList.txt Edit (27.5 KiB, text/plain; charset="utf-8")
Raymond (superquad-vortex2) wrote : | #2 |
Changed in alsa-driver (Ubuntu): | |
status: | New → Incomplete |
Vladimir (thunder27) wrote : | #3 |
- pulseverbose.log Edit (304.2 KiB, text/plain)
I have problem with this soundcard too...front left speeker is ok, but front right speaker has no sound. I have Ubuntu Gnome 14.04 amd64 version.
Vladimir (thunder27) wrote : | #4 |
I have tried this:
"speaker-test -c 2 -t wav -Dhw:CARD=
speaker-test 1.0.27.2
Playback device is hw:CARD=
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 16384
Period size range from 16 to 8192
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
1 - Front Right
^CTransfer failed: Bad address
and "speaker-test -c 2 -t wav -Dhw:CARD=
and this is an arror message:
speaker-test 1.0.27.2
Playback device is hw:CARD=CK804,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
ALSA lib pcm_hw.
Playback open error: -19,No such device
Raymond (superquad-vortex2) wrote : | #5 |
0.308| 0.000) I: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
( 0.308| 0.000) I: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
( 0.308| 0.000) I: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
( 0.308| 0.000) I: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
you need to fix the bug of "Cannot lock ctl elem" first
seem related to those locks in iec958
do you sound card support both digital out and digital input (spdif) ?
Joshua Panter (josh.p) wrote : | #6 |
- pulseverbose.log Edit (340.7 KiB, text/plain)
Here is the pulseverbose.log. I started pules and ran speaker-test -C 6
vlad: That is exactly what happens for me, too.
Joshua Panter (josh.p) wrote : | #7 |
I just tried this:
~$ speaker-test -c 6 -t wav -Dhw:CARD=
speaker-test 1.0.27.2
Playback device is hw:CARD=
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Channels count (6) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument
Joshua Panter (josh.p) wrote : | #8 |
- pulseverbose.log Edit (275.9 KiB, text/plain)
here is the puleaudioverbos
~$ speaker-test -c 6 -t wav -Dhw:CARD=
speaker-test 1.0.27.2
Playback device is hw:CARD=
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Channels count (6) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument
Launchpad Janitor (janitor) wrote : | #9 |
[Expired for alsa-driver (Ubuntu) because there has been no activity for 60 days.]
Changed in alsa-driver (Ubuntu): | |
status: | Incomplete → Expired |
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #10 |
Created attachment 111331
pulseaudio log
The game uses MonoGame as the engine, it outputs audio via ALSA. Often, but not every time, when I start the game the sound is played at double speed. What's worse all other apps also start playing audio too fast, including paplay, Chrome etc. Even those which are started after I exit the game. This can be fixed by restarting PA or after killing all clients connections with paman (if there are none after I exit the game, sound seems to be working correctly). I believe no client should affect other clients like this, no matter how it's broken. A friend of mine completed Transistor without such issues using PA. I also found that something like this was long ago fixed in Wine but this game is native. At least more native than pure Win32 apps+Wine and it doesn't use Wine. It uses Mono though and FMOD as the sound engine.
My soundcard is CA0106 Soundblaster (SB0410 SBLive! 24-bit), CPU is Intel Core i7-2600, 32Gb RAM, NVIDIA GeForce 770 GTX driver v340.65, Debian Jessie GNU/Linux amd64, Awesome WM 3.4.15, kernel v3.16.
I also have another sound chip, ALC889 Analog. It's disabled in pavucontrol.
You can also see some ALSA underruns, I couldn't fix it no matter what priorities and realtime priorities I set. They happen on both snd-hda-intel and snd-ca0106.
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #11 |
The issue seems to go away after I set the default sample spec to s32le (default is s16le). I also noticed that with s16le both Chrome and Transistor use "resample method: (null)" (according to pacmd list-sink-inputs), and with s32le it becomes "resample method: copy" for both. And no, Chrome isn't the culprit as it happens even when it's not running, I've tried. The speedup happens right after starting the game, I've run a song in Chrome and launched Transistor. First time it was ok in both Chrome and the game but on the second run the song immediately sped up to double speed. I have no idea how the sample spec (not the sample rate!) affects the speed but it's what it is.
SBLive! seems not to support 44100 Hz as it switches to 48k by default and even if I set 44100 explicitly in the daemon.conf. Though here paman and pacmd disagree with each other, pacmd says "sample spec: s16le 2ch 48000Hz" and paman says "Default Sample Type: s16le 2ch 44100Hz". Mumble notification sounds doesn't
crackle as they do on ALC889 @ 44100Hz so I believe pacmd is correct here.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #12 |
https:/
static struct snd_pcm_hardware snd_ca0106_
.info = SNDRV_PCM_INFO_MMAP |
SNDRV_
SNDRV_
SNDRV_
SNDRV_
.formats = SNDRV_PCM_
.rates = (SNDRV_
SNDRV_
.rate_min = 48000,
.rate_max = 192000,
.channels_min = 2, //1,
.channels_max = 2, //6,
.buffer_bytes_max = ((65536 - 64) * 8),
.period_bytes_min = 64,
.period_bytes_max = (65536 - 64),
.periods_min = 2,
.periods_max = 8,
.fifo_size = 0,
};
seem support both s16_le and s32_le but require SNDRV_PCM_
post the pulseaudio verbose log
and
aplay -D hw:CARD=CA0106 --dump-hw-params any.wav
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #13 |
> aplay -D hw:CARD=CA0106 --dump-hw-params /usr/share/
Playing WAVE '/usr/share/
HW Params of device "hw:CARD=CA0106":
-------
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S16_LE S32_LE
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [48000 192000]
PERIOD_TIME: (41 170667)
PERIOD_SIZE: [8 8192]
PERIOD_BYTES: [64 65472]
PERIODS: [2 8]
BUFFER_TIME: (83 341334)
BUFFER_SIZE: [16 16384]
BUFFER_BYTES: [64 65536]
TICK_TIME: ALL
-------
aplay: set_params:1239: Channels count non available
The pulseaudio log is attached to the first message. This is the debug level, AFAIK, it's the most verbose one.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #14 |
how about
aplay -D surround40:
aplay -D surround51:
pulseaudio does not support SND_PCM_
this force pulseaudio to use irq polling instead of timer scheduling
for those surround devices
+ if (!_use_mmap)
+ _use_tsched = FALSE;
+
your log did not contain the probing of your ca0106 and those errors
alsa-lib)pcm_hw.c: SNDRV_PCM_
and
pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
http://
https:/
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #15 |
static snd_pcm_uframes_t
snd_ca0106_
{
struct snd_ca0106 *emu = snd_pcm_
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_ca0106_pcm *epcm = runtime-
unsigned int ptr, prev_ptr;
int channel = epcm->channel_id;
int timeout = 10;
if (!epcm->running)
return 0;
prev_ptr = -1;
do {
ptr = snd_ca0106_
ptr = (ptr >> 3) * runtime-
ptr += bytes_to_
snd_
if (ptr >= runtime-
ptr -= runtime-
if (prev_ptr == ptr)
return ptr;
prev_ptr = ptr;
} while (--timeout);
dev_warn(
return 0;
}
pointer callback return value from hardware register,
do the sound card report realtime accurate update poistion ?
http://
try different fill rate
do the sound card report hw_ptr better than period size ?
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #16 |
Created attachment 111535
PA startup log
Here's the startup log.
> aplay -D surround40:
Playing WAVE '/usr/share/
HW Params of device "surround40:
-------
ACCESS: MMAP_COMPLEX RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT: S16_LE S32_LE
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [64 128]
CHANNELS: 4
RATE: [48000 192000]
PERIOD_TIME: (41 170667)
PERIOD_SIZE: [8 8192]
PERIOD_BYTES: [64 131072]
PERIODS: [2 8]
BUFFER_TIME: (83 341334)
BUFFER_SIZE: [16 16384]
BUFFER_BYTES: [128 262144]
TICK_TIME: ALL
-------
aplay: set_params:1239: Channels count non available
> aplay -D surround51:
Playing WAVE '/usr/share/
HW Params of device "surround51:
-------
ACCESS: MMAP_COMPLEX RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT: S16_LE S32_LE
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [96 192]
CHANNELS: 6
RATE: [48000 192000]
PERIOD_TIME: (41 170667)
PERIOD_SIZE: [8 8192]
PERIOD_BYTES: [96 196608]
PERIODS: [2 8]
BUFFER_TIME: (83 341334)
BUFFER_SIZE: [16 16384]
BUFFER_BYTES: [192 393216]
TICK_TIME: ALL
-------
aplay: set_params:1239: Channels count non available
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #17 |
Created attachment 111536
ALSA time test
The output of alsa-time-test.c
It ends with:
a.out: alsa-time-
zsh: abort ./a.out > timetest.log
I think it's ok.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #18 |
(In reply to rkfg from comment #7)
> Created attachment 111536 [details]
> ALSA time test
>
> The output of alsa-time-test.c
>
> It ends with:
> a.out: alsa-time-
> buffer_size' failed.
> zsh: abort ./a.out > timetest.log
>
> I think it's ok.
how did you run the program ?
the program is hardcoded to use 44100Hz , it should run continously without any error if fillrate is equal to period size
if sound card can report hw_ptr with better grannularity, the program can still run continously when fillrate is smaller than period size (e.g. dma brust size )
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #19 |
(In reply to rkfg from comment #6)
> Created attachment 111535 [details]
> PA startup log
>
> Here's the startup log.
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:0'
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] (alsa-lib)
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: Unable to attach to mixer iec958:0: No such file or directory
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:0'
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] (alsa-lib)setup.c: Cannot lock ctl elem
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Device or resource busy
git.alsa-
seem related to lock in iec958 playback when pulseaudio try to open iec958 for playback and capture
need to use asym plugin if your ca0106 support both iec958 playback and capture
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #20 |
}
type hooks
slave.pcm {
type hw
card $CARD
}
hooks.0 {
type ctl_elems
hook_args [
{
name "IEC958 Front Playback Volume"
index 0
lock true
preserve true
value [ 207 207 ] # Puts 0x30303030 in the Volume register. 0xff - 0x30 = 0xcf = 207
}
{
name "IEC958 Playback Switch"
lock true
preserve true
value 1
}
{
interface PCM
name "IEC958 Playback Default"
index 1
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
# for compatibility with older drivers
name "IEC958 Playback Default"
index 1
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
}
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #21 |
alternative is to force pulseaudio not to open iec958 for capture
by removing all paths-input of iec958 from
[Mapping iec958-stereo]
device-strings = iec958:%f
channel-map = left,right
paths-input = iec958-stereo-input
paths-output = iec958-
priority = 5
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #22 |
APLAY
**** List of PLAYBACK Hardware Devices ****
card 0: CA0106 [CA0106], device 0: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 1: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 2: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 3: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
ARECORD
**** List of CAPTURE Hardware Devices ****
card 0: CA0106 [CA0106], device 0: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 1: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 2: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CA0106 [CA0106], device 3: ca0106 [CA0106]
Subdevices: 1/1
Subdevice #0: subdevice #0
Changed in alsa-driver (Ubuntu): | |
status: | Expired → Incomplete |
Changed in alsa-driver: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #23 |
(In reply to Raymond from comment #8)
>
> how did you run the program ?
>
> the program is hardcoded to use 44100Hz , it should run continously without
> any error if fillrate is equal to period size
>
> if sound card can report hw_ptr with better grannularity, the program can
> still run continously when fillrate is smaller than period size (e.g. dma
> brust size )
I did:
gcc alsa-time-test.c -lasound
./a.out
That's all. What exactly should I do now and what information do you need?
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #24 |
http://
pcm.name {
type asym # Asym PCM
playback STR # Playback slave name
# or
playback { # Playback slave definition
pcm STR # Slave PCM name
# or
pcm { } # Slave PCM definition
}
capture STR # Capture slave name
# or
capture { # Capture slave definition
pcm STR # Slave PCM name
# or
pcm { } # Slave PCM definition
}
}
pcm.NAME {
type hooks # PCM with hooks
slave STR # Slave name
# or
slave { # Slave definition
pcm STR # Slave PCM name
# or
pcm { } # Slave PCM definition
}
hooks {
ID STR # Hook name (see pcm_hook)
# or
ID { } # Hook definition (see pcm_hook)
}
}
you need to put the current ca0106 iec958 slave pcm and hook into playback slave and create capture slave of asym plugin
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #25 |
(In reply to Raymond from comment #14)
> you need to put the current ca0106 iec958 slave pcm and hook into playback
> slave and create capture slave of asym plugin
Sorry, I don't understand. I'm not that familiar with low-level ALSA configs, I only did some basic operations with ~/.asoundrc
What file exactly should I change and what should I write into it?
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #26 |
/usr/share/
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #27 |
Good, the file is there and it has those lines you mentioned in #10. Now how should I modify them? Could you provide a diff to apply? I don't really get what "to put the current ca0106 iec958 slave pcm and hook into playback slave and create capture slave of asym plugin" means. If the alternative method is effectively equal to ALSA hacks, I can go that way, it seems to be much easier.
>alternative is to force pulseaudio not to open iec958 for capture
>by removing all paths-input of iec958 from
Should I comment out the entire [Mapping iec958-stereo] section or just "paths-input = iec958-
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #28 |
CA0106.pcm.iec958.0 {
@args [ CARD AES0 AES1 AES2 AES3 ]
@args.CARD {
type string
}
@args.AES0 {
type integer
}
@args.AES1 {
type integer
}
@args.AES2 {
type integer
}
@args.AES3 {
type integer
}
+ type asym
+ playback.pcm {
type hooks
slave.pcm {
type hw
card $CARD
}
hooks.0 {
type ctl_elems
hook_args [
{
name "IEC958 Front Playback Volume"
index 0
lock true
preserve true
value [ 207 207 ] # Puts 0x30303030 in the Volume register. 0xff - 0x30 = 0xcf = 207
}
{
name "IEC958 Playback Switch"
lock true
preserve true
value 1
}
{
interface PCM
name "IEC958 Playback Default"
index 1
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
{
# for compatibility with older drivers
name "IEC958 Playback Default"
index 1
lock true
preserve true
optional true
value [ $AES0 $AES1 $AES2 $AES3 ]
}
]
}
+ }
+ capture.pcm {
+ type hw
+ card $CARD
+ }
}
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #29 |
for alsa-time-test.c
dev = argc > 1 ? argv[1] : "front:0";
cap = argc > 2 ? atoi(argv[2]) : 0;
fillrate = argc > 3 ? atoi(argv[3]) : 1;
there are three parameter which allow you to change
device
capture or playback
fillrate
most sound cards cannot use default fill rate 1
for hda-intel, the hw_ptr increase by 16/32 frames for each dma transfer, fill rate can be lower than the period size
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #30 |
Created attachment 111585
ALSA test log
I've applied those changes for the ALSA config. I ran the test as ./a.out front:0 0 4 > alsa-test.log and here's the output. I stopped it with Ctrl-C. When I set the fillrate less than 4, it stops with the assertion failure like before. Setting the fillrate to 1 with playback test mode (./a.out front:0 1 1 > alsa1-test.log) doesn't fail.
That aside, I don't understand how IEC capture is related to the playback issue though. The game doesn't use microphone.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #31 |
those locks in hook plugin prevent you running
aplay -D iec958:CARD=CA0106 stereo48000.wav
and
arecord -D iec958:CARD=CA0106 test.wav
at same time
those message "Cannot lock ctl elem" should disaapear when you can playback and capture iec958 at same time ?
post pulseaudio verbose log
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #32 |
http://
you can try Alexander's pcm_avail.c to find out whether your ca0106 can report DMA_RESIDUE_
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #33 |
do the error
alsa-lib)pcm_hw.c: SNDRV_PCM_
appear when you fix the error "cannot lock ctl elem" as pulseaudio start the probing of those surround40, 51 and71 ?
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #34 |
http://
: module-alsa-sink.c: Using 4 fragments of size 8816 bytes, buffer time is 99.95ms
D: module-alsa-sink.c: hwbuf_unused_
D: module-alsa-sink.c: setting avail_min=1
I: module-alsa-sink.c: Volume ranges from 0 to 31.
I: module-alsa-sink.c: Volume ranges from -46.50 dB to 0.00 dB.
I: alsa-util.c: ALSA device lacks separate volumes control for channel 'rear-left'
I: module-alsa-sink.c: Using hardware volume control. Hardware dB scale supported.
D: alsa-util.c: snd_pcm_dump():
D: alsa-util.c: Multi PCM
D: alsa-util.c: Channel bindings:
D: alsa-util.c: 0: slave 0, channel 0
D: alsa-util.c: 1: slave 0, channel 1
D: alsa-util.c: 2: slave 1, channel 0
D: alsa-util.c: 3: slave 1, channel 1
D: alsa-util.c: Its setup is:
D: alsa-util.c: stream : PLAYBACK
D: alsa-util.c: access : RW_INTERLEAVED
D: alsa-util.c: format : S16_LE
D: alsa-util.c: subformat : STD
D: alsa-util.c: channels : 4
D: alsa-util.c: rate : 44100
D: alsa-util.c: exact rate : 44100 (44100/1)
D: alsa-util.c: msbits : 16
D: alsa-util.c: buffer_size : 4408
D: alsa-util.c: period_size : 1102
D: alsa-util.c: period_time : 24988
D: alsa-util.c: tstamp_mode : NONE
D: alsa-util.c: period_step : 1
D: alsa-util.c: avail_min : 1102
D: alsa-util.c: period_event : 0
D: alsa-util.c: start_threshold : -1
D: alsa-util.c: stop_threshold : -1
D: alsa-util.c: silence_threshold: 0
D: alsa-util.c: silence_size : 0
D: alsa-util.c: boundary : 1155530752
D: alsa-util.c: Slave #0: Hooks PCM
D: alsa-util.c: Its setup is:
D: alsa-util.c: stream : PLAYBACK
D: alsa-util.c: access : MMAP_INTERLEAVED
D: alsa-util.c: format : S16_LE
D: alsa-util.c: subformat : STD
D: alsa-util.c: channels : 2
D: alsa-util.c: rate : 44100
D: alsa-util.c: exact rate : 44100 (44100/1)
D: alsa-util.c: msbits : 16
D: alsa-util.c: buffer_size : 4408
D: alsa-util.c: period_size : 1102
D: alsa-util.c: period_time : 24988
D: alsa-util.c: tstamp_mode : NONE
D: alsa-util.c: period_step : 1
D: alsa-util.c: avail_min : 1102
D: alsa-util.c: period_event : 0
D: alsa-util.c: start_thr
D: module-alsa-sink.c: Thread starting up
D: rtpoll.c: Acquired POSIX realtime signal SIGRTMIN+29
D: module-alsa-sink.c: Read hardware volume: 0: 87% 1: 87% 2: 87% 3: 87%
I: module-alsa-sink.c: Starting playback.
I: (alsa-lib)pcm_hw.c: SNDRV_PCM_
the playback stream has been started and pcm state is running but pulseaudio still call snd_pcm_start()
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #35 |
seem default sample 16 bits has no effect on format , pulseaudio prefer 32 bits
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] card.c: Created 2 "alsa_card.
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: cannot disable ALSA period wakeups
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: ALSA period wakeups were not disabled
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-sink.c: Successfully opened device front:0.
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-sink.c: Selected mapping 'Analog Stereo' (analog-stereo).
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-sink.c: Successfully enabled mmap() mode.
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-sink.c: Successfully enabled timer-based scheduling mode.
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] (alsa-lib)
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: Unable to attach to mixer front:0: No such file or directory
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] alsa-util.c: Successfully attached to mixer 'hw:0'
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] module-
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] module-
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] sink.c: Default and alternate sample rates are the same.
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] sink.c: Created sink 0 "alsa_output.
Dec 30 22:56:29 homecomp pulseaudio[1103]: [pulseaudio] sink.c: alsa.resolution
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #36 |
Created attachment 111615
Fixed PA log
It now doesn't report "Cannot lock ctl elem".
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #37 |
Created attachment 111616
pcm_avail log
Here's the output of pcm_avail.c program.
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #38 |
(In reply to Raymond from comment #25)
> seem default sample 16 bits has no effect on format , pulseaudio prefer 32
> bits
No, it does. I have these options uncommented in my daemon.conf:
default-
default-sample-rate = 48000
I have them enabled for some time and PA startup logs were provided with them on. If that's wrong tell me and I'll provide logs without them.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #39 |
(In reply to rkfg from comment #27)
> Created attachment 111616 [details]
> pcm_avail log
>
> Here's the output of pcm_avail.c program.
avail increment at 8 frames which is less than min period size 16 and period size 1024
this mean some tsched feature are supported
hwbuf_unused can be set to non zero (e.g. multiple of 8 frames instead of period size)
min_period_size: 16 frames, dir: 0
Playback hwparams: FIFO size is 0
Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 4096
period_size : 1024
period_time : 21333
tstamp_mode : NONE
period_step : 1
avail_min : 1024
period_event : 0
start_threshold : 1024
stop_threshold : 4096
silence_
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
Playing silence
Available: 64, loop iteration: 0
Available: 72, loop iteration: 8
Available: 80, loop iteration: 16
Available: 88, loop iteration: 24
Available: 96, loop iteration: 31
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #40 |
(In reply to rkfg from comment #26)
> Created attachment 111615 [details]
> Fixed PA log
>
> It now doesn't report "Cannot lock ctl elem".
it is strange that pulseaudio still don't probe surround profiles
pactl list should list those surround profiles similar to https:/
device.
device.
device.string = "0"
device.
module-
device.icon_name = "audio-card-pci"
profiles:
output:
output:
output:
output:
output:
output:
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #41 |
can you post the output of alsa-info.sh ?
did it support 7.1 since there are only 4 jacks ?
speaker-test -c 4 -t wav -D surround40:
speaker-test -c 6 -t wav -D surround51:
speaker-test -c 8 -t wav -D surround71:
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #42 |
Created attachment 111649
ALSA info
Here's the output of alsa-info.sh. The speaker test works, all three commands without errors. However, I only have 2 speakers so I hear "front left" and "front right".
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #43 |
analog source seem supported by pulseaudio
pactl list
do pulseaudio show four input ports : phone, mic, line in and aux
SImple mixer control 'Analog Source',0
Capabilities: cenum
Items: 'Phone' 'Mic' 'Line in' 'Aux'
Item0: 'Mic'
Simple mixer control 'CAPTURE feedback',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 0 [0%] [-99999.99dB]
Front Right: Playback 0 [0%] [-99999.99dB]
Simple mixer control 'Digital Source',0
Capabilities: cenum
Items: 'IEC958 out' 'i2s mixer out' 'IEC958 in' 'i2s in' 'AC97 in' 'SRC out'
Item0: 'i2s in'
Simple mixer control 'Shared Mic/Line in',0
Capabilities: cenum
Items: 'Line in' 'Mic in'
Item0: 'Mic in'
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #44 |
CA0106 use specific name, you may need to add them to
Simple mixer control 'Analog Center/LFE',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 207 [81%] [0.00dB]
Front Right: Playback 207 [81%] [0.00dB]
Simple mixer control 'Analog Front',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 207 [81%] [0.00dB]
Front Right: Playback 207 [81%] [0.00dB]
Simple mixer control 'Analog Rear',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 207 [81%] [0.00dB]
Front Right: Playback 207 [81%] [0.00dB]
Simple mixer control 'Analog Side',0
Capabilities: pvolume
Playback channels: Front Left - Front Right
Limits: Playback 0 - 255
Mono:
Front Left: Playback 207 [81%] [0.00dB]
Front Right: Playback 207 [81%] [0.00dB]
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #45 |
Jan 01 18:52:27 homecomp pulseaudio[14807]: [pulseaudio] alsa-mixer.c: Skipping profile output:
seem cannot opem iec958 for input
can you specify device 0
+ capture.pcm {
+ type hw
+ card $CARD
+ device 0
+
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #46 |
[Mapping iec958-stereo]
device-strings = iec958:%f
channel-map = left,right
paths-input = iec958-stereo-input
paths-output = iec958-
priority = 5
as pulseaudio already define iec958-stereo-input
when there is iec958-
why there is no iec958-
http://
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #47 |
Created attachment 111662
Pulse log
(In reply to Raymond from comment #35)
> can you specify device 0
>
> + capture.pcm {
> + type hw
> + card $CARD
> + device 0
> +
Added this, here's the startup log.
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #48 |
Created attachment 111663
pactl list log
Log of pactl list.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #49 |
arecord -v -d 1 -D iec958:CARD=CA0106 -f dat -t wav --dump-hw-params test.wav
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #50 |
device.description = "CA0106 Soundblaster (SB0410 SBLive! 24-bit) Analog Stereo"
alsa.mixer_name = "CA0106"
module-
device.icon_name = "audio-card-pci"
Ports:
analog-input-mic: Microphone (priority: 8700)
analog-
analog-
analog-
analog-
analog-
analog-
Active Port: analog-input-mic
Formats:
pcm
seem phone is still missing
SImple mixer control 'Analog Source',0
Capabilities: cenum
Items: 'Phone' 'Mic' 'Line in' 'Aux'
Item0: 'Mic'
Simple mixer control 'Line in',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 255
Front Left: Capture 0 [0%] [-99999.99dB]
Front Right: Capture 0 [0%] [-99999.99dB]
Simple mixer control 'Mic',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 255
Front Left: Capture 255 [100%] [24.00dB]
Front Right: Capture 255 [100%] [24.00dB]
Simple mixer control 'Phone',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 255
Front Left: Capture 0 [0%] [-99999.99dB]
Front Right: Capture 0 [0%] [-99999.99dB]
Simple mixer control 'Aux',0
Capabilities: cvolume
Capture channels: Front Left - Front Right
Limits: Capture 0 - 255
Front Left: Capture 0 [0%] [-99999.99dB]
Front Right: Capture 0 [0%] [-99999.99dB]
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #51 |
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
HW Params of device "iec958:
-------
ACCESS: MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT: S16_LE S32_LE
SUBFORMAT: STD
SAMPLE_BITS: [16 32]
FRAME_BITS: [32 64]
CHANNELS: 2
RATE: [48000 192000]
PERIOD_TIME: (41 170334)
PERIOD_SIZE: [8 8176]
PERIOD_BYTES: [64 32704]
PERIODS: 2
BUFFER_TIME: (83 340667)
BUFFER_SIZE: [16 16352]
BUFFER_BYTES: [64 65408]
TICK_TIME: ALL
-------
Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 8160
period_size : 4080
period_time : 85000
tstamp_mode : NONE
period_step : 1
avail_min : 4080
period_event : 0
start_threshold : 1
stop_threshold : 8160
silence_
silence_size : 0
boundary : 9187343239835811840
appl_ptr : 0
hw_ptr : 0
overrun!!! (at least 0.017 ms long)
Status:
state : XRUN
trigger_time: 847573.10484226
tstamp : 847573.10498485
delay : 0
avail : 8160
avail_max : 8160
^CAborted by signal Interrupt...
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #52 |
does analog capture also overrun ?
arecord -f dat -D hw:CARD=CA0106 -t wav -d 5 test.wav
https:/
if your sb0410 only have four jacks and support 7.1
it need snd_ca0106_
if (emu->details-
ADD_CTLS(emu, snd_ca0106_
if (emu->details-
err = snd_ctl_add(card, snd_ctl_
else /* gpio_type == 2 */
err = snd_ctl_add(card, snd_ctl_
if (err < 0)
return err;
}
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #53 |
It does:
> arecord -f dat -D hw:CARD=CA0106 -t wav -d 5 test.wav
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.084 ms long)
^CAborted by signal Interrupt...
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #54 |
https:/
GENERAL INFO:
* Model: SB0410
* P17 Chip: CA0106-DAT
* AC97 Codec: None
* ADC: WM8775EDS (4 Channel)
* DAC: CS4382 (114 dB, 24-Bit, 192 kHz, 8-Channel D/A Converter with DSD Support)
/* New Sound Blaster Live! 7.1 24bit. This does not have an AC97. 53SB041000001 */
{ .serial = 0x10061102,
.name = "Live! 7.1 24bit [SB0410]",
.gpio_type = 1,
.i2c_adc = 1 } ,
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #55 |
BTW, my mic is connected to the blue jack, not the usual pink one. This is the only configuration I've found to be working, others result in noise or silence. The mic is a bit more quiet (not _almost silent_ as if it's connected to a Line-In jack, just not comfortable enough) than it was on the ALC889 internal card so I had to increase the volume via software means. There's no boost setting in the alsamixer but PulseAudio can handle that.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #56 |
(In reply to rkfg from comment #43)
> It does:
> > arecord -f dat -D hw:CARD=CA0106 -t wav -d 5 test.wav
> Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz,
> Stereo
> overrun!!! (at least 0.084 ms long)
> ^CAborted by signal Interrupt...
you have to report to the author if overrun occur
do it work better if you specify buffer size power of two (eg. 1024, 2048 or 4096
arecord -f dat -D hw:CARD=CA0106 -t wav -d 5 --buffer-size= 2048 test.wav
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #57 |
It happens more likely with small buffers and sometimes doesn't happen with larger buffer. However, this behavior is not consistent:
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.025 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.023 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.023 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.028 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.045 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.039 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.046 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.039 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.046 ms long)
^CAborted by signal Interrupt...
%[homecomp]
Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 0.044 ms long)
^CAborted by signal Interrupt...
Ok, what about the original issue? I don't quite get what we are doing here. It looks like we're debugging something completely unrelated, for example, I don't use the d...
In freedesktop.org Bugzilla #87713, David Henningsson (diwic) wrote : | #58 |
Raymond tends to be side-tracked from time to time and ask questions which are related to your original issue. Also apologies for not having read the entire thread through.
PulseAudio closes the audio stream five seconds after no applications are active, so that's probably when the issue goes back to normal too.
The resampler changed from "null" to "copy" means that we have a resampler engine active for the stream, but all it does is to convert from s16le (as being input by Chrome) to s32le.
You're probably hitting a driver issue, but I wonder how we can prove it. Also the fact that it seems to hit one application only is a bit strange, maybe it's related to the requested latency by that specific application or something.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #59 |
did your sb0410 have these two chips ?
ADC: WM8775EDS (4 Channel)
DAC: CS4382
if you look at cs4382 datasheet , it has three modes which can double or quad the speed
for wm8775 which does not have any boost for mic, you have to ask the author who add support of mic line in switch since the datasheet does not mention any usage of input pins as mic
https:/
you have to file upstream bug for overrun when recording using arecord
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #60 |
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #61 |
it is strange the pulseaudio no longer probe surround40 , 51, and 71
your log have no traces of surround21 too
http://
chmap -D surround40 query
chmap -D surround40 get
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #62 |
(In reply to Raymond from comment #49)
> did your sb0410 have these two chips ?
>
> ADC: WM8775EDS (4 Channel)
> DAC: CS4382
>
My card looks exactly like this: http://
Probably, it has all these chips.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #63 |
http://
seem need specific jack to support 7.1
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #64 |
control.29 {
iface MIXER
name 'Phone Capture Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
dbmin -9999999
dbmax 2400
dbvalue.0 -9999999
dbvalue.1 -9999999
}
}
control.30 {
iface MIXER
name 'Mic Capture Volume'
value.0 255
value.1 255
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
dbmin -9999999
dbmax 2400
dbvalue.0 2400
dbvalue.1 2400
}
}
control.31 {
iface MIXER
name 'Line in Capture Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
dbmin -9999999
dbmax 2400
dbvalue.0 -9999999
dbvalue.1 -9999999
}
}
control.32 {
iface MIXER
name 'Aux Capture Volume'
value.0 0
value.1 0
comment {
access 'read write'
type INTEGER
count 2
range '0 - 255'
dbmin -9999999
dbmax 2400
dbvalue.0 -9999999
dbvalue.1 -9999999
}
}
refer to table 11 wm8775 datasheet
0dB is at 0xcf and 24 dB at 0xff
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #65 |
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #66 |
Four Stereo ADC Inputs with Analogue Gain Adjust from +24dB to –21dB in 0.5dB Steps
Digital Gain Adjust from -21.5dB to -103dB.
table 10 of wm8775 mention that 0.5 dB per steps and min 0 is mute
As max 255 is +24 dB , 0xcf is 0 dB ,
step 1 is -103 dB
Source #1
State: SUSPENDED
Name: alsa_input.
Description: CA0106 Soundblaster (SB0410 SBLive! 24-bit) Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s32le 2ch 48000Hz
Channel Map: front-left,
Owner Module: 8
Mute: no
Volume: front-left: 99957 / 153% / 11.00 dB, front-right: 99957 / 153% / 11.00 dB
balance 0.00
Base Volume: 26090 / 40% / -24.00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #67 |
seem
chmap -Dsurround41:
fail but
chmap -Dsurround41:
return channel map
in ca0106.conf
there is no definition of ca0106.
just
<confdir:
<confdir:
<confdir:
Do surround21 , surround41 appear in
aplay -L
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #68 |
static unsigned int i2c_adc_init[][2] = {
{ 0x17, 0x00 }, /* Reset */
{ 0x07, 0x00 }, /* Timeout */
{ 0x0b, 0x22 }, /* Interface control */
{ 0x0c, 0x22 }, /* Master mode control */
{ 0x0d, 0x08 }, /* Powerdown control */
{ 0x0e, 0xcf }, /* Attenuation Left 0x01 = -103dB, 0xff = 24dB */
{ 0x0f, 0xcf }, /* Attenuation Right 0.5dB steps */
{ 0x10, 0x7b }, /* ALC Control 1 */
{ 0x11, 0x00 }, /* ALC Control 2 */
{ 0x12, 0x32 }, /* ALC Control 3 */
{ 0x13, 0x00 }, /* Noise gate control */
{ 0x14, 0xa6 }, /* Limiter control */
{ 0x15, ADC_MUX_LINEIN }, /* ADC Mixer control */
seem default is linein and 0dB
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #69 |
static DECLARE_
the scale only define step 1 is -103.50 dB and step size 0.5dB
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #70 |
for unknown reason which pulseaudio did not probe surround40
pulseaudio still using timer base scheduling in your last log
but it was strange tradtional mode was used in your first log
20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.name = "CA0106"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.id = "ca0106"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.subdevice = "0"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.subdevice_name = "subdevice #0"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.device = "0"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.card = "0"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.card_name = "CA0106"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.long_card_name = "Live! 7.1 24bit [SB0410] at 0xcf00 irq 19"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: alsa.driver_name = "snd_ca0106"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.bus_path = "pci-0000:06:00.0"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: sysfs.path = "/devices/
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.bus = "pci"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.vendor.id = "1102"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.vendor.name = "Creative Labs"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.product.id = "0007"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.product.name = "CA0106 Soundblaster (SB0410 SBLive! 24-bit)"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.string = "front:0"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.access_mode = "mmap+timer"
Jan 02 20:25:49 homecomp pulseaudio[11971]: [pulseaudio] sink.c: device.profile.name = "analog-stereo"
Dec 25 19:33:27 homecomp pulseaudio[1911]: module-
Dec 25 19:33:27 homecomp pulseaudio[1911]: Requested tlength=2000.00 ms, minreq=20.00 ms
Dec 25 19:33:27 homecomp pulseaudio[1911]: Traditional mode enabled, modifying sink usec only for compat with minreq.
Dec 25 19:33:27 homecomp pulseaudio[1911]: Requested latency=1960.00 ms, Received latency=341.33 ms
Dec 25 19:33:27 homecomp pulseaudio[1911]: memblockq requested: maxlength=4194304, tlength=192000, base=2, prebuf=190082, minreq=1920 maxrewind=0
Dec 25 19:33:27 homecomp pulseaudio[1911]: memblockq sanitized: maxlength=4194304, tlength=192000, base=2, prebuf=190082, minreq=1920 maxrewind=0
Dec 25 19:33:27 homecomp pulseaudio[1911]: Final latency 2341.33 ms = 1960.00 ms + 2*20.00 ms + 341.33 ms
De...
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #71 |
(In reply to Raymond from comment #57)
> Do surround21 , surround41 appear in
>
> aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
pulse
PulseAudio Sound Server
default:CARD=CA0106
CA0106, CA0106
Default Audio Device
sysdefault:
CA0106, CA0106
Default Audio Device
front:CARD=
CA0106, CA0106
Front speakers
rear:CARD=
CA0106, CA0106
Rear speakers
center_
CA0106, CA0106
Center and Subwoofer speakers
side:CARD=
CA0106, CA0106
Side speakers
surround21:
CA0106, CA0106
2.1 Surround output to Front and Subwoofer speakers
surround40:
CA0106, CA0106
4.0 Surround output to Front and Rear speakers
surround41:
CA0106, CA0106
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:
CA0106, CA0106
5.0 Surround output to Front, Center and Rear speakers
surround51:
CA0106, CA0106
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:
CA0106, CA0106
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:
CA0106, CA0106
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=
CA0106, CA0106
Direct sample mixing device
dmix:CARD=
CA0106, CA0106
Direct sample mixing device
dmix:CARD=
CA0106, CA0106
Direct sample mixing device
dmix:CARD=
CA0106, CA0106
Direct sample mixing device
dsnoop:
CA0106, CA0106
Direct sample snooping device
dsnoop:
CA0106, CA0106
Direct sample snooping device
dsnoop:
CA0106, CA0106
Direct sample snooping device
dsnoop:
CA0106, CA0106
Direct sample snooping device
hw:CARD=
CA0106, CA0106
Direct hardware device without any conversions
hw:CARD=
CA0106, CA0106
Direct hardware device without any conversions
hw:CARD=
CA0106, CA0106
Direct hardware device without any conversions
hw:CARD=
CA0106, CA0106
Direct hardware device without any conversions
plughw:
CA0106, CA0106
Hardware device with all software conversions
plughw:
CA0106, CA0106
Hardware device with all software conversions
plughw:
CA0106, CA0106
Hardware device with all software conversions
plughw:
CA0106, CA0106
Hardware device with all software conversions
default:CARD=PCH
HDA Intel PCH, ALC889 Analog
Default Audio Device
sysdefault:CARD=PCH
HDA Intel PCH, ALC889 Analog
Default Audio Device
front:CARD=
HDA Intel PCH, ALC889 Analog
Front speakers
surround21:
HDA Intel PCH, ALC889 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:
HDA Intel PCH, ALC889 Analog
4.0 Surround output to Front and Rear speakers
surround41:
HDA Intel PCH, ALC889 Analog
...
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #72 |
what is the smallest buffer size which aplay without underrun ? 1024,512,
aplay -D front:CARD=CA0106 -v --buffer-size=1024 stereo48000.wav
19:29:42 homecomp pulseaudio[1911]: Protocol version: remote 26, local 29
Dec 25 19:29:42 homecomp pulseaudio[1911]: Got credentials: uid=1000 gid=1000 success=1
Dec 25 19:29:42 homecomp pulseaudio[1911]: SHM possible: yes
Dec 25 19:29:42 homecomp pulseaudio[1911]: Negotiated SHM: yes
Dec 25 19:29:42 homecomp pulseaudio[1911]: Looking for .desktop file for Transistor.
Dec 25 19:29:42 homecomp pulseaudio[1911]: Not setting device for stream ALSA Playback, because it lacks role.
Dec 25 19:29:42 homecomp pulseaudio[1911]: Negotiated format: pcm, format.
Dec 25 19:29:42 homecomp pulseaudio[1911]: Sink alsa_output.
Dec 25 19:29:42 homecomp pulseaudio[1911]: memblockq requested: maxlength=33554432, tlength=0, base=4, prebuf=0, minreq=1 maxrewind=0
Dec 25 19:29:42 homecomp pulseaudio[1911]: memblockq sanitized: maxlength=33554432, tlength=33554432, base=4, prebuf=0, minreq=4 maxrewind=0
Dec 25 19:29:42 homecomp pulseaudio[1911]: Created input 15 "ALSA Playback" on alsa_output.
Dec 25 19:29:42 homecomp pulseaudio[1911]: media.name = "ALSA Playback"
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.name = "ALSA plug-in [Transistor.
Dec 25 19:29:42 homecomp pulseaudio[1911]: native-
Dec 25 19:29:42 homecomp pulseaudio[1911]: native-
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: window.x11.display = ":0.0"
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: module-
Dec 25 19:29:42 homecomp pulseaudio[1911]: Requested tlength=85.33 ms, minreq=21.33 ms
Dec 25 19:29:42 homecomp pulseaudio[1911]: Early requests mode enabled, configuring sink latency to minreq.
Dec 25 19:29:42 homecomp pulseaudio[1911]: Requested latency=21.33 ms, Received latency=26.00 ms
Dec 25 19:29:42 homecomp pulseaudio[1911]: memblockq requested: maxlength=4194304, tlength=16384, base=4, prebuf=11396, minreq=4992 maxrewind=0
Dec 25 19:29:42 homecomp pulseaudio[1911]: memblockq sanitized: maxlength=4194304, tlength=16384, base=4, prebuf=11396, minreq=4992...
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #73 |
This command doesn't work, it says "aplay: set_params:1239: Channels count non available". The -D default:CARD=CA0106 variant works and it does not overrun. I only had overruns on recording (at least, explicit). That said, I've made a huge improvement in my system, I compiled a pf-kernel and set CONFIG_PREEMPT=y, CONFIG_HZ_1000=y and CONFIG_HZ=1000. The default Debian kernel is on 250 Hz and is not preemptible. Now that my kernel supports preemption I (crossing fingers) don't have ALSA over- and underruns anymore. They were quite sudden and audible as clicks/gaps. I saw this in the log:
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: Scheduling delay of 11.42 ms > 11.31 ms, you might want to investigate this to improve latency...
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: Underrun!
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: Increasing minimal latency to 1.00 ms
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: Latency set to 21.33ms
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: hwbuf_unused=57352
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: setting avail_min=7651
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: Latency set to 21.33ms
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: hwbuf_unused=57352
Jan 4 20:25:15 homecomp pulseaudio[26848]: [alsa-sink-ca0106] alsa-sink.c: setting avail_min=7651
With the preempt kernel this doesn't happen at all (I grepped the log) and sound is just as good as with pure ALSA.
However, arecord still drops overrun for CA0106. It doesn't do it for PCH (ALC889) though.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #74 |
if you cannot find stereo 48000Hz wav file
aplay -D plughw:CARD=CA0106 -v --buffer-size=1024 any.wav
try to find minimum buffer size 1024,512, 256,128,64,... without underrun
1024 frames = 21.33 ms x 48000Hz
4096 = 85.33 ms x 48000Hz
if request tlength 85.33ms is buffer time and 21.33ms is period time
not sure why pulseaudio received latency is 26ms
alsa_output.
Dec 25 19:29:42 homecomp pulseaudio[1911]: media.name = "ALSA Playback"
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.name = "ALSA plug-in [Transistor.
Dec 25 19:29:42 homecomp pulseaudio[1911]: native-
Dec 25 19:29:42 homecomp pulseaudio[1911]: native-
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: window.x11.display = ":0.0"
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: application.
Dec 25 19:29:42 homecomp pulseaudio[1911]: module-
Dec 25 19:29:42 homecomp pulseaudio[1911]: Requested tlength=85.33 ms, minreq=21.33 ms
Dec 25 19:29:42 homecomp pulseaudio[1911]: Early requests mode enabled, configuring sink latency to minreq.
Dec 25 19:29:42 homecomp pulseaudio[1911]: Requested latency=21.33 ms, Received latency=26.00 ms
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #75 |
# aplay -D plughw:CARD=CA0106 -v --buffer-size=128 /usr/share/
Playing WAVE '/usr/share/
Plug PCM: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0
1 <- 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 128
period_size : 32
period_time : 666
tstamp_mode : NONE
period_step : 1
avail_min : 32
period_event : 0
start_threshold : 128
stop_threshold : 128
silence_
silence_size : 0
boundary : 4611686018427387904
Slave: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 128
period_size : 32
period_time : 666
tstamp_mode : NONE
period_step : 1
avail_min : 32
period_event : 0
start_threshold : 128
stop_threshold : 128
silence_
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
128 seems to be fine. It's not consistent, sometimes 64 works ok, sometimes it overruns (says so in the console and hitches). 128 has never overrun, neither visually (saying it in the console), nor audible (clicks/pops).
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #76 |
Tried with a stereo 48k file (converted /usr/share/
# aplay -D plughw:CARD=CA0106 -v --buffer-size=64 /tmp/kde.wav
Playing WAVE '/tmp/kde.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
Plug PCM: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 64
period_size : 16
period_time : 333
tstamp_mode : NONE
period_step : 1
avail_min : 16
period_event : 0
start_threshold : 64
stop_threshold : 64
silence_
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
underrun!!! (at least 0.010 ms long)
Status:
state : XRUN
trigger_time: 260136.459825170
tstamp : 260136.459834181
delay : 0
avail : 64
avail_max : 64
underrun!!! (at least 0.020 ms long)
Status:
state : XRUN
trigger_time: 260136.460064991
tstamp : 260136.460084242
delay : 0
avail : 64
avail_max : 64
No underruns with 128b buffer.
In freedesktop.org Bugzilla #87713, Raymond (superquad-vortex2) wrote : | #77 |
how about CD audio (44100Hz stereo) using plughw?
In freedesktop.org Bugzilla #87713, Rkfg (rkfg) wrote : | #78 |
Interesting. I've converted that file to 44100 Hz and now it reveals a strange behavior. When I play it with buffer size of 64 it sounds like the pitch is lower than it should be (even if it doesn't overrun though it does from time to time). When the size is 128 it sounds fine.
# aplay -D plughw:CARD=CA0106 -v --buffer-size=64 /tmp/kde44100.wav
Playing WAVE '/tmp/kde44100.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 58
period_size : 14
period_time : 333
tstamp_mode : NONE
period_step : 1
avail_min : 14
period_event : 0
start_threshold : 58
stop_threshold : 58
silence_
silence_size : 0
boundary : 4179340454199820288
Slave: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 64
period_size : 16
period_time : 333
tstamp_mode : NONE
period_step : 1
avail_min : 16
period_event : 0
start_threshold : 64
stop_threshold : 64
silence_
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
underrun!!! (at least 0.116 ms long)
Status:
state : XRUN
trigger_time: 301642.243139271
tstamp : 301642.243254519
delay : 2
avail : 56
avail_max : 56
# aplay -D plughw:CARD=CA0106 -v --buffer-size=128 /tmp/kde44100.wav
Playing WAVE '/tmp/kde44100.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 117
period_size : 29
period_time : 666
tstamp_mode : NONE
period_step : 1
avail_min : 29
period_event : 0
start_threshold : 117
stop_threshold : 117
silence_
silence_size : 0
boundary : 4215369251218784256
Slave: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 128
period_size : 32
period_time : 666
tstamp_mode : NONE
period_step : 1
avail_min : 32
period_event : 0
start_threshold : 128
stop_threshold : 128
silence_
silence_size : 0
boundary : 4611686018427387904
appl_ptr : 0
hw_ptr : 0
This pitch (or maybe speed?) weirdness occurs only on playing stereo fil...
In freedesktop.org Bugzilla #87713, Gitlab-migration (gitlab-migration) wrote : | #79 |
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https:/
Changed in alsa-driver: | |
status: | Confirmed → Unknown |
you have to post the pulseaudio verbose log
https:/ /wiki.ubuntu. com/PulseAudio/ Log
did you find any error messages in the pukseaudio log when you play multi channel ?
alsa-sink] (alsa-lib)pcm_hw.c: SNDRV_PCM_ IOCTL_START failed (-77)
https:/ /bugs.launchpad .net/ubuntu/ +source/ alsa-driver/ +bug/1289811