Jan Willies | 2 Jan 2009 12:11

Re: [Christmas] Both ALSA and OSS sound devices

Hi Nicolas,

Nicolas Boullis schrieb:
> The patch is somewhat invasive; it would be nice if as many people as 
> possible could give it a try (even if you only use a style of audio 
> device). Please give it a try and report back!

OSS plays fine but I can't get ALSA to work. I can't use alsaplayer or 
alsamixer:

[jan <at> server em8300-nboullis]$ alsamixer
alsamixer: function snd_ctl_open failed for default: No such file or 
directory

[root <at> server ~]# cat /sys/module/em8300/parameters/audio_driver
alsa,alsa,alsa,alsa

[root <at> server ~]# cat /proc/asound/cards
  0 [EM8300         ]: EM8300 - Sigma Designs' EM8300
                       Sigma Designs' EM8300

[jan <at> server modules]$ ll /dev/dsp
lrwxrwxrwx 1 root root 9  2. Jan 12:07 /dev/dsp -> sound/dsp

Jan  2 12:03:21 server Sigma Designs EM8300 0000:02:05.0: PCI INT A -> 
GSI 17 (level, low) -> IRQ 17
Jan  2 12:03:21 server em8300-0: EM8300 8300 (rev 2) <6>bus: 2, devfn: 
40, irq: 17, <6>memory: 0xf4100000.
Jan  2 12:03:21 server em8300-0: mapped-memory at 0xd0f80000
Jan  2 12:03:21 server em8300-0: using MTRR
(Continue reading)

Ville Skyttä | 2 Jan 2009 23:44
Picon
Picon
Favicon

[PATCH] Fix setting BCS in overlay/overlay.c

Hi,

The attached patch fixes setting BCS in overlay/overlay.c.  Untested, but 
should be Obviously Correct(tm).
Attachment (overlay-bcs.patch): text/x-diff, 649 bytes
------------------------------------------------------------------------------
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dxr3-devel
Nicolas Boullis | 3 Jan 2009 23:39
Picon
Favicon

Re: [Christmas] Both ALSA and OSS sound devices

Hi Jan,

On Fri, Jan 02, 2009 at 12:11:37PM +0100, Jan Willies wrote:
> 
> OSS plays fine

That's already good news! :-)

> but I can't get ALSA to work. I can't use alsaplayer or 
> alsamixer:
> 
> [jan <at> server em8300-nboullis]$ alsamixer
> alsamixer: function snd_ctl_open failed for default: No such file or 
> directory

Hmmm...
Did you use the ALSA-style audio device of the em8300 driver before?

The EM8300 chip has no hardware volume control so alsamixer is not 
expected to find anything...
Well, not exacly in fact: if you have /usr/share/alsa/cards/EM8300.conf 
installed (or wherever you preferred distro puts its ALSA configuration 
files), you'll have software-emulated volume control. But unless I'm 
mistaken, it requires that the PCM device is open (or has been opened).

What if you try to play some sound with
  aplay -D default:CARD=EM8300
? (I hope the syntax is good, I'm still away from my H+ and DXR3 
boards...)

(Continue reading)

Jan Willies | 4 Jan 2009 11:05

Re: [Christmas] Both ALSA and OSS sound devices

Hi Nicolas,

Nicolas Boullis schrieb:
> On Fri, Jan 02, 2009 at 12:11:37PM +0100, Jan Willies wrote:
>> but I can't get ALSA to work. I can't use alsaplayer or 
>> alsamixer:
>>
>> [jan <at> server em8300-nboullis]$ alsamixer
>> alsamixer: function snd_ctl_open failed for default: No such file or 
>> directory
> 
> Hmmm...
> Did you use the ALSA-style audio device of the em8300 driver before?

Nope, I've always used OSS (because of vdr-plugin-dxr3) although I 
remember I tried it some month ago: 
http://thread.gmane.org/gmane.linux.alsa.devel/51290/focus=2270

I could hear sound through the analog jack but not via optical back then.

