linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sound/ppc/pmac.c typo.
@ 2006-01-20 10:35 Stelian Pop
  2006-01-20 14:51 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Stelian Pop @ 2006-01-20 10:35 UTC (permalink / raw)
  To: linuxppc-dev

In 2.6.16-rc1 there is a small typo introduced by the 'Remove device_node addrs/n_addr' changes
which prevents my Powerbook G4 sound from working:

	Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20 2006 UTC).
	snd: can't request rsrc  0 (Sound Control: 0x80000000:80004fff)
	ALSA device list:
	   No soundcards found.

The patch below fixes it. Of course, the patch fixing the i2c issues 
('i2c_smbus_write_i2c_block_data' patch) needs to be applied to in order for
the sound to completly work.
 
Signed-off-by: Stelian Pop <stelian@popies.net>

diff -r ad1abd4058ea sound/ppc/pmac.c
--- a/sound/ppc/pmac.c	Fri Jan 20 11:02:26 2006 +0100
+++ b/sound/ppc/pmac.c	Fri Jan 20 11:13:55 2006 +0100
@@ -1217,7 +1217,7 @@
 			goto __error;
 		}
 		for (i = 0; i < 3; i ++) {
-			if (of_address_to_resource(np->parent, i,
+			if (of_address_to_resource(np, i,
 						   &chip->rsrc[i])) {
 				printk(KERN_ERR "snd: can't translate rsrc "
 				       " %d (%s)\n", i, rnames[i]);


-- 
Stelian Pop <stelian@popies.net>

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

* Re: [PATCH] sound/ppc/pmac.c typo.
  2006-01-20 10:35 [PATCH] sound/ppc/pmac.c typo Stelian Pop
@ 2006-01-20 14:51 ` Takashi Iwai
  2006-01-20 15:54   ` Stelian Pop
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2006-01-20 14:51 UTC (permalink / raw)
  To: Stelian Pop; +Cc: linuxppc-dev

At Fri, 20 Jan 2006 11:35:38 +0100,
Stelian Pop wrote:
> 
> In 2.6.16-rc1 there is a small typo introduced by the 'Remove device_node addrs/n_addr' changes
> which prevents my Powerbook G4 sound from working:
> 
> 	Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20 2006 UTC).
> 	snd: can't request rsrc  0 (Sound Control: 0x80000000:80004fff)
> 	ALSA device list:
> 	   No soundcards found.
> 
> The patch below fixes it. Of course, the patch fixing the i2c issues 
> ('i2c_smbus_write_i2c_block_data' patch) needs to be applied to in order for
> the sound to completly work.
>  
> Signed-off-by: Stelian Pop <stelian@popies.net>

Thanks, I applied it to ALSA tree now.


Takashi

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

* Re: [PATCH] sound/ppc/pmac.c typo.
  2006-01-20 14:51 ` Takashi Iwai
@ 2006-01-20 15:54   ` Stelian Pop
  2006-01-20 16:06     ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Stelian Pop @ 2006-01-20 15:54 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linuxppc-dev

Le vendredi 20 janvier 2006 à 15:51 +0100, Takashi Iwai a écrit :
> At Fri, 20 Jan 2006 11:35:38 +0100,
> Stelian Pop wrote:
> > 
> > In 2.6.16-rc1 there is a small typo introduced by the 'Remove device_node addrs/n_addr' changes
> > which prevents my Powerbook G4 sound from working:
> > 
> > 	Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20 2006 UTC).
> > 	snd: can't request rsrc  0 (Sound Control: 0x80000000:80004fff)
> > 	ALSA device list:
> > 	   No soundcards found.
> > 
> > The patch below fixes it. Of course, the patch fixing the i2c issues 
> > ('i2c_smbus_write_i2c_block_data' patch) needs to be applied to in order for
> > the sound to completly work.
> >  
> > Signed-off-by: Stelian Pop <stelian@popies.net>
> 
> Thanks, I applied it to ALSA tree now.

Thanks.

BTW, is it a hardware or a configuration issue the fact that I'm unable
to mix several alsa streams ?

For example, if I issue two instances of 'aplay foo.wav', the first one
plays the sound while the second one remains stuck in:
	stat64("/usr/share/alsa/alsa.conf", {st_mode=S_IFREG|0644, st_size=7467, ...}) = 0
	open("/dev/snd/controlC0", O_RDONLY)    = 3
	close(3)                                = 0
	open("/dev/snd/controlC0", O_RDWR)      = 3
	ioctl(3, USBDEVFS_CONTROL, 0x7fee2bf8)  = 0
	ioctl(3, UI_DEV_CREATE, 0x7fee2ca0)     = 0
	close(3)                                = 0
	open("/dev/snd/controlC0", O_RDONLY)    = 3
	close(3)                                = 0
	open("/dev/snd/controlC0", O_RDWR)      = 3
	ioctl(3, USBDEVFS_CONTROL, 0x7fee2fa8)  = 0
	ioctl(3, 0x80045532, 0x7fee2fd8)        = 0
	open("/dev/snd/pcmC0D0p", O_RDWR
until the first one ends playing. Only then the second one continues the
execution.

Just in case this is useful:
	# cat /proc/asound/version
	Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20 2006 UTC).
	# cat /proc/asound/cards
	 0 [Snapper        ]: PMac Snapper - PowerMac Snapper
	                      PowerMac Snapper (Dev 0) Sub-frame 0
	# cat /proc/asound/devices
	  0: [ 0]   : control
	  1:        : sequencer
	 16: [ 0- 0]: digital audio playback
	 24: [ 0- 0]: digital audio capture
	 33:        : timer
	# cat /proc/asound/pcm
	00-00: PMac Snapper : PowerMac Snapper : playback 1 : capture 1

Stelian.
-- 
Stelian Pop <stelian@popies.net>

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

* Re: [PATCH] sound/ppc/pmac.c typo.
  2006-01-20 15:54   ` Stelian Pop
@ 2006-01-20 16:06     ` Takashi Iwai
  2006-01-20 16:09       ` Stelian Pop
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2006-01-20 16:06 UTC (permalink / raw)
  To: Stelian Pop; +Cc: linuxppc-dev

At Fri, 20 Jan 2006 16:54:31 +0100,
Stelian Pop wrote:
> 
> Le vendredi 20 janvier 2006 à 15:51 +0100, Takashi Iwai a écrit :
> > At Fri, 20 Jan 2006 11:35:38 +0100,
> > Stelian Pop wrote:
> > > 
> > > In 2.6.16-rc1 there is a small typo introduced by the 'Remove device_node addrs/n_addr' changes
> > > which prevents my Powerbook G4 sound from working:
> > > 
> > > 	Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20 2006 UTC).
> > > 	snd: can't request rsrc  0 (Sound Control: 0x80000000:80004fff)
> > > 	ALSA device list:
> > > 	   No soundcards found.
> > > 
> > > The patch below fixes it. Of course, the patch fixing the i2c issues 
> > > ('i2c_smbus_write_i2c_block_data' patch) needs to be applied to in order for
> > > the sound to completly work.
> > >  
> > > Signed-off-by: Stelian Pop <stelian@popies.net>
> > 
> > Thanks, I applied it to ALSA tree now.
> 
> Thanks.
> 
> BTW, is it a hardware or a configuration issue the fact that I'm unable
> to mix several alsa streams ?

Did you install alsa-lib 1.0.11rc2, too?  It should work with dmix as
default.


Takashi

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

* Re: [PATCH] sound/ppc/pmac.c typo.
  2006-01-20 16:06     ` Takashi Iwai
@ 2006-01-20 16:09       ` Stelian Pop
  2006-01-20 16:25         ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Stelian Pop @ 2006-01-20 16:09 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linuxppc-dev

Le vendredi 20 janvier 2006 à 17:06 +0100, Takashi Iwai a écrit :
> At Fri, 20 Jan 2006 16:54:31 +0100,
> Stelian Pop wrote:
> > 
> > Le vendredi 20 janvier 2006 à 15:51 +0100, Takashi Iwai a écrit :
> > > At Fri, 20 Jan 2006 11:35:38 +0100,
> > > Stelian Pop wrote:
> > > > 
> > > > In 2.6.16-rc1 there is a small typo introduced by the 'Remove device_node addrs/n_addr' changes
> > > > which prevents my Powerbook G4 sound from working:
> > > > 
> > > > 	Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20 2006 UTC).
> > > > 	snd: can't request rsrc  0 (Sound Control: 0x80000000:80004fff)
> > > > 	ALSA device list:
> > > > 	   No soundcards found.
> > > > 
> > > > The patch below fixes it. Of course, the patch fixing the i2c issues 
> > > > ('i2c_smbus_write_i2c_block_data' patch) needs to be applied to in order for
> > > > the sound to completly work.
> > > >  
> > > > Signed-off-by: Stelian Pop <stelian@popies.net>
> > > 
> > > Thanks, I applied it to ALSA tree now.
> > 
> > Thanks.
> > 
> > BTW, is it a hardware or a configuration issue the fact that I'm unable
> > to mix several alsa streams ?
> 
> Did you install alsa-lib 1.0.11rc2, too?  It should work with dmix as
> default.

This is an ubuntu breezy ppc distribution, and it seems that the package
is called libasound2, and it is based on alsa-lib 1.0.9-2.

Stracing the aplay process shows that dmix.conf is being read:

	defiant:~ 20 > strace -eopen aplay wav/slow_20spindle_20motor.wav
	open("/etc/ld.so.cache", O_RDONLY)      = 3
	open("/usr/lib/libasound.so.2", O_RDONLY) = 3
	open("/lib/libm.so.6", O_RDONLY)        = 3
	open("/lib/libdl.so.2", O_RDONLY)       = 3
	open("/lib/libpthread.so.0", O_RDONLY)  = 3
	open("/lib/libc.so.6", O_RDONLY)        = 3
	open("/usr/share/alsa/alsa.conf", O_RDONLY) = 3
	open("/usr/share/alsa/cards/aliases.conf", O_RDONLY) = 3
	open("/usr/share/alsa/pcm/default.conf", O_RDONLY) = 4
	open("/usr/share/alsa/pcm/dmix.conf", O_RDONLY) = 4
	open("/usr/share/alsa/pcm/dsnoop.conf", O_RDONLY) = 4
	open("/dev/snd/controlC0", O_RDONLY)    = 3
	open("/dev/snd/controlC0", O_RDONLY)    = 3
	open("/dev/snd/controlC0", O_RDWR)      = 3
	open("/dev/snd/controlC1", O_RDONLY)    = -1 ENOENT (No such file or directory)
	open("/dev/aloadC1", O_RDONLY)          = -1 ENOENT (No such file or directory)
	[...]

I suppose I could test with 1.0.11rc2 if it does make sense to.

Stelian.
-- 
Stelian Pop <stelian@popies.net>

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

* Re: [PATCH] sound/ppc/pmac.c typo.
  2006-01-20 16:09       ` Stelian Pop
@ 2006-01-20 16:25         ` Takashi Iwai
  2006-01-20 16:37           ` Stelian Pop
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2006-01-20 16:25 UTC (permalink / raw)
  To: Stelian Pop; +Cc: linuxppc-dev

At Fri, 20 Jan 2006 17:09:26 +0100,
Stelian Pop wrote:
> 
> Le vendredi 20 janvier 2006 à 17:06 +0100, Takashi Iwai a écrit :
> > At Fri, 20 Jan 2006 16:54:31 +0100,
> > Stelian Pop wrote:
> > > 
> > > Le vendredi 20 janvier 2006 à 15:51 +0100, Takashi Iwai a écrit :
> > > > At Fri, 20 Jan 2006 11:35:38 +0100,
> > > > Stelian Pop wrote:
> > > > > 
> > > > > In 2.6.16-rc1 there is a small typo introduced by the 'Remove device_node addrs/n_addr' changes
> > > > > which prevents my Powerbook G4 sound from working:
> > > > > 
> > > > > 	Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20 2006 UTC).
> > > > > 	snd: can't request rsrc  0 (Sound Control: 0x80000000:80004fff)
> > > > > 	ALSA device list:
> > > > > 	   No soundcards found.
> > > > > 
> > > > > The patch below fixes it. Of course, the patch fixing the i2c issues 
> > > > > ('i2c_smbus_write_i2c_block_data' patch) needs to be applied to in order for
> > > > > the sound to completly work.
> > > > >  
> > > > > Signed-off-by: Stelian Pop <stelian@popies.net>
> > > > 
> > > > Thanks, I applied it to ALSA tree now.
> > > 
> > > Thanks.
> > > 
> > > BTW, is it a hardware or a configuration issue the fact that I'm unable
> > > to mix several alsa streams ?
> > 
> > Did you install alsa-lib 1.0.11rc2, too?  It should work with dmix as
> > default.
> 
> This is an ubuntu breezy ppc distribution, and it seems that the package
> is called libasound2, and it is based on alsa-lib 1.0.9-2.

1.0.9 doesn't use dmix as default.


Takashi

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

* Re: [PATCH] sound/ppc/pmac.c typo.
  2006-01-20 16:25         ` Takashi Iwai
@ 2006-01-20 16:37           ` Stelian Pop
  0 siblings, 0 replies; 7+ messages in thread
From: Stelian Pop @ 2006-01-20 16:37 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linuxppc-dev

Le vendredi 20 janvier 2006 à 17:25 +0100, Takashi Iwai a écrit :

> > > > BTW, is it a hardware or a configuration issue the fact that I'm unable
> > > > to mix several alsa streams ?
> > > 
> > > Did you install alsa-lib 1.0.11rc2, too?  It should work with dmix as
> > > default.
> > 
> > This is an ubuntu breezy ppc distribution, and it seems that the package
> > is called libasound2, and it is based on alsa-lib 1.0.9-2.
> 
> 1.0.9 doesn't use dmix as default.

Ok, using 1.0.11rc2 works with dmix indeed.

Aplay works correctly. So does xine.

However mplayer seems to have problems with this version of the library:

[...]
Building audio filter chain for 22050Hz/1ch/u8 -> 0Hz/0ch/s8...
alsa-init: 1 soundcard found, using: default
alsa: 22050 Hz/1 channels/1 bpf/8192 bytes buffer/Unsigned 8 bit
AO: [alsa] 22050Hz 1ch u8 (1 bps)
Building audio filter chain for 22050Hz/1ch/u8 -> 22050Hz/1ch/u8...
Video: no video
Starting playback...
alsa-space: xrun of at least 0.006 msecs. resetting stream
alsa-space: xrun of at least 0.006 msecs. resetting stream
alsa-space: xrun of at least 0.006 msecs. resetting stream
alsa-space: xrun of at least 0.005 msecs. resetting stream
alsa-space: xrun of at least 0.009 msecs. resetting stream
alsa-space: xrun of at least 0.006 msecs. resetting stream
alsa-space: xrun of at least 0.004 msecs. resetting stream
alsa-space: xrun of at least 0.005 msecs. resetting stream
alsa-space: xrun of at least 0.005 msecs. resetting stream

But it could be mplayer's fault at this point.

Stelian.
-- 
Stelian Pop <stelian@popies.net>

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

end of thread, other threads:[~2006-01-20 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-20 10:35 [PATCH] sound/ppc/pmac.c typo Stelian Pop
2006-01-20 14:51 ` Takashi Iwai
2006-01-20 15:54   ` Stelian Pop
2006-01-20 16:06     ` Takashi Iwai
2006-01-20 16:09       ` Stelian Pop
2006-01-20 16:25         ` Takashi Iwai
2006-01-20 16:37           ` Stelian Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).