* em8300 and ALSA problems
@ 2008-02-04 15:32 Jan Willies
2008-02-04 15:39 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Jan Willies @ 2008-02-04 15:32 UTC (permalink / raw)
To: dxr3-devel; +Cc: alsa-devel
Hi,
I really want pulseaudio badly and since it doesn't work very good with OSS output, I decided to switch to ALSA. However, I'm running into some problems with ALSA. My dxr3 (em8300) card seems to be detected by ALSA (/proc/asound/cards lists it too):
[root@server ~]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: I82801BAICH2 [Intel 82801BA-ICH2], device 0: Intel ICH [Intel 82801BA-ICH2]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: EM8300 [Sigma Designs' EM8300], device 0: EM8300/0 [EM8300 DAC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: EM8300 [Sigma Designs' EM8300], device 1: EM8300/1 [EM8300 IEC958]
Subdevices: 1/1
Subdevice #0: subdevice #0
But for some reason it won't play anything:
[root@server ~]# alsaplayer --verbose -o alsa -d hw:1,0 Strong.mp3
AlsaPlayer 0.99.80
(C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
Output plugin: ALSA output v1.9.0beta12
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_BE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [32000 48000]
PERIOD_TIME: (21333 32000]
PERIOD_SIZE: 1024
PERIOD_BYTES: 4096
PERIODS: [2 256]
BUFFER_TIME: (42666 8192000]
BUFFER_SIZE: [2048 262144]
BUFFER_BYTES: [8192 1048576]
TICK_TIME: ALL
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS: RW_INTERLEAVED
FORMAT: S16_BE
SUBFORMAT: STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: [32000 48000]
PERIOD_TIME: (21333 32000]
PERIOD_SIZE: 1024
PERIOD_BYTES: 4096
PERIODS: [2 256]
BUFFER_TIME: (42666 8192000]
BUFFER_SIZE: [2048 262144]
BUFFER_BYTES: [8192 1048576]
TICK_TIME: ALL
failed to configure output device...trying OSS
error opening /dev/dsp
Failed to initialize plugin!
Failed to register plugin: /usr/lib/alsaplayer/output/liboss_out.so
failed to load output plugin (alsa). exitting...
I don't really have a clue what's going on. People on #alsa didn't either. Here's a link to tsalsa output: http://nopaste.com/p/a0NYa75gW
The module was loaded with options em8300 dicom_fix=1 dicom_control=1 dicom_other_pal=1 audio_driver=alsa. I'm running em8300-0.16.4-rc1
- Jan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em8300 and ALSA problems
2008-02-04 15:32 em8300 and ALSA problems Jan Willies
@ 2008-02-04 15:39 ` Takashi Iwai
2008-02-04 15:46 ` [alsa-devel] " Jan Willies
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2008-02-04 15:39 UTC (permalink / raw)
To: Jan Willies; +Cc: dxr3-devel, alsa-devel
At Mon, 04 Feb 2008 16:32:29 +0100,
Jan Willies wrote:
>
> [root@server ~]# alsaplayer --verbose -o alsa -d hw:1,0 Strong.mp3
> AlsaPlayer 0.99.80
> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
> Output plugin: ALSA output v1.9.0beta12
> error on set_format SND_PCM_FORMAT_S16
> Unavailable hw params:
> ACCESS: RW_INTERLEAVED
> FORMAT: S16_BE
The device is supposed to be big-endian only. Try plughw:1,0
instead to convert endianness.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [alsa-devel] em8300 and ALSA problems
2008-02-04 15:39 ` Takashi Iwai
@ 2008-02-04 15:46 ` Jan Willies
2008-02-04 15:52 ` Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Jan Willies @ 2008-02-04 15:46 UTC (permalink / raw)
To: Takashi Iwai; +Cc: dxr3-devel, alsa-devel
Takashi Iwai wrote:
> At Mon, 04 Feb 2008 16:32:29 +0100,
> Jan Willies wrote:
>> [root@server ~]# alsaplayer --verbose -o alsa -d hw:1,0 Strong.mp3
>> AlsaPlayer 0.99.80
>> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
>> Output plugin: ALSA output v1.9.0beta12
>> error on set_format SND_PCM_FORMAT_S16
>> Unavailable hw params:
>> ACCESS: RW_INTERLEAVED
>> FORMAT: S16_BE
>
> The device is supposed to be big-endian only. Try plughw:1,0
> instead to convert endianness.
Yes, that seems to work! Only for analog output though. When I try with digital I get the same error again.
[jan@server ~]$ cat /proc/asound/devices
0: [ 0] : control
1: : sequencer
16: [ 0- 0]: digital audio playback
24: [ 0- 0]: digital audio capture
25: [ 0- 1]: digital audio capture
32: [ 1] : control
33: : timer
48: [ 1- 0]: digital audio playback
49: [ 1- 1]: digital audio playback
[root@server ~]# alsaplayer --verbose -o alsa -d plughw:1,1 Strong.mp3
AlsaPlayer 0.99.80
(C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
Output plugin: ALSA output v1.9.0beta12
error on set_format SND_PCM_FORMAT_S16
Unavailable hw params:
ACCESS: RW_INTERLEAVED
FORMAT: IEC958_SUBFRAME_BE
[...]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em8300 and ALSA problems
2008-02-04 15:46 ` [alsa-devel] " Jan Willies
@ 2008-02-04 15:52 ` Takashi Iwai
2008-02-04 16:02 ` Jan Willies
0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2008-02-04 15:52 UTC (permalink / raw)
To: Jan Willies; +Cc: dxr3-devel, alsa-devel
At Mon, 04 Feb 2008 16:46:44 +0100,
Jan Willies wrote:
>
> Takashi Iwai wrote:
> > At Mon, 04 Feb 2008 16:32:29 +0100,
> > Jan Willies wrote:
> >> [root@server ~]# alsaplayer --verbose -o alsa -d hw:1,0 Strong.mp3
> >> AlsaPlayer 0.99.80
> >> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
> >> Output plugin: ALSA output v1.9.0beta12
> >> error on set_format SND_PCM_FORMAT_S16
> >> Unavailable hw params:
> >> ACCESS: RW_INTERLEAVED
> >> FORMAT: S16_BE
> >
> > The device is supposed to be big-endian only. Try plughw:1,0
> > instead to convert endianness.
>
> Yes, that seems to work! Only for analog output though. When I try with digital I get the same error again.
>
> [jan@server ~]$ cat /proc/asound/devices
> 0: [ 0] : control
> 1: : sequencer
> 16: [ 0- 0]: digital audio playback
> 24: [ 0- 0]: digital audio capture
> 25: [ 0- 1]: digital audio capture
> 32: [ 1] : control
> 33: : timer
> 48: [ 1- 0]: digital audio playback
> 49: [ 1- 1]: digital audio playback
>
> [root@server ~]# alsaplayer --verbose -o alsa -d plughw:1,1 Strong.mp3
> AlsaPlayer 0.99.80
> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
> Output plugin: ALSA output v1.9.0beta12
> error on set_format SND_PCM_FORMAT_S16
> Unavailable hw params:
> ACCESS: RW_INTERLEAVED
> FORMAT: IEC958_SUBFRAME_BE
> [...]
The plug plugin doesn't handle the automatic conversion of
IEC958-subframe formats. You'll likely need to create a PCM
configuration to use iec958 plugin properly (better as a card-specific
config stored in /usr/share/alsa/cards). Some config files there
already use iec958 plugin, such as ATIIXP-SPDMA.conf.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: em8300 and ALSA problems
2008-02-04 15:52 ` Takashi Iwai
@ 2008-02-04 16:02 ` Jan Willies
2008-02-08 0:27 ` [alsa-devel] " Nicolas Boullis
0 siblings, 1 reply; 6+ messages in thread
From: Jan Willies @ 2008-02-04 16:02 UTC (permalink / raw)
To: Takashi Iwai; +Cc: dxr3-devel, alsa-devel
Takashi Iwai wrote:
> At Mon, 04 Feb 2008 16:46:44 +0100,
> Jan Willies wrote:
>> Takashi Iwai wrote:
>>> At Mon, 04 Feb 2008 16:32:29 +0100,
>>> Jan Willies wrote:
>>>> [root@server ~]# alsaplayer --verbose -o alsa -d hw:1,0 Strong.mp3
>>>> AlsaPlayer 0.99.80
>>>> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
>>>> Output plugin: ALSA output v1.9.0beta12
>>>> error on set_format SND_PCM_FORMAT_S16
>>>> Unavailable hw params:
>>>> ACCESS: RW_INTERLEAVED
>>>> FORMAT: S16_BE
>>> The device is supposed to be big-endian only. Try plughw:1,0
>>> instead to convert endianness.
>> Yes, that seems to work! Only for analog output though. When I try with digital I get the same error again.
>>
>> [jan@server ~]$ cat /proc/asound/devices
>> 0: [ 0] : control
>> 1: : sequencer
>> 16: [ 0- 0]: digital audio playback
>> 24: [ 0- 0]: digital audio capture
>> 25: [ 0- 1]: digital audio capture
>> 32: [ 1] : control
>> 33: : timer
>> 48: [ 1- 0]: digital audio playback
>> 49: [ 1- 1]: digital audio playback
>>
>> [root@server ~]# alsaplayer --verbose -o alsa -d plughw:1,1 Strong.mp3
>> AlsaPlayer 0.99.80
>> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
>> Output plugin: ALSA output v1.9.0beta12
>> error on set_format SND_PCM_FORMAT_S16
>> Unavailable hw params:
>> ACCESS: RW_INTERLEAVED
>> FORMAT: IEC958_SUBFRAME_BE
>> [...]
>
> The plug plugin doesn't handle the automatic conversion of
> IEC958-subframe formats. You'll likely need to create a PCM
> configuration to use iec958 plugin properly (better as a card-specific
> config stored in /usr/share/alsa/cards). Some config files there
> already use iec958 plugin, such as ATIIXP-SPDMA.conf.
There is already a /usr/share/alsa/cards/EM8300.conf with EM8300.pcm.iec958.0 {...} (http://pastebin.ca/raw/891351) from Ville Skyttä but I don't know how to use it. Neither how to create a PCM configuration for the iec958 plugin. I guess I'll wait for some dxr3 devs to join the party :-)
Thanks for your help.
- Jan
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [alsa-devel] em8300 and ALSA problems
2008-02-04 16:02 ` Jan Willies
@ 2008-02-08 0:27 ` Nicolas Boullis
0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Boullis @ 2008-02-08 0:27 UTC (permalink / raw)
To: Jan Willies; +Cc: dxr3-devel, alsa-devel
Hi all, and sorry for the late answer,
On Mon, Feb 04, 2008 at 05:02:01PM +0100, Jan Willies wrote:
> Takashi Iwai wrote:
> > At Mon, 04 Feb 2008 16:46:44 +0100,
> > Jan Willies wrote:
> >> Takashi Iwai wrote:
> >>> At Mon, 04 Feb 2008 16:32:29 +0100,
> >>> Jan Willies wrote:
> >>>> [root@server ~]# alsaplayer --verbose -o alsa -d hw:1,0 Strong.mp3
> >>>> AlsaPlayer 0.99.80
> >>>> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
> >>>> Output plugin: ALSA output v1.9.0beta12
> >>>> error on set_format SND_PCM_FORMAT_S16
> >>>> Unavailable hw params:
> >>>> ACCESS: RW_INTERLEAVED
> >>>> FORMAT: S16_BE
> >>> The device is supposed to be big-endian only. Try plughw:1,0
> >>> instead to convert endianness.
> >> Yes, that seems to work! Only for analog output though. When I try with digital I get the same error again.
> >>
> >> [jan@server ~]$ cat /proc/asound/devices
> >> 0: [ 0] : control
> >> 1: : sequencer
> >> 16: [ 0- 0]: digital audio playback
> >> 24: [ 0- 0]: digital audio capture
> >> 25: [ 0- 1]: digital audio capture
> >> 32: [ 1] : control
> >> 33: : timer
> >> 48: [ 1- 0]: digital audio playback
> >> 49: [ 1- 1]: digital audio playback
> >>
> >> [root@server ~]# alsaplayer --verbose -o alsa -d plughw:1,1 Strong.mp3
> >> AlsaPlayer 0.99.80
> >> (C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.
> >> Output plugin: ALSA output v1.9.0beta12
> >> error on set_format SND_PCM_FORMAT_S16
> >> Unavailable hw params:
> >> ACCESS: RW_INTERLEAVED
> >> FORMAT: IEC958_SUBFRAME_BE
> >> [...]
> >
> > The plug plugin doesn't handle the automatic conversion of
> > IEC958-subframe formats. You'll likely need to create a PCM
> > configuration to use iec958 plugin properly (better as a card-specific
> > config stored in /usr/share/alsa/cards). Some config files there
> > already use iec958 plugin, such as ATIIXP-SPDMA.conf.
>
> There is already a /usr/share/alsa/cards/EM8300.conf with EM8300.pcm.iec958.0 {...} (http://pastebin.ca/raw/891351) from Ville Skyttä but I don't know how to use it. Neither how to create a PCM configuration for the iec958 plugin. I guess I'll wait for some dxr3 devs to join the party :-)
As Takashi Iwai noticed, the "EM8300 DAC" device only supports 16-bit
big-endian 2-channel data, but it also has its channels swapped and
lacks a volume control. Using plughw:1,0 does not unswap the channels or
add a volume control.
As for the "EM8300 IEC958" device, it only supports big-endian
IEC958 subframes, and needs specific values for its preambles.
For those reasons, I had to write a specific configuration file for
EM8300 card (and fix some bugs in alsa-lib's iec958 plugin).
Using this file is pretty trivial:
- for the "EM8300 DAC" device, use the "default:1" alsa device
- for the "EM8300 IEC958" device, use the "iec958:1" alsa device
Not that, if I understand ALSA correctly, this is not EM8300-specifica
at all, the same syntax should work with any card.
If you wish to add volume control and format conversion to your "EM8300
IEC958" device, create a ~/.asoundrc file with:
pcm.foobar {
type plug
slave.pcm {
type softvol
slave.pcm iec958:EM8300
control {
name "IEC958 Playback Volume"
card EM8300
}
}
}
and then use the "foobar" alsa device. (Note that there might be some
syntax errors, since it is untested.)
Note that there's nothing specific to the EM8300 cards here, the same
thing should work with any card that supports IEC958, just replace the
two "EM8300" with the name or number of the card you want to use.
Hope this helps,
Nicolas
PS: any comment or suggestion for improvement is welcome, especially
from ALSA experts (which I am not).
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-02-08 0:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-04 15:32 em8300 and ALSA problems Jan Willies
2008-02-04 15:39 ` Takashi Iwai
2008-02-04 15:46 ` [alsa-devel] " Jan Willies
2008-02-04 15:52 ` Takashi Iwai
2008-02-04 16:02 ` Jan Willies
2008-02-08 0:27 ` [alsa-devel] " Nicolas Boullis
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.