All of lore.kernel.org
 help / color / mirror / Atom feed
* asoundrc parse error (bug)
@ 2002-05-09  1:19 Paul Davis
  2002-05-09  7:26 ` Jaroslav Kysela
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Davis @ 2002-05-09  1:19 UTC (permalink / raw)
  To: alsa-devel

i mentioned a month or two ago that the parsing of asoundrc didn't
handle things that were apparently integers unless they were
quoted. abramo claimed this was fixed, and indeed it is in top level
constructs. but here's one:

pcm.9652 {
	type hw
	card 2
}

pcm.st {
       type plug
       slave.pcm 9652
       ttable.0.24 1
       ttable.1.25 1
}       

this will fail unless you put the "9652" for the slave.pcm definition
in quotes. the error is:

ALSA lib pcm.c:1621:(snd_pcm_open_conf) Invalid type for PCM definition (id: pcm, value: 9652)
arecord: main:447: audio open error: Invalid argument

further, this:

pcm.spdif {
       type plug
       slave.pcm "9652"
       ttable.0.24 1
       ttable.1.25 1
}       

will fail like this:

ALSA lib conf.c:1131:(parse_def) spdif is not a compound
ALSA lib conf.c:1520:(snd_config_load1) _toplevel_:16:11:Invalid argument
ALSA lib conf.c:2616:(snd_config_hook_load) /home/pbd/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2463:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:2859:(snd_config_update_r) hooks failed, removing configuration
aplay: pcm_list:248: snd_config_update: Invalid argument
pbd[555]>aplay -L
ALSA lib conf.c:1131:(parse_def) spdif is not a compound
ALSA lib conf.c:1520:(snd_config_load1) _toplevel_:16:11:Invalid argument
ALSA lib conf.c:2616:(snd_config_hook_load) /home/pbd/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:2463:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:2859:(snd_config_update_r) hooks failed, removing configuration
aplay: pcm_list:248: snd_config_update: Invalid argument

simply changing "spdif" to "st" will fix that error. it seems that
"spdif" is recognized as a keyword, or something like that.

--p

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: asoundrc parse error (bug)
  2002-05-09  1:19 asoundrc parse error (bug) Paul Davis
@ 2002-05-09  7:26 ` Jaroslav Kysela
  2002-05-09 13:05   ` Paul Davis
  0 siblings, 1 reply; 3+ messages in thread
From: Jaroslav Kysela @ 2002-05-09  7:26 UTC (permalink / raw)
  To: Paul Davis; +Cc: alsa-devel@alsa-project.org

On Wed, 8 May 2002, Paul Davis wrote:

> i mentioned a month or two ago that the parsing of asoundrc didn't
> handle things that were apparently integers unless they were
> quoted. abramo claimed this was fixed, and indeed it is in top level
> constructs. but here's one:
> 
> pcm.9652 {
> 	type hw
> 	card 2
> }
> 
> pcm.st {
>        type plug
>        slave.pcm 9652
>        ttable.0.24 1
>        ttable.1.25 1
> }       
> 
> this will fail unless you put the "9652" for the slave.pcm definition
> in quotes. the error is:
> 
> ALSA lib pcm.c:1621:(snd_pcm_open_conf) Invalid type for PCM definition (id: pcm, value: 9652)
> arecord: main:447: audio open error: Invalid argument

It's ok, slave.pcm should be a string (as defined in asoundrc.txt or 
alsa-lib reference guide).

> 
> further, this:
> 
> pcm.spdif {
>        type plug
>        slave.pcm "9652"
>        ttable.0.24 1
>        ttable.1.25 1
> }       
> 
> will fail like this:
> 
> ALSA lib conf.c:1131:(parse_def) spdif is not a compound
> ALSA lib conf.c:1520:(snd_config_load1) _toplevel_:16:11:Invalid argument
> ALSA lib conf.c:2616:(snd_config_hook_load) /home/pbd/.asoundrc may be old or corrupted: consider to remove or fix it
> ALSA lib conf.c:2463:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
> ALSA lib conf.c:2859:(snd_config_update_r) hooks failed, removing configuration
> aplay: pcm_list:248: snd_config_update: Invalid argument
> pbd[555]>aplay -L
> ALSA lib conf.c:1131:(parse_def) spdif is not a compound
> ALSA lib conf.c:1520:(snd_config_load1) _toplevel_:16:11:Invalid argument
> ALSA lib conf.c:2616:(snd_config_hook_load) /home/pbd/.asoundrc may be old or corrupted: consider to remove or fix it
> ALSA lib conf.c:2463:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
> ALSA lib conf.c:2859:(snd_config_update_r) hooks failed, removing configuration
> aplay: pcm_list:248: snd_config_update: Invalid argument
> 
> simply changing "spdif" to "st" will fix that error. it seems that
> "spdif" is recognized as a keyword, or something like that.

We have already defined pcm.spdif in global configuration file 
/usr/share/alsa/alsa.conf. If you want to override the defaults you should 
use 'pcm.!spdif { }' (override old configuration node).

Anyway, it would be better to add support for RME cards to standard 
configuration files. I've created initial ones, could you verify them?
They are placed in /usr/share/alsa/cards/ directory - RME9636.conf and 
RME9652.conf files (sources are in alsa-lib/src/conf). The S/PDIF output 
should work as 'plug:spdif' or  simply 'spdif' when no conversion is 
necessary.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project  http://www.alsa-project.org
SuSE Linux    http://www.suse.com


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: asoundrc parse error (bug)
  2002-05-09  7:26 ` Jaroslav Kysela
@ 2002-05-09 13:05   ` Paul Davis
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Davis @ 2002-05-09 13:05 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel@alsa-project.org

>> pcm.st {
>>        type plug
>>        slave.pcm 9652
>>        ttable.0.24 1
>>        ttable.1.25 1
>> }       
>> 
>> this will fail unless you put the "9652" for the slave.pcm definition
>> in quotes. the error is:
>> 
>> ALSA lib pcm.c:1621:(snd_pcm_open_conf) Invalid type for PCM definition (id:
> pcm, value: 9652)
>> arecord: main:447: audio open error: Invalid argument
>
>It's ok, slave.pcm should be a string (as defined in asoundrc.txt or 
>alsa-lib reference guide).

well, my original claim was that the parsing code wouldn't allow the
use of numerics as device names. abramo claimed that there was no
problem with this. this example shows that there is. 

there is nothing ambiguous about the example above. the problem arises
only because a formal grammar is not being used to parse it. whatever.

>Anyway, it would be better to add support for RME cards to standard 
>configuration files. I've created initial ones, could you verify them?
>They are placed in /usr/share/alsa/cards/ directory - RME9636.conf and 
>RME9652.conf files (sources are in alsa-lib/src/conf). The S/PDIF output 
>should work as 'plug:spdif' or  simply 'spdif' when no conversion is 
>necessary.

they look fine, to the extent that i actually understand them :)

--p

_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: bandwidth@sourceforge.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-09 13:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-09  1:19 asoundrc parse error (bug) Paul Davis
2002-05-09  7:26 ` Jaroslav Kysela
2002-05-09 13:05   ` Paul Davis

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.