> The EM8300 chip has no hardware volume control so alsamixer is not 
> expected to find anything...
> Well, not exacly in fact: if you have /usr/share/alsa/cards/EM8300.conf 
> installed (or wherever you preferred distro puts its ALSA configuration 
> files), you'll have software-emulated volume control. But unless I'm 
> mistaken, it requires that the PCM device is open (or has been opened).

/usr/share/alsa/cards/EM8300.conf is in place.

> What if you try to play some sound with
(Continue reading)

Nicolas Boullis | 4 Jan 2009 18:10
Picon
Favicon

Re: [Christmas] Both ALSA and OSS sound devices

Hi Jan,

On Sun, Jan 04, 2009 at 11:05:27AM +0100, Jan Willies wrote:
> 
> I could hear sound through the analog jack but not via optical back then.

When we are successful with analog, it should not be too complex to 
switch to digital (but not optical) output...

> 
> > The EM8300 chip has no hardware volume control so alsamixer is not 
> > expected to find anything...
> > Well, not exacly in fact: if you have /usr/share/alsa/cards/EM8300.conf 
> > installed (or wherever you preferred distro puts its ALSA configuration 
> > files), you'll have software-emulated volume control. But unless I'm 
> > mistaken, it requires that the PCM device is open (or has been opened).
> 
> /usr/share/alsa/cards/EM8300.conf is in place.

That's fine.

> > What if you try to play some sound with
> >   aplay -D default:CARD=EM8300
> > ? (I hope the syntax is good, I'm still away from my H+ and DXR3 
> > boards...)
> 
> [jan <at> server modules]$ LANG=C aplay -D default:CARD=EM8300
(...)

Hmmm... my syntax must be broken. What about "default:EM8300", 
(Continue reading)

Jan Willies | 4 Jan 2009 18:33

Re: [Christmas] Both ALSA and OSS sound devices

Hi Nicolas,

Nicolas Boullis schrieb:
> On Sun, Jan 04, 2009 at 11:05:27AM +0100, Jan Willies wrote:
>> I could hear sound through the analog jack but not via optical back then.
> 
> When we are successful with analog, it should not be too complex to 
> switch to digital (but not optical) output...

Right, I meant digital output.

>> [jan <at> server modules]$ aplay -lL
>> aplay: device_list:217: no soundcards found...
> 
> That certainly does not seem good; I'll see later how it works on my 
> system (when I'm back home).

Ok, thanks.

>> [jan <at> server modules]$ LANG=C alsaplayer --verbose -o alsa -d plughw:0,0 
>> bla.mp3
> (...)
> 
> It looks very bad.

:/

> I would not recommend using plughw since it does not unswap the left and 
> right channels, and also does not implement volume control.

(Continue reading)

Nicolas Boullis | 4 Jan 2009 21:48
Picon
Favicon

Re: [Christmas] Both ALSA and OSS sound devices

Hi Jan,

On Sun, Jan 04, 2009 at 06:33:57PM +0100, Jan Willies wrote:
> 
> > I would not recommend using plughw since it does not unswap the left and 
> > right channels, and also does not implement volume control.
> 
> It was recommended on the alsa list for reasons I didn't understand 
> anyway: http://thread.gmane.org/gmane.linux.alsa.devel/51290/focus=51291

The EM8300 chip has several problems as a soundcard (for the analog 
ouput):
 - it only supports 2 channels big-endian 16-bit data;
 - it only supports a few frequencies (as far as I remember 32kHz, 
   44.1kHz and 48kHz);
 - the left and right channels are swapped;
 - no volume control.

As for the digital output:
 - it only supports big-endian IEC958 subframes;
 - it only supports a few frequencies;
 - no volume control.

All these problems can be solved in software. And what is great with 
ALSA is that alsa-lib provides all that is required to solve all these 
probems in userspace. Hence the kernel-space driver simply reflects what 
the hardware supports.

Most userspace applications require a specific format, number of 
channels and frequency.
(Continue reading)

Jan Willies | 5 Jan 2009 12:29

Re: [Christmas] Both ALSA and OSS sound devices

Hi Nicolas,

Nicolas Boullis schrieb:
> On Sun, Jan 04, 2009 at 06:33:57PM +0100, Jan Willies wrote:
>>> I would not recommend using plughw since it does not unswap the left and 
>>> right channels, and also does not implement volume control.
>> It was recommended on the alsa list for reasons I didn't understand 
>> anyway: http://thread.gmane.org/gmane.linux.alsa.devel/51290/focus=51291
> 
> The EM8300 chip has several problems as a soundcard (for the analog 
> ouput):
[...]

Thanks for taking the time to explain, it's now a lot clearer to me what 
the whole stuff is about.

> As for your problem I wonder whether your ALSA installation is fine...
> What is you distro? Is it up-to-date?
> Would it be possible for you to test your ALSA installation with a 
> different ("real") soundcard?

It happens you were right. My soundsystem was somehow b0rked. I tried 
activating the internal soundcard and it gave me nothing too. There was 
a distinct lack of /dev/snd/pcmC* without which alsa-lib couldn't work.

It seemed that I loaded the em8300 module too early (even before snd-*), 
so after fixing that it works now!

http://www.alsa-project.org/db/?f=09e56a9e9fd045f96130e84cbf096c2d10922699

(Continue reading)

Nicolas Boullis | 5 Jan 2009 22:45
Picon
Favicon

Re: [Christmas] Both ALSA and OSS sound devices

Hi Jan,

On Mon, Jan 05, 2009 at 12:29:01PM +0100, Jan Willies wrote:
> 
> It happens you were right. My soundsystem was somehow b0rked. I tried 
> activating the internal soundcard and it gave me nothing too. There was 
> a distinct lack of /dev/snd/pcmC* without which alsa-lib couldn't work.
> 
> It seemed that I loaded the em8300 module too early (even before snd-*), 
> so after fixing that it works now!
> 
> http://www.alsa-project.org/db/?f=09e56a9e9fd045f96130e84cbf096c2d10922699
> 
> I can hear sound through the digital output with alsaplayer -o alsa -i 
> text -d iec958 :) and the vdr-plugin-dxr3 works too, so I guess you did 
> all the em8300 stuff right. Great work!

Ok, that's good news. Thanks for taking the time to test it!

I thought that the em8300 module would depend on the needed snd-* 
modules... Did you use any special option to modprobe to allow loading 
em8300 without the snd-* modules?

Cheers,

Nicolas

------------------------------------------------------------------------------
Jan Willies | 6 Jan 2009 09:10

Re: [Christmas] Both ALSA and OSS sound devices

Hi Nicolas,

Nicolas Boullis schrieb:
> I thought that the em8300 module would depend on the needed snd-* 
> modules... Did you use any special option to modprobe to allow loading 
> em8300 without the snd-* modules?

I don't know how I managed it but that's the only reason I can think of. 
Blocking the internal soundcard may have been a problem too. This _was_ 
my modules-line:

MODULES=(e100 em8300 ac97_bus snd-mixer-oss snd-pcm-oss snd-page-alloc 
snd-pcm snd-timer snd snd-ac97-codec !snd-intel8x0 soundcore fuse aes-i586)

Or maybe my distro (Arch Linux) fscked the modules-dependancies up, or 
it just was a faulty boot (I don't reboot that machine often).

This isn't run at boot time either, although I guess it should:

[jan <at> server ~]$ cat /etc/modprobe.d/em8300
alias char-major-121 em8300
install em8300 /sbin/modprobe adv717x && /sbin/modprobe --ignore-install 
em8300 && sleep 2s && chown root:video /dev/em8300* && chmod 666 
/sys/class/em8300/em8300-0/device/zoom
remove em8300 /sbin/modprobe -r --ignore-remove em8300 && /sbin/modprobe 
-r adv717x
options adv717x pixelport_16bit=0

- jan

(Continue reading)


Gmane