All of lore.kernel.org
 help / color / mirror / Atom feed
* how to debug?
@ 1999-08-23 13:33 Wang Yong
  0 siblings, 0 replies; 21+ messages in thread
From: Wang Yong @ 1999-08-23 13:33 UTC (permalink / raw)
  To: linuxppc mail list


Hi all:
  We are now working on a new version linux for PPC401GF embedded
controller. The problem is how to debug it? We have the evaluation board of
PPC401GF from IBM with a machine code level debuger, ROMMonitor. it's so
hard to use. I am considerring if I can debug the kernel on some kind of PC,
such as Apple Mac which uses PPC604 or PPC603 as cpu. Does anyone has
experience on it. How about share it? Thank you.

Regards,
Wang


[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]

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

* How to debug ?
@ 2003-04-01 22:48 Giuliano Pochini
  0 siblings, 0 replies; 21+ messages in thread
From: Giuliano Pochini @ 2003-04-01 22:48 UTC (permalink / raw)
  To: alsa-devel


My driver do not work anymore with xmms (alsa-xmms plugin) and
alsaplayer. I have no idea when that happened because I always use
alsa-utils to make tests and I made a lot of changes since the last time
I tested xmms and ap. Alsaplayer writes this:

[Giu@Jay Giu]$ alsaplayer 
ALSA lib pcm_mmap.c:351:(snd_pcm_mmap) mmap failed: Invalid argument
Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_BE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 44100
PERIOD_TIME: (23219 23220)
PERIOD_SIZE: 1024
PERIOD_BYTES: 4096
PERIODS: 8
BUFFER_TIME: (185759 185760)
BUFFER_SIZE: 8192
BUFFER_BYTES: 32768
TICK_TIME: 10000

But the ll driver writelogs:

pcm_hw_params (bufsize=32768B periods=16 persize=2048B)
pcm_hw_params ok
Prepare rate=44100 format=2 channels=2
Prepare ok
(Format 2 is S16_LE).

Xmms says "sample format not available:invalid argument". My driver do
not report any failure, so the error comes from the middle layer or from
alsa-lib. How can I debug it ? I'm using 0.9.2 release.


Bye.




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
@ 2003-04-02  0:17 Giuliano Pochini
  2003-04-02 10:03 ` Takashi Iwai
  0 siblings, 1 reply; 21+ messages in thread
From: Giuliano Pochini @ 2003-04-02  0:17 UTC (permalink / raw)
  To: alsa-devel


> My driver do not work anymore with xmms (alsa-xmms plugin) and
> alsaplayer. [...]

I tried to force the alsaplayer plugin to set S16_LE format (data is BE
on powerpc) and it do not spit that errors anymore, but it do not play
anything and in the logs alsa prints:

ALSA ../alsa-kernel/core/pcm_lib.c:2219: BUG? (substream->ops->copy !=
((void *)0) || runtime->dma_area != ((void *)0)) (called from d2040794)
last message repeated 11886 times

I don't set .copy callback and ->dma_area should be 0 because the card
uses a sg-list. #:(

Bye.




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02  0:17 How to debug ? Giuliano Pochini
@ 2003-04-02 10:03 ` Takashi Iwai
  2003-04-02 10:33   ` Giuliano Pochini
  0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2003-04-02 10:03 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel

At 02 Apr 2003 00:17:49 +0000,
Giuliano Pochini wrote:
> 
> 
> > My driver do not work anymore with xmms (alsa-xmms plugin) and
> > alsaplayer. [...]
> 
> I tried to force the alsaplayer plugin to set S16_LE format (data is BE
> on powerpc) and it do not spit that errors anymore, but it do not play
> anything and in the logs alsa prints:
> 
> ALSA ../alsa-kernel/core/pcm_lib.c:2219: BUG? (substream->ops->copy !=
> ((void *)0) || runtime->dma_area != ((void *)0)) (called from d2040794)
> last message repeated 11886 times
> 
> I don't set .copy callback and ->dma_area should be 0 because the card
> uses a sg-list. #:(

no, dma_area should not be zero.  you shouldn't change the value, if
you use snd_pcm_lib_malloc_pages().  in the case of sg-buffer,
dma_area will hold the virtual mapped address, too.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02 10:03 ` Takashi Iwai
@ 2003-04-02 10:33   ` Giuliano Pochini
  2003-04-02 10:40     ` Takashi Iwai
  0 siblings, 1 reply; 21+ messages in thread
From: Giuliano Pochini @ 2003-04-02 10:33 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel


On 02-Apr-2003 Takashi Iwai wrote:
>> I don't set .copy callback and ->dma_area should be 0 because the card
>> uses a sg-list. #:(
>
> no, dma_area should not be zero.  you shouldn't change the value, if
> you use snd_pcm_lib_malloc_pages().  in the case of sg-buffer,
> dma_area will hold the virtual mapped address, too.

I write in the runtime struct only the private area and hw pointers.

Bye.



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02 10:33   ` Giuliano Pochini
@ 2003-04-02 10:40     ` Takashi Iwai
  2003-04-02 10:55       ` Giuliano Pochini
  0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2003-04-02 10:40 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel

At Wed, 02 Apr 2003 12:33:18 +0200 (CEST),
Giuliano Pochini wrote:
> 
> 
> On 02-Apr-2003 Takashi Iwai wrote:
> >> I don't set .copy callback and ->dma_area should be 0 because the card
> >> uses a sg-list. #:(
> >
> > no, dma_area should not be zero.  you shouldn't change the value, if
> > you use snd_pcm_lib_malloc_pages().  in the case of sg-buffer,
> > dma_area will hold the virtual mapped address, too.
> 
> I write in the runtime struct only the private area and hw pointers.

sorry, which fields do you mean exactly?
runtime->private_data and runtime->hw ?
then they are ok, of course.

anyway, runtime->dma_area and runtime->dma_bytes MUST be filled
manually IFF you don't use snd_pcm_lib_malloc_pages().
(dma_area won't be needed if the mmap is not supported and copy
 callback is defined, though.)


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02 10:40     ` Takashi Iwai
@ 2003-04-02 10:55       ` Giuliano Pochini
  2003-04-02 15:04         ` Takashi Iwai
  0 siblings, 1 reply; 21+ messages in thread
From: Giuliano Pochini @ 2003-04-02 10:55 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel


On 02-Apr-2003 Takashi Iwai wrote:
> sorry, which fields do you mean exactly?
> runtime->private_data and runtime->hw ?

Yes.

> anyway, runtime->dma_area and runtime->dma_bytes MUST be filled
> manually IFF you don't use snd_pcm_lib_malloc_pages().
> (dma_area won't be needed if the mmap is not supported and copy
> callback is defined, though.)

I use snd_pcm_lib_malloc_pages(), dma is supported and no copy
callback is defined.


Bye.



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02 10:55       ` Giuliano Pochini
@ 2003-04-02 15:04         ` Takashi Iwai
  2003-04-02 15:18           ` Giuliano Pochini
  0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2003-04-02 15:04 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel

At Wed, 02 Apr 2003 12:55:04 +0200 (CEST),
Giuliano Pochini wrote:
> 
> 
> On 02-Apr-2003 Takashi Iwai wrote:
> > sorry, which fields do you mean exactly?
> > runtime->private_data and runtime->hw ?
> 
> Yes.
> 
> > anyway, runtime->dma_area and runtime->dma_bytes MUST be filled
> > manually IFF you don't use snd_pcm_lib_malloc_pages().
> > (dma_area won't be needed if the mmap is not supported and copy
> > callback is defined, though.)
> 
> I use snd_pcm_lib_malloc_pages(), dma is supported and no copy
> callback is defined.

did you call snd_pcm_lib_preallocate_xxx functions after snd_pcm_new()
?


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02 15:04         ` Takashi Iwai
@ 2003-04-02 15:18           ` Giuliano Pochini
  2003-04-02 16:05             ` Takashi Iwai
  0 siblings, 1 reply; 21+ messages in thread
From: Giuliano Pochini @ 2003-04-02 15:18 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel


On 02-Apr-2003 Takashi Iwai wrote:
>> > anyway, runtime->dma_area and runtime->dma_bytes MUST be filled
>> > manually IFF you don't use snd_pcm_lib_malloc_pages().
>> > (dma_area won't be needed if the mmap is not supported and copy
>> > callback is defined, though.)
>>
>> I use snd_pcm_lib_malloc_pages(), dma is supported and no copy
>> callback is defined.
>
> did you call snd_pcm_lib_preallocate_xxx functions after snd_pcm_new()
> ?

Yes, otherwise snd_pcm_lib_malloc_pages() fails and hw_params callback
exits with an error.


Bye.



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02 15:18           ` Giuliano Pochini
@ 2003-04-02 16:05             ` Takashi Iwai
  2003-04-03 15:14               ` Giuliano Pochini
  0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2003-04-02 16:05 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel

At Wed, 02 Apr 2003 17:18:13 +0200 (CEST),
Giuliano Pochini wrote:
> 
> 
> On 02-Apr-2003 Takashi Iwai wrote:
> >> > anyway, runtime->dma_area and runtime->dma_bytes MUST be filled
> >> > manually IFF you don't use snd_pcm_lib_malloc_pages().
> >> > (dma_area won't be needed if the mmap is not supported and copy
> >> > callback is defined, though.)
> >>
> >> I use snd_pcm_lib_malloc_pages(), dma is supported and no copy
> >> callback is defined.
> >
> > did you call snd_pcm_lib_preallocate_xxx functions after snd_pcm_new()
> > ?
> 
> Yes, otherwise snd_pcm_lib_malloc_pages() fails and hw_params callback
> exits with an error.

ok, then something overwrites the entry.
how about to check runtime->dma_area at each callback?


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* Re: How to debug ?
  2003-04-02 16:05             ` Takashi Iwai
@ 2003-04-03 15:14               ` Giuliano Pochini
  0 siblings, 0 replies; 21+ messages in thread
From: Giuliano Pochini @ 2003-04-03 15:14 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel


On 02-Apr-2003 Takashi Iwai wrote:
>> Yes, otherwise snd_pcm_lib_malloc_pages() fails and hw_params
>> callback exits with an error.
>
> ok, then something overwrites the entry.
> how about to check runtime->dma_area at each callback?

Bug found. Alsaplayer calls hw_params two times with different
buffer setup (and same audio parameters). I wasn't aware it's
legal to do that and I didn't rebuild the sg buffer the second
time.  Now I clean up an redo everything every time.

Ok, now AP works, but xmms still hangs. It calls pcm_open callback
and dies. I'll work on it tonight...

Bye.



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

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

* How to debug?
@ 2007-01-30 21:51 Ronny Standtke
  2007-02-02 18:14 ` Takashi Iwai
  0 siblings, 1 reply; 21+ messages in thread
From: Ronny Standtke @ 2007-01-30 21:51 UTC (permalink / raw)
  To: alsa-devel

Hi all,

I am desperately trying to use a webcam and a headset with my Linux-Desktop 
(KDE). You can read the whole thread here: 
http://lists.kde.org/?l=kde-linux&m=116749763322140&w=2
At the end someone from the KDE camp suggested that I come over here...

So I asked for help at the alsa-user mailing list:
http://www.mail-archive.com/alsa-user%40lists.sourceforge.net/msg18711.html
At the end nobody could tell me how to get more debugging info.

So please, how do I get more debugging info when reloading alsa? Or even 
better, does anybody know why my on-board soundcard disappears when I use the 
index options?

Greetings & Thank you

Ronny Standtke

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: How to debug?
  2007-01-30 21:51 Ronny Standtke
@ 2007-02-02 18:14 ` Takashi Iwai
  2007-02-02 20:44   ` Ronny Standtke
  0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2007-02-02 18:14 UTC (permalink / raw)
  To: Ronny Standtke; +Cc: alsa-devel

At Tue, 30 Jan 2007 22:51:28 +0100,
Ronny Standtke wrote:
> 
> Hi all,
> 
> I am desperately trying to use a webcam and a headset with my Linux-Desktop 
> (KDE). You can read the whole thread here: 
> http://lists.kde.org/?l=kde-linux&m=116749763322140&w=2
> At the end someone from the KDE camp suggested that I come over here...

Would have been better to put the questions here instead of URL to
save the time of readers :)  Anyway...

> 
> So I asked for help at the alsa-user mailing list:
> http://www.mail-archive.com/alsa-user%40lists.sourceforge.net/msg18711.html
> At the end nobody could tell me how to get more debugging info.
> 
> So please, how do I get more debugging info when reloading alsa? Or even 
> better, does anybody know why my on-board soundcard disappears when I use the 
> index options?

It's because your system loads the modules in a parallel manner.
How did you set index options?  Setting index=0 to snd-intel8x0, and
index=-2 to snd-usb-audio would work.  -2 means the next free slot
except from the first slot (bit 0).

If this doesn't work, too, check whether the index options are really
passed correctly.  You can see the values in
/sys/modules/snd*/parameters/index files.


Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

* Re: How to debug?
  2007-02-02 18:14 ` Takashi Iwai
@ 2007-02-02 20:44   ` Ronny Standtke
  2007-02-05 15:43     ` Takashi Iwai
  0 siblings, 1 reply; 21+ messages in thread
From: Ronny Standtke @ 2007-02-02 20:44 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hi Takashi,

Thank you very much for your reply.

> How did you set index options?

Here is what I did just now:

I removed all customizations from /etc/modprobe.d/alsa-base and reloaded alsa. 
Then all my soundcards are visible:

-----------
dhcppc0:~# cat /proc/asound/cards
 0 [I82801DBICH4   ]: ICH4 - Intel 82801DB-ICH4
                      Intel 82801DB-ICH4 with AD1980 at 0xeb000000, irq 217
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
full speed
 2 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
                      USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
-1
dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
-1,-1,-1,-1,-1,-1,-1,-1
-----------

The many "-1" indices for the snd_usb_audio module look strange. Is this 
normal?

Then I appended the following lines at the end of /etc/modprobe.d/alsa-base:
-----------
alias snd-card-0 snd-intel8x0
options snd-intel8x0 index=0
alias snd-card-1 snd-usb-audio
options snd-usb-audio index=-2
alias snd-card-2 snd-usb-audio
options snd-usb-audio index=-2
options snd cards_limit=3
-----------

Then I looked at the visible soundcards and the passed index options. 
Unfortunately the on-board soundcard is gone again!

-----------
dhcppc0:~# /etc/init.d/alsa reload
Unloading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
Loading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
dhcppc0:~# cat /proc/asound/cards
 0 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
                      USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
 1 [Headset        ]: USB-Audio - Logitech USB Headset
                      Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
full speed
dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
0
dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
-2,-1,-1,-1,-1,-1,-1,-1
-----------

So what can I do next? I would really like to help fixing this issue.

Greetings and Thank you again!

Ronny

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

* Re: How to debug?
  2007-02-02 20:44   ` Ronny Standtke
@ 2007-02-05 15:43     ` Takashi Iwai
  2007-02-06 22:14       ` Ronny Standtke
  0 siblings, 1 reply; 21+ messages in thread
From: Takashi Iwai @ 2007-02-05 15:43 UTC (permalink / raw)
  To: Ronny Standtke; +Cc: alsa-devel

At Fri, 2 Feb 2007 21:44:47 +0100,
Ronny Standtke wrote:
> 
> Hi Takashi,
> 
> Thank you very much for your reply.
> 
> > How did you set index options?
> 
> Here is what I did just now:
> 
> I removed all customizations from /etc/modprobe.d/alsa-base and reloaded alsa. 
> Then all my soundcards are visible:
> 
> -----------
> dhcppc0:~# cat /proc/asound/cards
>  0 [I82801DBICH4   ]: ICH4 - Intel 82801DB-ICH4
>                       Intel 82801DB-ICH4 with AD1980 at 0xeb000000, irq 217
>  1 [Headset        ]: USB-Audio - Logitech USB Headset
>                       Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
> full speed
>  2 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
>                       USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
> dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
> -1
> dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
> -1,-1,-1,-1,-1,-1,-1,-1
> -----------
> 
> The many "-1" indices for the snd_usb_audio module look strange. Is this 
> normal?

No, the first one should be -2, as you can see below.
I checked my system (with openSUSE 10.3-alpha) and it works fine.  The
module parameter gets the value in /etc/modprobe.d/sound file.
So, apparently your system loads the module somehow uniquely without
referring the modprobe config files.

> 
> Then I appended the following lines at the end of /etc/modprobe.d/alsa-base:
> -----------
> alias snd-card-0 snd-intel8x0
> options snd-intel8x0 index=0
> alias snd-card-1 snd-usb-audio
> options snd-usb-audio index=-2
> alias snd-card-2 snd-usb-audio
> options snd-usb-audio index=-2
> options snd cards_limit=3
> -----------
> 
> Then I looked at the visible soundcards and the passed index options. 
> Unfortunately the on-board soundcard is gone again!
> 
> -----------
> dhcppc0:~# /etc/init.d/alsa reload
> Unloading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
> snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
> snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
> Loading ALSA sound driver modules: snd-usb-audio snd-usb-lib snd-rawmidi 
> snd-seq-device snd-hwdep snd-intel8x0 snd-ac97-codec snd-ac97-bus snd-pcm-oss 
> snd-mixer-oss snd-pcm snd-timer snd-page-alloc.
> dhcppc0:~# cat /proc/asound/cards
>  0 [U0x46d0x8ce    ]: USB-Audio - USB Device 0x46d:0x8ce
>                       USB Device 0x46d:0x8ce at usb-0000:00:1d.7-4, high speed
>  1 [Headset        ]: USB-Audio - Logitech USB Headset
>                       Logitech Logitech USB Headset at usb-0000:00:1d.0-2, 
> full speed
> dhcppc0:~# cat /sys/module/snd_intel8x0/parameters/index
> 0
> dhcppc0:~# cat /sys/module/snd_usb_audio/parameters/index
> -2,-1,-1,-1,-1,-1,-1,-1
> -----------

If you have two usb devices, pass index=-2,-2.  Otherwise the
secondary usb device will occupy the first slot.


Takashi

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

* Re: How to debug?
  2007-02-05 15:43     ` Takashi Iwai
@ 2007-02-06 22:14       ` Ronny Standtke
  0 siblings, 0 replies; 21+ messages in thread
From: Ronny Standtke @ 2007-02-06 22:14 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hi Takashi,

Thank you again very much for your help. The last hint was crucial.

So all I actually had to do to solve my problem was to add the following two 
lines to /etc/modprobe.d/alsa-base:
--------------
options snd-intel8x0 index=0
options snd-usb-audio index=-2,-2
--------------

It just took me two months to find out... I still think that it is the job of 
the desktop environment to search the configured soundcard at startup instead 
of letting poor users change system configuration files as root to hardcode 
the soundcard order. Maybe one day Linux can do this as user-friendly as the 
competition already does for several years now.

Greetings and thank you again

Ronny

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

* How to debug?
  2012-01-27 22:51 How to debug? Jalil Karimov <jukarimov@gmail.com>
@ 2012-01-27 19:05 ` Mulyadi Santosa
  2012-01-28  1:06   ` Jalil Karimov <jukarimov@gmail.com>
  2012-01-30 18:41 ` Littlefield, Tyler
  1 sibling, 1 reply; 21+ messages in thread
From: Mulyadi Santosa @ 2012-01-27 19:05 UTC (permalink / raw)
  To: kernelnewbies

Hi :)

On Sat, Jan 28, 2012 at 05:51, Jalil Karimov <jukarimov@gmail.com>
<jukarimov@gmail.com> wrote:
>
> As I learn C, I decided to write a small dictionary program,
> for my linux box.
> Unfortunatly, I'm unable to proceed because of that weird bug which
> I can't debug (no source of crash). Any help is appreciated.

Are you aware your question is not kernel related? :) but anyway...

> munmap(0xb7860000, 4096) ? ? ? ? ? ? ? ?= 0
> write(4, "\320\275\320\276-\320\266\321\221\320\273\321\202\321\213\320\271 at 11618255\n\321\217\320\270\321"..., 3875) = 3875
> close(4) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?= 0
> munmap(0xb785f000, 4096) ? ? ? ? ? ? ? ?= 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++

looks like the bug triggered by releasing certain portion of
heap....sounds like double free()?

could you recompile your application using -g (a gcc parameter) and
then run it again under gdb? hopefully you get better stack strace
along with complete symbol names...


> ==11809== Jump to the invalid address stated on the next line
> ==11809== ? ?at 0x80D15D70: ???
> ==11809== ?Address 0x80d15d70 is not stack'd, malloc'd or (recently) free'd
> ==11809==
> ==11809==
> ==11809== Process terminating with default action of signal 11 (SIGSEGV)
> ==11809== ?Access not within mapped region at address 0x80D15D70

or.... you access something that haven't been initialized or
malloc()-ed properly. Now I leave it to you to re-audit your source
code :)

hope it helps..


-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* How to debug?
@ 2012-01-27 22:51 Jalil Karimov <jukarimov@gmail.com>
  2012-01-27 19:05 ` Mulyadi Santosa
  2012-01-30 18:41 ` Littlefield, Tyler
  0 siblings, 2 replies; 21+ messages in thread
From: Jalil Karimov <jukarimov@gmail.com> @ 2012-01-27 22:51 UTC (permalink / raw)
  To: kernelnewbies


As I learn C, I decided to write a small dictionary program,
for my linux box.
Unfortunatly, I'm unable to proceed because of that weird bug which
I can't debug (no source of crash). Any help is appreciated.

strace:
read(3, "\270) file box\n 3) \321\200\320\260\320\267\320\263. \320\277\321\200\320\265"..., 4096) = 4096
read(3, "mixture of vodka and beer\n", 4096) = 26
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb7860000, 4096)                = 0
write(4, "\320\275\320\276-\320\266\321\221\320\273\321\202\321\213\320\271 at 11618255\n\321\217\320\270\321"..., 3875) = 3875
close(4)                                = 0
munmap(0xb785f000, 4096)                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

gdb:
Program received signal SIGSEGV, Segmentation fault.
0x80d15d70 in ?? ()

valgrind:
==11809== Memcheck, a memory error detector
==11809== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==11809== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==11809== Command: ./dic -u
==11809== Parent PID: 1662
==11809== 
==11809== Jump to the invalid address stated on the next line
==11809==    at 0x80D15D70: ???
==11809==  Address 0x80d15d70 is not stack'd, malloc'd or (recently) free'd
==11809== 
==11809== 
==11809== Process terminating with default action of signal 11 (SIGSEGV)
==11809==  Access not within mapped region at address 0x80D15D70
==11809==    at 0x80D15D70: ???
==11809==  If you believe this happened as a result of a stack
==11809==  overflow in your program's main thread (unlikely but
==11809==  possible), you can try to increase the size of the
==11809==  main thread stack using the --main-stacksize= flag.
==11809==  The main thread stack size used in this run was 8388608.
==11809== 
==11809== HEAP SUMMARY:
==11809==     in use at exit: 70 bytes in 2 blocks
==11809==   total heap usage: 426,629 allocs, 426,627 frees, 224,953,822 bytes allocated
==11809== 
==11809== LEAK SUMMARY:
==11809==    definitely lost: 70 bytes in 2 blocks
==11809==    indirectly lost: 0 bytes in 0 blocks
==11809==      possibly lost: 0 bytes in 0 blocks
==11809==    still reachable: 0 bytes in 0 blocks
==11809==         suppressed: 0 bytes in 0 blocks
==11809== Rerun with --leak-check=full to see details of leaked memory
==11809== 
==11809== For counts of detected and suppressed errors, rerun with: -v
==11809== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 20 from 7)

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

* How to debug?
  2012-01-27 19:05 ` Mulyadi Santosa
@ 2012-01-28  1:06   ` Jalil Karimov <jukarimov@gmail.com>
  2012-01-28  4:39     ` Mulyadi Santosa
  0 siblings, 1 reply; 21+ messages in thread
From: Jalil Karimov <jukarimov@gmail.com> @ 2012-01-28  1:06 UTC (permalink / raw)
  To: kernelnewbies


Oops, sorry for spam, I found it, there was char[80]
But in dictionary there's a string longer than that, fixed now :D

Cheers,
 	Jalil

On Sat, 28 Jan 2012, Mulyadi Santosa wrote:

> Hi :)
>
> On Sat, Jan 28, 2012 at 05:51, Jalil Karimov <jukarimov@gmail.com>
> <jukarimov@gmail.com> wrote:
>>
>> As I learn C, I decided to write a small dictionary program,
>> for my linux box.
>> Unfortunatly, I'm unable to proceed because of that weird bug which
>> I can't debug (no source of crash). Any help is appreciated.
>
> Are you aware your question is not kernel related? :) but anyway...
>
>> munmap(0xb7860000, 4096) ? ? ? ? ? ? ? ?= 0
>> write(4, "\320\275\320\276-\320\266\321\221\320\273\321\202\321\213\320\271 at 11618255\n\321\217\320\270\321"..., 3875) = 3875
>> close(4) ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?= 0
>> munmap(0xb785f000, 4096) ? ? ? ? ? ? ? ?= 0
>> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>> +++ killed by SIGSEGV +++
>
> looks like the bug triggered by releasing certain portion of
> heap....sounds like double free()?
>
> could you recompile your application using -g (a gcc parameter) and
> then run it again under gdb? hopefully you get better stack strace
> along with complete symbol names...
>
>
>> ==11809== Jump to the invalid address stated on the next line
>> ==11809== ? ?at 0x80D15D70: ???
>> ==11809== ?Address 0x80d15d70 is not stack'd, malloc'd or (recently) free'd
>> ==11809==
>> ==11809==
>> ==11809== Process terminating with default action of signal 11 (SIGSEGV)
>> ==11809== ?Access not within mapped region at address 0x80D15D70
>
> or.... you access something that haven't been initialized or
> malloc()-ed properly. Now I leave it to you to re-audit your source
> code :)
>
> hope it helps..
>
>
> -- 
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>

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

* How to debug?
  2012-01-28  1:06   ` Jalil Karimov <jukarimov@gmail.com>
@ 2012-01-28  4:39     ` Mulyadi Santosa
  0 siblings, 0 replies; 21+ messages in thread
From: Mulyadi Santosa @ 2012-01-28  4:39 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Jan 28, 2012 at 08:06, Jalil Karimov <jukarimov@gmail.com>
<jukarimov@gmail.com> wrote:
>
> Oops, sorry for spam, I found it, there was char[80]
> But in dictionary there's a string longer than that, fixed now :D

no problem :) classic bug :)

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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

* How to debug?
  2012-01-27 22:51 How to debug? Jalil Karimov <jukarimov@gmail.com>
  2012-01-27 19:05 ` Mulyadi Santosa
@ 2012-01-30 18:41 ` Littlefield, Tyler
  1 sibling, 0 replies; 21+ messages in thread
From: Littlefield, Tyler @ 2012-01-30 18:41 UTC (permalink / raw)
  To: kernelnewbies

On 1/27/2012 3:51 PM, Jalil Karimov <jukarimov@gmail.com> wrote:
> As I learn C, I decided to write a small dictionary program,
> for my linux box.
> Unfortunatly, I'm unable to proceed because of that weird bug which
> I can't debug (no source of crash). Any help is appreciated.
>
this would be better suited for another list...

> strace:

Strace for debugging? It has it's uses, but you need to use a -debugger- 
to debug.

> read(3, "\270) file box\n 3) \321\200\320\260\320\267\320\263. \320\277\321\200\320\265"..., 4096) = 4096
> read(3, "mixture of vodka and beer\n", 4096) = 26
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> munmap(0xb7860000, 4096)                = 0
> write(4, "\320\275\320\276-\320\266\321\221\320\273\321\202\321\213\320\271 at 11618255\n\321\217\320\270\321"..., 3875) = 3875
> close(4)                                = 0
> munmap(0xb785f000, 4096)                = 0
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
>
> gdb:
> Program received signal SIGSEGV, Segmentation fault.
> 0x80d15d70 in ?? ()
>
I recommend you compile with debugging symbols. gcc/g++ -GGdb or just -G.

> valgrind:
> ==11809== Memcheck, a memory error detector
> ==11809== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
> ==11809== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
> ==11809== Command: ./dic -u
> ==11809== Parent PID: 1662
> ==11809==
> ==11809== Jump to the invalid address stated on the next line
> ==11809==    at 0x80D15D70: ???
> ==11809==  Address 0x80d15d70 is not stack'd, malloc'd or (recently) free'd
> ==11809==
> ==11809==
> ==11809== Process terminating with default action of signal 11 (SIGSEGV)
> ==11809==  Access not within mapped region at address 0x80D15D70
> ==11809==    at 0x80D15D70: ???
> ==11809==  If you believe this happened as a result of a stack
> ==11809==  overflow in your program's main thread (unlikely but
> ==11809==  possible), you can try to increase the size of the
> ==11809==  main thread stack using the --main-stacksize= flag.
> ==11809==  The main thread stack size used in this run was 8388608.
> ==11809==
> ==11809== HEAP SUMMARY:
> ==11809==     in use at exit: 70 bytes in 2 blocks
> ==11809==   total heap usage: 426,629 allocs, 426,627 frees, 224,953,822 bytes allocated
> ==11809==
> ==11809== LEAK SUMMARY:
> ==11809==    definitely lost: 70 bytes in 2 blocks
> ==11809==    indirectly lost: 0 bytes in 0 blocks
> ==11809==      possibly lost: 0 bytes in 0 blocks
> ==11809==    still reachable: 0 bytes in 0 blocks
> ==11809==         suppressed: 0 bytes in 0 blocks
> ==11809== Rerun with --leak-check=full to see details of leaked memory
> ==11809==
> ==11809== For counts of detected and suppressed errors, rerun with: -v
> ==11809== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 20 from 7)
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


-- 

Take care,
Ty
Web: http://tds-solutions.net
The Aspen project: a light-weight barebones mud engine
http://code.google.com/p/aspenmud

Sent from my toaster.

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

end of thread, other threads:[~2012-01-30 18:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-01 22:48 How to debug ? Giuliano Pochini
  -- strict thread matches above, loose matches on Subject: below --
2012-01-27 22:51 How to debug? Jalil Karimov <jukarimov@gmail.com>
2012-01-27 19:05 ` Mulyadi Santosa
2012-01-28  1:06   ` Jalil Karimov <jukarimov@gmail.com>
2012-01-28  4:39     ` Mulyadi Santosa
2012-01-30 18:41 ` Littlefield, Tyler
2007-01-30 21:51 Ronny Standtke
2007-02-02 18:14 ` Takashi Iwai
2007-02-02 20:44   ` Ronny Standtke
2007-02-05 15:43     ` Takashi Iwai
2007-02-06 22:14       ` Ronny Standtke
2003-04-02  0:17 How to debug ? Giuliano Pochini
2003-04-02 10:03 ` Takashi Iwai
2003-04-02 10:33   ` Giuliano Pochini
2003-04-02 10:40     ` Takashi Iwai
2003-04-02 10:55       ` Giuliano Pochini
2003-04-02 15:04         ` Takashi Iwai
2003-04-02 15:18           ` Giuliano Pochini
2003-04-02 16:05             ` Takashi Iwai
2003-04-03 15:14               ` Giuliano Pochini
1999-08-23 13:33 how to debug? Wang Yong

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.