[alsa-devel] No sound with Creative Sound Blaster X-Fi Xtreme Audio Notebook (CA0110-IBG)
Hello. I'm trying to get sound from my Creative Sound Blaster X-Fi Xtreme Audio Notebook (it's expresscard) with fresh ALSA drivers (I tried both alsa-driver-snapshot and alsa-driver-unstable-snapshot from 16.04.2009). I can change mixer values in alsamixer, but no sound output. For example:
------------------------------------------------------------ $ speaker-test -D plughw:1,0
speaker-test 1.0.19
Playback device is plughw:1,0 Stream parameters are 48000Hz, S16_LE, 1 channels Using 16 octaves of pink noise Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument ^C ------------------------------------------------------------
at this time ALSA kernel driver gives an error in dmesg:
------------------------------------------------------------ ... ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ... ------------------------------------------------------------
What should I do? Here is some information:
------------------------------------------------------------ $ cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 1.0.19. Compiled on Apr 17 2009 for kernel 2.6.29.1 (SMP).
$ cat /proc/asound/cards 0 [Intel ]: HDA-Intel - HDA Intel HDA Intel at 0xf3600000 irq 22 1 [Generic ]: HDA-Intel - HD-Audio Generic HD-Audio Generic at 0xc2000000 irq 16 ------------------------------------------------------------
------------------------------------------------------------ 03:00.0 Audio device: Creative Labs [SB X-Fi Xtreme Audio] CA0110-IBG Subsystem: Creative Labs Device 0018 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: 64 (500ns min, 5000ns max) Interrupt: pin A routed to IRQ 16 Region 0: Memory at c2000000 (32-bit, non-prefetchable) [size=16K] Capabilities: <access denied> Kernel driver in use: HDA Intel Kernel modules: snd-hda-intel ------------------------------------------------------------
Information from the alsa-info.sh: http://www.alsa-project.org/db/?f=a2683b00960fd3d8d32c44cc360aa0df5c413bdc Kernel log in the attachment.
Sorry for my terrible english.
At Fri, 17 Apr 2009 20:40:23 +0600, Ivan Mironov wrote:
Hello. I'm trying to get sound from my Creative Sound Blaster X-Fi Xtreme Audio Notebook (it's expresscard) with fresh ALSA drivers (I tried both alsa-driver-snapshot and alsa-driver-unstable-snapshot from 16.04.2009).
Avoid unstable version right now. alsa-driver-snapshot already contains CA0110 patch.
I can change mixer values in alsamixer, but no sound output. For example:
$ speaker-test -D plughw:1,0
speaker-test 1.0.19
Playback device is plughw:1,0 Stream parameters are 48000Hz, S16_LE, 1 channels Using 16 octaves of pink noise Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument ^C
at this time ALSA kernel driver gives an error in dmesg:
... ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ...
What should I do? Here is some information:
Could you run alsa-info.sh with --no-upload option, and attach the generated file?
The problem is likely that the codec doesn't respond properly as expected by the driver regarding the PCM parameter inquiry. We can debug using hda-verb, for example...
thanks,
Takashi
В Птн, 17/04/2009 в 16:46 +0200, Takashi Iwai пишет:
At Fri, 17 Apr 2009 20:40:23 +0600, Ivan Mironov wrote:
Hello. I'm trying to get sound from my Creative Sound Blaster X-Fi Xtreme Audio Notebook (it's expresscard) with fresh ALSA drivers (I tried both alsa-driver-snapshot and alsa-driver-unstable-snapshot from 16.04.2009).
Avoid unstable version right now. alsa-driver-snapshot already contains CA0110 patch.
At this moment I have ALSA drivers compiled from alsa-driver-snapshot.
I can change mixer values in alsamixer, but no sound output. For example:
$ speaker-test -D plughw:1,0
speaker-test 1.0.19
Playback device is plughw:1,0 Stream parameters are 48000Hz, S16_LE, 1 channels Using 16 octaves of pink noise Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument ^C
at this time ALSA kernel driver gives an error in dmesg:
... ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ...
What should I do? Here is some information:
Could you run alsa-info.sh with --no-upload option, and attach the generated file?
Done.
The problem is likely that the codec doesn't respond properly as expected by the driver regarding the PCM parameter inquiry. We can debug using hda-verb, for example...
I don't know how ALSA driver and HDA codec works internally, so I will not be able to do it myself. Could you tell me what exactly should I do? I downloaded and compiled hda-verb-0.3.
thanks,
Takashi
At Fri, 17 Apr 2009 21:31:37 +0600, Ivan Mironov wrote:
В Птн, 17/04/2009 в 16:46 +0200, Takashi Iwai пишет:
At Fri, 17 Apr 2009 20:40:23 +0600, Ivan Mironov wrote:
Hello. I'm trying to get sound from my Creative Sound Blaster X-Fi Xtreme Audio Notebook (it's expresscard) with fresh ALSA drivers (I tried both alsa-driver-snapshot and alsa-driver-unstable-snapshot from 16.04.2009).
Avoid unstable version right now. alsa-driver-snapshot already contains CA0110 patch.
At this moment I have ALSA drivers compiled from alsa-driver-snapshot.
I can change mixer values in alsamixer, but no sound output. For example:
$ speaker-test -D plughw:1,0
speaker-test 1.0.19
Playback device is plughw:1,0 Stream parameters are 48000Hz, S16_LE, 1 channels Using 16 octaves of pink noise Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument Playback open error: -22,Invalid argument ^C
at this time ALSA kernel driver gives an error in dmesg:
... ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2040: snd_pcm_hw_constraints_complete failed ...
What should I do? Here is some information:
Could you run alsa-info.sh with --no-upload option, and attach the generated file?
Done.
The problem is likely that the codec doesn't respond properly as expected by the driver regarding the PCM parameter inquiry. We can debug using hda-verb, for example...
I don't know how ALSA driver and HDA codec works internally, so I will not be able to do it myself. Could you tell me what exactly should I do? I downloaded and compiled hda-verb-0.3.
OK, let's check first what the driver gets wrong. For example, try the patch below. It'll give some debug prints.
Takashi
--- diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index fc6f98e..46d577c 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1910,61 +1910,83 @@ int snd_pcm_hw_constraints_complete(struct snd_pcm_substream *substream) mask |= 1 << SNDRV_PCM_ACCESS_MMAP_COMPLEX; } err = snd_pcm_hw_constraint_mask(runtime, SNDRV_PCM_HW_PARAM_ACCESS, mask); - if (err < 0) + if (err < 0) { + snd_printd("ACCESS minmax error\n"); return err; + }
err = snd_pcm_hw_constraint_mask64(runtime, SNDRV_PCM_HW_PARAM_FORMAT, hw->formats); - if (err < 0) + if (err < 0) { + snd_printd("FORMAT minmax error\n"); return err; + }
err = snd_pcm_hw_constraint_mask(runtime, SNDRV_PCM_HW_PARAM_SUBFORMAT, 1 << SNDRV_PCM_SUBFORMAT_STD); - if (err < 0) + if (err < 0) { + snd_printd("SUBFORMAT minmax error\n"); return err; + }
err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, hw->channels_min, hw->channels_max); - if (err < 0) + if (err < 0) { + snd_printd("CHANNELS minmax error\n"); return err; + }
err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_RATE, hw->rate_min, hw->rate_max); - if (err < 0) - return err; + if (err < 0) { + snd_printd("RATE minmax error\n"); + return err; + }
err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, hw->period_bytes_min, hw->period_bytes_max); - if (err < 0) - return err; + if (err < 0) { + snd_printd("PERIOD_BYTES minmax error\n"); + return err; + }
err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIODS, hw->periods_min, hw->periods_max); - if (err < 0) + if (err < 0) { + snd_printd("PERIODS minmax error\n"); return err; + }
err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, hw->period_bytes_min, hw->buffer_bytes_max); - if (err < 0) + if (err < 0) { + snd_printd("BUFFER_BYTES minmax error\n"); return err; + }
err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, snd_pcm_hw_rule_buffer_bytes_max, substream, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, -1); - if (err < 0) + if (err < 0) { + snd_printd("BUFFER_BYTES #2 error\n"); return err; + }
/* FIXME: remove */ if (runtime->dma_bytes) { err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 0, runtime->dma_bytes); - if (err < 0) + if (err < 0) { + snd_printd("BUFFER_BYTES #3 error\n"); return -EINVAL; + } }
if (!(hw->rates & (SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_CONTINUOUS))) { err = snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, snd_pcm_hw_rule_rate, hw, SNDRV_PCM_HW_PARAM_RATE, -1); - if (err < 0) + if (err < 0) { + snd_printd("RATE #2 error\n"); return err; + } }
/* FIXME: this belong to lowlevel */ diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 66a7d3d..6cced40 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -2796,6 +2796,8 @@ static int set_pcm_default_values(struct hda_codec *codec, return -EINVAL; info->ops.cleanup = hda_pcm_default_cleanup; } + printk(KERN_DEBUG "XXX PCM NID=0x%x rates=0x%x, formats=0x%llx, bps=0x%x\n", + info->nid, info->rates, (unsigned long long)info->formats, info->maxbps); return 0; }
В Птн, 17/04/2009 в 18:23 +0200, Takashi Iwai пишет:
OK, let's check first what the driver gets wrong. For example, try the patch below. It'll give some debug prints.
ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:1942: CHANNELS minmax error ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2062: snd_pcm_hw_constraints_complete failed
В Птн, 17/04/2009 в 23:01 +0600, Ivan Mironov пишет:
В Птн, 17/04/2009 в 18:23 +0200, Takashi Iwai пишет:
OK, let's check first what the driver gets wrong. For example, try the patch below. It'll give some debug prints.
ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:1942: CHANNELS minmax error ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2062: snd_pcm_hw_constraints_complete failed
Full kernel log attached.
At Fri, 17 Apr 2009 23:01:46 +0600, Ivan Mironov wrote:
В Птн, 17/04/2009 в 18:23 +0200, Takashi Iwai пишет:
OK, let's check first what the driver gets wrong. For example, try the patch below. It'll give some debug prints.
ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:1942: CHANNELS minmax error ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2062: snd_pcm_hw_constraints_complete failed
Thanks. I guess I fixed this problem now. Try the very latest alsa-driver snapshot again. ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-snapshot.tar.gz
Takashi
В Пнд, 20/04/2009 в 10:55 +0200, Takashi Iwai пишет:
At Fri, 17 Apr 2009 23:01:46 +0600, Ivan Mironov wrote:
В Птн, 17/04/2009 в 18:23 +0200, Takashi Iwai пишет:
OK, let's check first what the driver gets wrong. For example, try the patch below. It'll give some debug prints.
ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:1942: CHANNELS minmax error ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2062: snd_pcm_hw_constraints_complete failed
Thanks. I guess I fixed this problem now. Try the very latest alsa-driver snapshot again. ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-snapshot.tar.gz
Takashi
The old error disappeared, but soundcard still doesn't play sound.
If I run speaker test with an odd number of channels (-c 1, -c 3, etc.), it works without any errors (and without any sound =)):
---------------------------------------------------- $ speaker-test -D plughw:1,0
speaker-test 1.0.19
Playback device is plughw:1,0 Stream parameters are 48000Hz, S16_LE, 1 channels Using 16 octaves of pink noise Rate set to 48000Hz (requested 48000Hz) Buffer size range from 64 to 16384 Period size range from 32 to 8192 Using max buffer size 16384 Periods = 4 was set period_size = 4096 was set buffer_size = 16384 0 - Front Left ^C ----------------------------------------------------
But if I run it with even number of channels (-c 2, -c 4, etc.), it exits with an error in a while (about five seconds):
---------------------------------------------------- $ speaker-test -c 4 -D plughw:1,0
speaker-test 1.0.19
Playback device is plughw:1,0 Stream parameters are 48000Hz, S16_LE, 4 channels Using 16 octaves of pink noise Rate set to 48000Hz (requested 48000Hz) Buffer size range from 32 to 8192 Period size range from 16 to 4096 Using max buffer size 8192 Periods = 4 was set period_size = 2048 was set buffer_size = 8192 0 - Front Left Write error: -5,Input/output error xrun_recovery failed: -5,Input/output error Transfer failed: Operation not permitted ----------------------------------------------------
At this time in dmesg writes the following error:
---------------------------------------------------- ALSA /home/ivan/stuff/alsa-driver/acore/../alsa-kernel/core/pcm_lib.c:1628: playback write error (DMA or IRQ trouble?) ----------------------------------------------------
At Mon, 20 Apr 2009 18:33:51 +0600, Ivan Mironov wrote:
В Пнд, 20/04/2009 в 10:55 +0200, Takashi Iwai пишет:
At Fri, 17 Apr 2009 23:01:46 +0600, Ivan Mironov wrote:
В Птн, 17/04/2009 в 18:23 +0200, Takashi Iwai пишет:
OK, let's check first what the driver gets wrong. For example, try the patch below. It'll give some debug prints.
ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:1942: CHANNELS minmax error ALSA /home/ivan/stuff/alsa-driver/acore/pcm_native.c:2062: snd_pcm_hw_constraints_complete failed
Thanks. I guess I fixed this problem now. Try the very latest alsa-driver snapshot again. ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-snapshot.tar.gz
Takashi
The old error disappeared, but soundcard still doesn't play sound.
If I run speaker test with an odd number of channels (-c 1, -c 3, etc.), it works without any errors (and without any sound =)):
It's because the device doesn't support odd numbers.
But if I run it with even number of channels (-c 2, -c 4, etc.), it exits with an error in a while (about five seconds):
...
At this time in dmesg writes the following error:
ALSA /home/ivan/stuff/alsa-driver/acore/../alsa-kernel/core/pcm_lib.c:1628: playback write error (DMA or IRQ trouble?)
This means that the device really doesn't work, something is wrong with the HD-audio controller. No idea what's wrong at this moment.
Takashi
participants (2)
-
Ivan Mironov
-
Takashi Iwai