Re: [alsa-devel] [regression] 2.6.25-rc4 snd-es18xx broken on Alpha

From: Rene Herman
Date: Mon Mar 24 2008 - 20:28:12 EST


On 25-03-08 00:56, Michael Cree wrote:

I have applied the patch to the PWS600au. Sound now works. I can play 8bit and 16bit sound files through the es1887 and the C-Media CM8738. They are both working fine.

Thanks much for the quick reply. That's good to hear. As indicated, Bob seemed to be experiencing something else but this is pretty fundamental so I'll not try to comment on his case any further until he's had a chance to test this as well.

Takashi -- over to you for Michael's issue? His PWS600AU (MIATA) system soils itself badly when using SNDRV_PCM_INFO_MMAP. His XP1000 works fine and I haven't the faintest clue if switching on CONFIG_ALPHA_MIATA is the proper switch, nor if outright disabling mmap is the correct approach. The patch that works for him is attached again for reference.

The way this does the disabling also implies disabling SNDRV_PCM_INFO_IOMEM by the way...

I managed to get a 32bit sound file to play through the M-Audio
Revolution too. (Though another 32bit sound file just produces silence
through the M-Audio Rev. Haven't been able to establish why - the file
looks fine to me.) Repeated playing of files doesn't cause any problems.

I can't get sox's play to work (reports no mmap support, which is, of course, quite true). I don't know how to tell sox to use the equivalent
of alsa's hw device. So I can't do the test on short files that Bob was
performing.

$ sox foo.wav -t alsa hw

should do it. Here's a file Bob passed me as a problematic one. 8-bit, 11025, mono:

http://members.home.nl/rene.herman/asskickd.wav

At this stage I've run out of time to test the M-Audio Rev in the XP1000 and see if the MMAP disable patch help there.

Given that it fixes es18xx and cmipci on the PWS600au and that those worked without trouble on the XP1000, you'd _expect_ not, but the OOPs you posted before seemed to indicate that it stands a fair chance afer all.

Rene. diff --git a/include/sound/asound.h b/include/sound/asound.h
index 3eaf155..e3b9c2d 100644
--- a/include/sound/asound.h
+++ b/include/sound/asound.h
@@ -241,8 +241,14 @@ typedef int __bitwise snd_pcm_subformat_t;
#define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0)
#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD

+#ifdef CONFIG_ALPHA_MIATA
+#define SNDRV_PCM_INFO_MMAP 0 /* the useful comment goes here */
+#define SNDRV_PCM_INFO_MMAP_VALID 0
+#else
#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */
#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */
+#endif
+
#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */
#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */
#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */