Re: [Alsa-devel] An driver error when I using aplay!

2004-06-07 Thread Takashi Iwai
At Mon, 7 Jun 2004 12:43:01 +0200 (CEST),
Jaroslav wrote:
 
 On Mon, 7 Jun 2004, Russell King wrote:
 
  Actually, I disagree.  It's an ALSA bug.  The warning is created if
  the AACI close method is called while the DMA or IO is still running.
  If DMA is still running here, we've already freed the DMA buffer, so
  we're either reading from or writing to memory we don't own - which is
  a major bug.
  
  The question is therefore: why is ALSA trying to shut down and free a
  device which still has DMA running?  To be more explicit, why didn't
  ALSA call the trigger callback with SNDRV_PCM_TRIGGER_STOP prior to
  calling the hw_free or close methods?
 
 The midlevel calls *drop() (which must stop the running stream) and then
 -hw_free and -close callbacks. I've never seen this error, so I suspect
 that something else is wrong.

i guess so, too.  as you can see in the original post, the error
returned from hw_params callback (sample not available), thus it
doesn't call trigger(START) callback yet at all.

unfurtunately i can't tell any more unless i read the driver code.
where can i find the code?


Takashi


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] An driver error when I using aplay!

2004-06-07 Thread Takashi Iwai
At Mon, 7 Jun 2004 14:08:17 +0100,
Russell King wrote:
 
 On Mon, Jun 07, 2004 at 02:45:20PM +0200, Takashi Iwai wrote:
  i guess so, too.  as you can see in the original post, the error
  returned from hw_params callback (sample not available), thus it
  doesn't call trigger(START) callback yet at all.
 
 If we never got past hw_params() then we didn't enable the IO,
 and it must be that something else in the system fiddled with
 the chip and set it incorrectly.
 
  unfurtunately i can't tell any more unless i read the driver code.
  where can i find the code?
 
 I never officially released the driver, though it was part of the
 old -rmk patches back in the 2.6.0-test era.  Where Roc has got
 the source from, and what modifications have been made is anyones
 guess.

Roc sent me the code now :)

after a quick look, it seems that txcr isn't initialized in the open
callback but only in hw_params callback (which was never called in
this case).  if my guess is correct, adding the following to
aacpi_playback_open() should fix this problem:

chan-txcr = 0;


Takashi


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] An driver error when I using aplay!

2004-06-07 Thread Takashi Iwai
At Mon, 7 Jun 2004 14:51:13 +0100,
Russell King wrote:
 
 On Mon, Jun 07, 2004 at 03:40:23PM +0200, Takashi Iwai wrote:
  At Mon, 7 Jun 2004 14:08:17 +0100,
  Russell King wrote:
   
   On Mon, Jun 07, 2004 at 02:45:20PM +0200, Takashi Iwai wrote:
i guess so, too.  as you can see in the original post, the error
returned from hw_params callback (sample not available), thus it
doesn't call trigger(START) callback yet at all.
   
   If we never got past hw_params() then we didn't enable the IO,
   and it must be that something else in the system fiddled with
   the chip and set it incorrectly.
   
unfurtunately i can't tell any more unless i read the driver code.
where can i find the code?
   
   I never officially released the driver, though it was part of the
   old -rmk patches back in the 2.6.0-test era.  Where Roc has got
   the source from, and what modifications have been made is anyones
   guess.
  
  Roc sent me the code now :)
  
  after a quick look, it seems that txcr isn't initialized in the open
  callback but only in hw_params callback (which was never called in
  this case).
 
 Why should it be explicitly initialised?  Take a moment to consider
 what guarantees snd_card_new() gives for the allocated memory.  Yep,
 that's right - it's initialised to zero.  So, chan-txcr is already
 initialised to zero.

You're right.  The error was not txcr, but in another WARN_ON() for
checking chan-tx_substream (line 404)!  (Russell, you mislead this,
too ;)

The reason is same -- since hw_params is not called,
chan-tx_substream is not set, too.


Takashi


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALSA 1.0.5

2004-06-01 Thread Takashi Iwai
At Mon, 31 May 2004 12:58:53 +0200,
Pedro Lopez-Cabanillas wrote:
 
 On Monday 31 May 2004 03:07, I wrote:
  My Gigabyte motherboard's integrated sound interface used to work with this
  driver, but it doesn't with 1.0.5
 
  Any program (amixer info, alsactl restore, alsamixer ...) trying to use the
  control interface hardly hangs, and it is impossible to kill it at all.  
  Modprobe/rmmod works, and doesn't report any problem. No error or debug
  messages at syslog.
 
 The reported problem is solved now, in the CVS.
 
  Mobo: Gigabyte 7VT600 with chipset VIA KT600
  Sound: Integrated Realtek ALC655 AC97 codec
  http://tw.giga-byte.com/MotherBoard/Products/Products_Spec_GA-7VT600.htm
 
 Anybody using the same hardware should avoid the 1.0.5 driver, IMO. Relevant 
 sources are ac97_codec.c and ac97_patch.c. The problem was related to a mutex 
 deadlock.

yep, sorry, my bad.
the bug hits AC97 codecs with paging, ALC655/658/850 and STAC9758.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [ANN] Open Source US-X2Y firmware

2004-06-01 Thread Takashi Iwai
At Thu, 27 May 2004 21:26:22 +0200,
Martin Langer wrote:
 
 
 Hi,
 
 if someone is interested in a free (I mean GPL) firmware for the Tascam
 US-X2Y devices I can offer an open source replacement for the second stage 
 loader alsa-firmware/usx2yloader/tascam_loader.ihx. All three US-X2Y devices
 need this file. But I have only tried it out with an US-122 where it works.
 
 Be careful. This software comes with ABSOLUTELY NO WARRANTY!
 
 http://www.langerland.de/us122/usx2y-fw-0.1.tar.bz2

shall i include this into alsa-firmware?
or should wait for a while until more debugging?


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Question regarding substreams or voices

2004-06-01 Thread Takashi Iwai
At Sat, 29 May 2004 16:05:05 +0100,
James Courtier-Dutton wrote:
 
 Hi,
 
 I am trying to do work on the Audigy LS driver.
 
 I have now discovered that I can send sound to the Front, Rear and 
 Center/LFE.
 I have not found out how to set the amount of interleaved channels that 
 the sound card can do, so it is fixed at 2 channels per stream.
 
 The sound card has 4 voices for 4 separate stereo streams.
 Each voice has it's own DMA and HW pointer.
 voice 0 sends sound to the Front speakers.
 voice 1 sends sound to the Center/LFE speakers.
 voice 2 sends sound to unknown, (no sound comes out yet)
 voice 3 sends sound to the Rear speakers.
 There does not appear to be any hardware mixing, so each voice can only 
 be opened once.
 
 Should this be set up as: -
 1)
 /proc/asound/card0/pcm0p
 info sub0 sub1 sub2 sub3
 
 or instead ?
 2)
 /proc/asound/card0/pcm0p
 /proc/asound/card0/pcm1p
 /proc/asound/card0/pcm2p
 /proc/asound/card0/pcm3p
 
 I think (2) is the correct way, so I will make a start using that method.

both are ok for ALSA native apps.  you can specify the substream index
in the configuration.
the latter would be easier for OSS compatible layer, though.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Question regarding substreams or voices

2004-06-01 Thread Takashi Iwai
At Tue, 1 Jun 2004 13:18:26 GMT,
[EMAIL PROTECTED] wrote:
 
 
  both are ok for ALSA native apps.  you can specify the substream index
  in the configuration.
  the latter would be easier for OSS compatible layer, though.
 
 Do you have a preference? I can change the emu10k1x driver to do (2)
 as well. I've done some tests (analog only) and the first two
 channels/voices get mixed together on headphones and analog output, so
 I am not sure if (2) is the right way or not. 

i prposed the latter because each substream corresponds to a different
purpose (front, rear, center/lfe) without mixing.  in the case of
emu10kx, all three substreams are mixed, hence the first case would be
suitable.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] latencytest 0.5.3 and recent kernels?

2004-06-01 Thread Takashi Iwai
At 31 May 2004 20:24:26 -0700,
Fernando Pablo Lopez-Lezcano wrote:
 
 I'm trying to build Takashi's version of latencytest (0.5.3) and
 apparently something has changed in the kernel (or I have something that
 I need to turn on in the config options?). This is what I get:

known problem...  i'll fix this later.

as a workaround, you can change get_symbol() to always return -EINVAL
and bail out the stuffs regarding kallsyms_lookup().  this will
disable the lookup of showtrace, but you can do the similar jobs by
comparing the addresses with the entries in /proc/kallsyms.


Takashi

 
 # make -f Makefile.module
 make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules
 make[1]: Entering directory
 `/lib/modules/2.6.6-1.391.2.ll.rhfc2.ccrma/build'
   CC [M]  /home/nando/software/latencytest/kernel/latencytest.o
   LD [M]  /home/nando/software/latencytest/kernel/latency-test.o
   Building modules, stage 2.
   MODPOST
 *** Warning: kallsyms_lookup
 [/home/nando/software/latencytest/kernel/latency-test.ko] undefined!
   CC  /home/nando/software/latencytest/kernel/latency-test.mod.o
   LD [M]  /home/nando/software/latencytest/kernel/latency-test.ko
 make[1]: Leaving directory
 `/lib/modules/2.6.6-1.391.2.ll.rhfc2.ccrma/build'
 
 If I look for that symbol or something similar this is what I get:
 
 # grep _lookup /boot/System.map-2.6.6-1.391.2.ll.rhfc2.ccrma|grep ksym
 022b6ee0 r __ksymtab_d_lookup
 022b9388 r __ksymtab_flow_cache_lookup
 022b6d00 r __ksymtab_lookup_create
 022b6d08 r __ksymtab_lookup_hash
 022b7050 r __ksymtab_lookup_mnt
 022b6d10 r __ksymtab_lookup_one_len
 022b95b0 r __ksymtab_neigh_lookup
 022b6d48 r __ksymtab_path_lookup
 022b9600 r __ksymtab_pneigh_lookup
 022b7648 r __ksymtab_radix_tree_gang_lookup
 022b7650 r __ksymtab_radix_tree_gang_lookup_tag
 022b7630 r __ksymtab_radix_tree_lookup
 022b7140 r __ksymtab_simple_lookup
 022b90e0 r __ksymtab_sockfd_lookup
 022b98a0 r __ksymtab_tcf_police_lookup
 022b9b78 r __ksymtab_tcp_v4_lookup_listener
 022b9f70 r __ksymtab_xfrm_dst_lookup
 022b9df8 r __ksymtab_xfrm_lookup
 022b9e50 r __ksymtab_xfrm_state_lookup
 
 -- Fernando
 
 
 
 
 ---
 This SF.Net email is sponsored by: Oracle 10g
 Get certified on the hottest thing ever to hit the market... Oracle 10g. 
 Take an Oracle 10g class now, and we'll give you the exam FREE.
 http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
 ___
 Alsa-devel mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/alsa-devel
 


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] What lower cost 7+1 cards can be used as reliable 4xstereo device under Alsa ?

2004-06-01 Thread Takashi Iwai
At Mon, 31 May 2004 16:59:47 +0200,
Robert Rozman wrote:
 
 Hi,
 
 I'd like to have device with 4 independent stereo channels. I wonder what
 card is lower cost, 7+1 channel, widely known, that could be also used for 4
 independent stereo devices under Alsa - it's important to work flawlessly in
 this mode (I'm running alc650 as 3 stereo channels but do get some weird
 artifacts with dmix plugin).

for 7.1 output, the boards based on VT1724 would be a good candidate,
such as M-Audio revo 7.1.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Yet another problem running latencytest

2004-06-01 Thread Takashi Iwai
At Sun, 30 May 2004 13:29:23 -0400,
Ivica Ico Bukvic wrote:
 
 Hi all,
 
 I've recompiled my 2.6.5 kernel with rtc compiled in and was able to install
 latency-test module. However, now when I run the run_tests the program goes
 through initial 2 draw 500x500 square tests and then every following test
 simply does something like this:
 
 starting diskread (or whatever else is being tested) test..
 error opening device
 
 I've properly edited the latencytest.config file to reflect the proper
 directories and I can see that the tmpfile1 and tmpfile2 are being generated
 during the tests (and the disk is working) but at the end of the test all
 the logfiles are empty and there are no png files in the test directory.
 
 I do not have a /dev/midi0 in my /dev folder (I think mdk 10.0 community I
 am using uses devfs), but even if I created a sym-link to /dev/midi00 which
 does exist, it still failed.

/dev/midi0 is NOT identical with /dev/midi00.
the former is a device for tclMIDI while the latter for general (real)
MIDI devices.  i chose /dev/midi0 because tclMIDI is almost dead, so
it unlikely conflicts.

try to create /dev/midi0 via

# mknod /dev/midi0 c 35 0


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] Audigy LS driver ready for inclusion into alsa-driver.

2004-06-01 Thread Takashi Iwai
At Tue, 1 Jun 2004 14:58:38 +0100,
William wrote:
 
 James Courtier-Dutton wrote:
  William wrote:
  James Courtier-Dutton wrote:
  
 Audigy LS driver is now ready for inclusion into alsa-driver.
 Get it from http://www.superbug.demon.co.uk/alsa
  
  Are you going to work on any other Audigy-series drivers, e.g. Audigy 2 ZS?
  I'm finding the emu10k1 driver in alsa-driver-1.0.5a has serious problems
  with random intermittent distortion of the soundfont samples while they are
  being played on the soundcard's MIDI synthesiser, e.g. using aplaymidi -p 65:0.
  Random intermittent distortion means, e.g. the sound during MIDI playback
  becomes muffled for a minute or two and then returns to normal sound
  quality, or the sound wrongly becomes mono for a few seconds, and then
  returns to stereo.
  Also, it seems emu10k1 does not load soundfonts correctly,
  especially if you ever use any really large 25MB soundfonts.
  
  I don't have an Audigy 2 ZS, so unless someone donates one, I can't help 
  you there.
 
 At the moment I also have an Audigy LS (5.1) which seems to have
 similar problems to the Audigy 2 ZS.
 
  Can you post to a web site your soundfonts file, and instructions on how 
  to use them with the creative cards, I might be able to help.
 
 The 25MB piano soundfont is here:
 http://www.wstco.com/pianosounds/freesoundfont.htm
 Please note the author Warren has told me his soundfont is not re-distributable.
 
 ALSA soundfont loading:  asfxload WST25FStein_00Aug14.SF2
 ALSA OSS-mode soundfont loading:  sfxload WST25FStein_00Aug14.SF2

check /proc/asound/card0/wavetableD* file whether all instruments are
loaded.  you can see there the memory usage,  number of instruments,
etc.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] Audigy LS driver ready for inclusion into alsa-driver.

2004-06-01 Thread Takashi Iwai
At Tue, 1 Jun 2004 16:46:45 +0100,
William wrote:
 
 Experiment 2:
 -
 
 Load the manufacturer's Standard GM Midi file:
  $ asfxload /etc/synthgm.sbk 
  $ cat /proc/asound/card0/wavetableD*
 Device: Emu10k1
 Ports: 4
 Addresses: 65:0 65:1 65:2 65:3
 Use Counter: 0
 Max Voices: 64
 Allocated Voices: 0
 Memory Size: 134217728
 Memory Available: 134213632

only 4096 bytes (= 1 page) allocated.  i guess this file is for ROM
soundfonts on SB AWE boards, not for SB Live/Audigy?


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] Audigy LS driver ready for inclusion into alsa-driver.

2004-06-01 Thread Takashi Iwai
At Tue, 1 Jun 2004 17:43:08 +0100,
William wrote:
 
 Takashi Iwai wrote:
  William wrote:
  
  Experiment 2:
  -
  
  Load the manufacturer's Standard GM Midi file:
   $ asfxload /etc/synthgm.sbk 
   $ cat /proc/asound/card0/wavetableD*
  Device: Emu10k1
  Ports: 4
  Addresses: 65:0 65:1 65:2 65:3
  Use Counter: 0
  Max Voices: 64
  Allocated Voices: 0
  Memory Size: 134217728
  Memory Available: 134213632
  
  only 4096 bytes (= 1 page) allocated.  i guess this file is for ROM
  soundfonts on SB AWE boards, not for SB Live/Audigy?
 
 That's odd because the file is 34832 bytes long
 (see http://christian.datzko.ch/computer/synthgm.sbk)

a soundfonts file includes not only the wave data but also the
instrument layer meta data.  in the case of ROM fonts, it includes
only meta data.

 Why is asfxload not loading the file properly?

it does :)


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] RME 9632 Mixer...

2004-05-28 Thread Takashi Iwai
At Thu, 27 May 2004 16:54:38 +0200 (CEST),
Thomas Charbonnel wrote:
 
  Thanks Thomas, I really appreciate the work you have done making this
  all work.  I will try and add some notes on the alsa site for the RME
  9632 on the mixer settings
 
  Ed W
 
 
 You're welcome. It would be indeed nice to add some 9632 specific notes on
 the alsa site, thanks.

More nice would be to have a document the ALSA source treed :)
Any volunteer?


--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: 2.6.7-rc1 breaks ATI IXP sound...

2004-05-28 Thread Takashi Iwai
Hi,

At Thu, 27 May 2004 22:43:06 -0400,
Trond Myklebust wrote:
 
 It appears to boil down to changeset
 [EMAIL PROTECTED]|ChangeSet|20040517133203|52763.
 
 More specifically to the line which adds the AC97_SCAP_SKIP_MODEM flag
 to the mixer probe. That flag causes the mixer probe to exit with an
 EACCES, when it hits the modem:
 
 ATI IXP Debug mixer probe 6, i = 0 codec_not_ready_bits =
 0x3000, err = 0
 ATI IXP Debug mixer probe 5, i = 1 codec_not_ready_bits =
 0x3000, err = -13
 ATI IXP AC97 controller: probe of :00:14.5 failed with error
 -13
 
 If I remove that line, the ATI IXP is detected correctly, and everything
 appears to work properly.

No it's a wrong fix, since this will conflict with the ATIIXP modem
driver (it's experimental and not included in the patchset though).

This problem was already fixed on the ALSA tree.  The error is just
ignored to continue probing.

Jaroslav, could you sync the sound bk tree?


--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org

 
 Cheers,
   Trond
 [2 Vidaresendt melding - 2.6.7-rc1 breaks ATI IXP sound... message/rfc822 (7bit)]
 To: [EMAIL PROTECTED]
 Cc: Andrew Morton [EMAIL PROTECTED]
 Subject: 2.6.7-rc1 breaks ATI IXP sound...
 From: Trond Myklebust [EMAIL PROTECTED]
 Message-Id: [EMAIL PROTECTED]
 Mime-Version: 1.0
 Date: Wed, 26 May 2004 16:32:20 -0400
 Content-Transfer-Encoding: 7bit
 
 From: dmesg -s
 
 ATI IXP AC97 controller: probe of :00:14.5 failed with error -13
 
 The same device works fine when reverting to 2.6.6..
 
 Cheers,
   Trond
 [3 gnarg.dif text/plain; ISO-8859-1 (base64)]
 --- linux-2.6.7-rc1/sound/pci/atiixp.c.orig   2004-05-27 13:53:31.0 -0400
 +++ linux-2.6.7-rc1/sound/pci/atiixp.c2004-05-27 22:33:23.0 -0400
 @@ -1385,7 +1385,6 @@ static int __devinit snd_atiixp_mixer_ne
   ac97.private_data = chip;
   ac97.pci = chip-pci;
   ac97.num = i;
 - ac97.scaps = AC97_SCAP_SKIP_MODEM;
   if ((err = snd_ac97_mixer(pbus, ac97, chip-ac97[i]))  0) {
   if (chip-codec_not_ready_bits)
   /* codec(s) was detected but not available.


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] Audigy LS support.

2004-05-28 Thread Takashi Iwai
At Fri, 28 May 2004 12:16:09 +0100,
James Courtier-Dutton wrote:
 
 Takashi Iwai wrote:
  At Thu, 27 May 2004 20:17:17 +0100,
  James Courtier-Dutton wrote:
  
 Here is my first go at Audigy LS support.
 It can play sound to the front speakers.
  
  
  great!
  
  
  
 /* hardware definition */
 static snd_pcm_hardware_t snd_audigyls_playback_hw = {
 .info = (SNDRV_PCM_INFO_MMAP | 
  SNDRV_PCM_INFO_INTERLEAVED |
  SNDRV_PCM_INFO_BLOCK_TRANSFER |
  SNDRV_PCM_INFO_MMAP_VALID),
 .formats =  SNDRV_PCM_FMTBIT_S16_LE,
 .rates =SNDRV_PCM_RATE_48000,
 .rate_min = 48000,
 .rate_max = 48000,
 .channels_min = 2,
 .channels_max = 2,
 .buffer_bytes_max = (32*1024),
 .period_bytes_min = 64,
 .period_bytes_max = (16*1024),
 .periods_min =  2,
 .periods_max =  16,
  
  ^^
  are you sure this is ok?
  in the case of emu10k1, it generates irq twice per buffer (HALF and
  BUFFER).  then periods_max must be 2.
 
 With periods_max set to 2, sound plays, but has artifacts. With periods 
   2, the sound is smooth, without any clicks etc.

well, then the question is how the period size is controlled.
you have never set the period size/bytes on the hardware.


  anyway, the driver code is quite similar with emu10k1x.c.
  i checked the diff between them and the amount of difference is really
  small.
  how about merging them?  then we can understand / maintain the codes
  better.
  
  
  Takashi
  
  
 
 I would like to keep the two drivers separate for a bit. That way I can 
 keep changing stuff without caring if the emu10k1x.c stays working.

ok.  but it's also true that changing one of them can help to reveal
features of these chips.  anyway, keep tracking of cvs changes...


Takashi


 Once I get all the features working, we could then look at merging the two.
 There is still a lot to go.
 1) 24bit 192khz sound out.
 2) 5.1 sound.
 3) Digital SPDIF output.
 4) Capture.
 5) MIDI.
 It seems that the changing of the sample rate etc. from the default is 
 done via some sort of UART.
 
 Also, I can change how often the interrupts happen, so I will need to 
 implement that.
 
 Cheers
 James
 


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ATI IXP SPDIF

2004-05-27 Thread Takashi Iwai
At Wed, 26 May 2004 15:19:05 -0700,
Alex Song wrote:
 
 hi,
 
 i happened to have that ASUS mobo (P4R800-VM) which has an ATIIXP/AD1888 and
 both PCM and ac3 pass through works with SPDIF.
 but the board i am trying to get working has an ATIIXP/ALC655 and i had a
 look at the realtek site and they had some drivers
 (http://www.realtek.com.tw/downloads/dlac97-2.aspx?lineid=5famid=12series=
 8Software=True) which looks like they were based off alsa-1.0.4. just doing
 a quick diff i see that they added some SPDIF stuff amongst other things.
 after testing and some code diffing this is what i figured:
 
 alsa-1.0.4broken atiixp-spdif broken alc655-spdif
 realtek-alsa-1.0.4broken atiixp-spdif working alc655-spdif
 alsa-cvs  working atiixp-spdifbroken alc655-spdif
 
 i am going to try and hack together some combination of realtek-alsa-1.0.4
 and alsa-cvs and see if what i figured is right or not. it would be great if
 one of the alsa developers can look into realtek-alsa-1.0.4 and merge those
 changes into alsa.

ok then the problem seems alc655 specific.

after a quick look, i haven't found relavant changes for the spdif.
they implemented additional switches for category but these should be already
handled if you set IEC958 status bits.

how did you test your board?


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] emu10k1x patch

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 01:00:58 GMT,
[EMAIL PROTECTED] wrote:
 
 188,189c188,189
.period_bytes_min = 64,
.period_bytes_max = (32*1024),
 ---
.period_bytes_min = (16*1024),
.period_bytes_max = (16*1024),

are you sure this change is correct?
in the current code, the period size is always bound to
(buffer_size / 2)  (because periods_min = periods_max = 2).
so you don't have to limit period_bytes or period_size.

 732,733c732,733
//  snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP1);
//  snd_emu10k1x_intr_enable(chip, INTE_CH_0_LOOP2);
 ---
snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)1);
 snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)2);

hmm, it looks redundant.
the second line will override the setting of the first line.
i guess you wanted like the following?

snd_emu10k1x_intr_enable(chip,
(INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)1 |
(INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)2);

Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ATI IXP SPDIF

2004-05-25 Thread Takashi Iwai
At Mon, 24 May 2004 16:16:42 -0700,
Alex Song wrote:
 
 hi,
 
 i am trying to get SPDIF output working on ATI IXP/Realtek ALC655 and i am
 using atiixp.c from cvs (version 1.9) and linux kernel 2.6.5. i tried
 playing back wav files through aplay and ac3 files with ac3play and i
 couldn't get any output from either SPDIF over AC97 or SPDIF Direct. analog
 output is fine. from the cvs logs i gather that SPDIF on ATI IXP should work
 for some cases at least, has anyone got it to work? if so with what
 files/hardware/settings etc?

it works fine on my test machine.  it's an ASUS mobo (forgot the
model).

% ac3dec -C some-48k.ac3

or

% aplay -Dplug:spdif foo.wav

but the direct SPDIF mode doesn't work...

--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] emu10k1x patch

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 11:52:19 GMT,
[EMAIL PROTECTED] wrote:
 
 
  
  188,189c188,189
 .period_bytes_min = 64,
 .period_bytes_max = (32*1024),
  ---
 .period_bytes_min = (16*1024),
 .period_bytes_max = (16*1024),
 
  are you sure this change is correct?
  in the current code, the period size is always bound to
  (buffer_size / 2)  (because periods_min = periods_max = 2).
  so you don't have to limit period_bytes or period_size.
 
 To me, the result was the same,

well, it should be same casually in your setting...

  but I thought it would be cleaner
 this way, but I don't care. It seems to work both ways. 

ok.

 
  732,733c732,733
 //  snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP1);
 //  snd_emu10k1x_intr_enable(chip, INTE_CH_0_LOOP2);
  ---
 snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)1);
 snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)2);
 
  hmm, it looks redundant.
  the second line will override the setting of the first line.
  i guess you wanted like the following?
 
  snd_emu10k1x_intr_enable(chip,
  (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)1 |
  (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)2);
 
 Both will actually do the samething, because
 snd_emu10k1x_intr_enable will read the current register value and OR
 the requested interrupts to it (same thing is done in the emu10k1
 code, so I just tried to keep it consistent). 

yes, you're right.  i've overseen it.
still it would be better to call once with all or'ed bits.
i'll change the code on CVS, which will go into 1.0.5-rc2.


BTW, at the next time, please post the patch with unified diff style
(diff -u)?


thanks,

Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 14:26:33 +0200 (METDST),
Clemens Ladisch wrote:
 
  Please, report (especially compilation) problems.
 
 depmod: *** Unresolved symbols in
 /lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
 depmod: errno
 
 The open/close/read system calls are implemented as inline functions
 which change errno which isn't exported from the kernel.
 
 We could reintroduce the dummy definition of errno for older kernels,
 or use filp_* calls (like sound_firmware.c).

i guess sys_* functions are also not defined correctly on older
kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.

how about to make a patch for old kernels to add the following?
(about line 1920 of wavefront_synth.c:)

#if LINUX_VERSION_CODE  KERNEL_VERSION(2,6,5)
#define __KERNEL_SYSCALLS__
#include linux/unistd.h
static int errno;
#define sys_open open
#define sys_close close
#define sys_read read
#else
#include linux/unistd.h
#endif


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 14:41:31 +0200,
I wrote:
 
 At Tue, 25 May 2004 14:26:33 +0200 (METDST),
 Clemens Ladisch wrote:
  
   Please, report (especially compilation) problems.
  
  depmod: *** Unresolved symbols in
  /lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
  depmod: errno
  
  The open/close/read system calls are implemented as inline functions
  which change errno which isn't exported from the kernel.
  
  We could reintroduce the dummy definition of errno for older kernels,
  or use filp_* calls (like sound_firmware.c).
 
 i guess sys_* functions are also not defined correctly on older
 kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.

does the attached patch work?


Takashi
Index: alsa-driver/isa/wavefront/wavefront_synth.c
===
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/isa/wavefront/wavefront_synth.c,v
retrieving revision 1.3
diff -u -r1.3 wavefront_synth.c
--- alsa-driver/isa/wavefront/wavefront_synth.c 24 Apr 2004 19:54:17 -  1.3
+++ alsa-driver/isa/wavefront/wavefront_synth.c 25 May 2004 12:55:43 -
@@ -5,6 +5,11 @@
 
 #if LINUX_VERSION_CODE  KERNEL_VERSION(2,6,5)
 #define __KERNEL_SYSCALLS__
+#include linux/unistd.h
+#define sys_open open
+#define sys_close close
+#define sys_read read
+static int errno;
 #endif
 
 #include ../../alsa-kernel/isa/wavefront/wavefront_synth.c


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 15:31:43 +0200 (METDST),
Clemens Ladisch wrote:
 
 Takashi Iwai wrote:
 
  I wrote:
  
   Clemens Ladisch wrote:
   
depmod: *** Unresolved symbols in
/lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
depmod: errno
   
The open/close/read system calls are implemented as inline functions
which change errno which isn't exported from the kernel.
 
  does the attached patch work?
 
  +static int errno;
 
 I don't have access to my Linux machine here, but I guess it does.
 
   i guess sys_* functions are also not defined correctly on older
   kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.
 
  +#define sys_open open
  +#define sys_close close
  +#define sys_read read
 
 These definitions are already in alsa-driver/include/syscalls_26.h.

ok, thanks.

 I'm going to test and apply this until tomorrow, but feel free to
 apply it now if you want to release rc2 earlier. :)

the patch was already committed to cvs.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] em10k1x fixes

2004-05-24 Thread Takashi Iwai
At Mon, 24 May 2004 19:00:54 +0200,
Martin Langer wrote:
 
 Hi,
 
 here is a patch with some emu10k1x fixes:
 
 - it adds emu10k1x to the Makefile

it's not needed.  emu10k1 is already in alsa-kernel/pci/Makefile.

 - include sound/info.h added
 - move snd_iprintf to the right position; it compiles now
 - fix typo in snd_iprintf

applied to cvs.


thanks,

Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] problems with the mixer

2004-05-19 Thread Takashi Iwai
At Wed, 19 May 2004 00:13:58 +0200,
Aner Gusic wrote:
 
 * Takashi Iwai [EMAIL PROTECTED]:
 
  doesn't it work like below?
  
  % aplay -Dfront some-2ch.wav
  % aplay -Drear some-2ch.wav
 
 You missunderstood me, I want to use one player to play regular mp3's
 and be able to hear it on both front and rear speakers.  Even if I
 could sync that thing above it would be a very ugly solution to my
 problem. 
 
 Så, aplay some-2ch.wav works fine, except for the fact that rear
 volume is initialized to 0.  I can get some other routing channels
 with a swich so rear volume isn't used, but then rear and front volume
 aren't independent (se my first mail for details)  :/ .

ok, then you need something similar like below:

pcm.dup4ch {
type hooks
slave.pcm {
type hw
card 0
device 0
}
hooks.0 {
type ctl_elems
hook_args [
{
name Rear Path
preserve true
value true
}
{
name PCM Reverb Playback Volume
index { @func private_pcm_subdevice }
preserve true
value 127
}
]
}
}   


then run aplay -Ddup4ch some-2ch.wav


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id%62alloc_ida84op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Audigy2 in SNDRV_PCM_FMTBIT_S32_LE mode.

2004-05-19 Thread Takashi Iwai
At Tue, 18 May 2004 17:03:17 +0100,
James Courtier-Dutton wrote:
 
 Takashi Iwai wrote:
  At Tue, 18 May 2004 16:47:01 +0100,
  James Courtier-Dutton wrote:
  
 What would I need to change in the emu10k1 driver, to get alsa-lib to 
 send it 32bit audio samples.
 I tried just adding the SNDRV_PCM_FMTBIT_S32_LE to the playback options, 
 but that did not work.
 
 When I did that, everything just played at half speed.
 
 Can anyone give me any pointers as to where else I should change things 
 in order to get 32bit audio to the Audigy2 DSP.
  
  
  AFAIK, emu10k1 engine processes only 16bit PCM.
  or do you know the register (or anything else) to handle 32bit data
  for audigy?
  
  
  Takashi
  
  
 
 The SB Live DSP can only handle 16bit PCM.
 The SB Audigy DSP can handle 24/32 bit PCM.
 
 I am working from what someone has told me to get 24bit sound. Send it 
 to the Audigy inside a 32bit value: -
 For playback:
 You can use voice grouping - alloc 4 FX busses for 1 stereo stream
 or use TRAM.
 
 Does this help you ?

if i understand the above correctly, audigy can assign 4 mono streams
as a stereo (interleaved?) 32bit stream.
it's similar as emu10k1 uses 2 mono streams for a single stereo 16-bit
interleaved stream.

in the case of 16-bit stereo, CPF_STEREO_MASK is used to toggle this
mode.  so, there must be a similar register switch for 32-bit mode.
otherwise it can't work...


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Audigy2 in SNDRV_PCM_FMTBIT_S32_LE mode.

2004-05-19 Thread Takashi Iwai
At Wed, 19 May 2004 13:19:10 +0200,
Peter Zubaj wrote:
 
 Hi,
 
 in the case of 16-bit stereo, CPF_STEREO_MASK is used to toggle this
 mode.  so, there must be a similar register switch for 32-bit mode.
 otherwise it can't work...
 
 AFAIK there is not such register.
 
 If there will be some alsalib plugin which will accept stereo 24bit 
 stream and split this stream to four (or 3) 16 bit mono streams. 

this wouldn't be difficult at all.

 These 4 (or 3) streams can be then feeded to 4 (or 3) FX buses 
 definied similiar as front, rear devices in .asoundrc or Audigy.conf.
 
 24 bit left sample - 16 bit stream 1 + 8bit stream 2
 24 bit right sample  - 16 bit stream 3 + 8bit stream 4
 
 or 
 
 24 bit left sample - 16 bit stream 1 + 8bit stream 2 (low)
 24 bit right sample  - 16 bit stream 3 + 8bit stream 2 (high)

the question is which FX bus corresponds to what?


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Is there any mixer documentation?

2004-05-19 Thread Takashi Iwai
At Tue, 18 May 2004 19:01:45 +0100,
James Courtier-Dutton wrote:
 
 I cannot find any documentation on any of the following functions in mixer.h

it's in the source code (mixer/mixer.c and mixer/simple.c), but not
generated as the doxygen document.  should be a bug in comments.

 I want to create a function that takes the elem, and comes back and 
 tells me if it is used for playback, or capture, and thus allow me to 
 filter the display of mixer elements based on whether they are used for 
 capture or playback. This would remove a lot of confusion as to what 
 mixer element does what in alsamixer. For example, the volume slider in 
 alsamixer under the MIC entry, has nothing to do with capture!
 If I could get alsamixer to do some filtering, I could get it to display 
 Capture controls or Playback controls and that would reduce 
 confusion considerably.

it's a good idea.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] problems with the mixer

2004-05-19 Thread Takashi Iwai
At Wed, 19 May 2004 16:26:48 +0200,
Aner Gusic wrote:
 
 * Takashi Iwai [EMAIL PROTECTED]:
 
  ok, then you need something similar like below:
  
  pcm.dup4ch {
 
 Finally! Thanks a lot.
 
 Is it possible to make this pcm the default one?

define like the following:

pcm.!default {
...
}


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: ALSA lib application compatibility [was] Re: [Alsa-devel] mixer device

2004-05-18 Thread Takashi Iwai
At Tue, 18 May 2004 09:30:54 -0400,
Manuel Jander wrote:
 
 Hi,
 
 On Tue, 2004-05-18 at 15:46 +0200, [EMAIL PROTECTED] wrote:
  On Thu, 13 May 2004, Adam Tla/lka wrote:
  
   On Wed, May 12, 2004 at 05:40:55PM +0200, Clemens Ladisch wrote:
   
   ALSA is complicated and we have no good manual describing proper use
   of its api. You can easily prove this: many programs have ALSA output
   modules but they are working worse then when using OSS.
   For example mplayer with OSS synchronizes video and sound much faster
   in case of network streaming. XMMS is broken too.
  ?? mplayer isn't broken in any way with alsa. it supports alsa since the 
  early days and also current versions very well. please don't talk 
  bullshit.
  it probably does av-sync faster at some particular streams (what ever you 
  mean with that) with oss, but i never ever saw some significant 
  performance differences compared to oss.
  at least it supports real mmaped-io for up to 2 channels.
  
 
 Unfortunately i have to agree with Clemens. In my opinion the ALSA API
 is giving the applications too much freedom in choosing parameters and
 does not enforce any restrictions on hardware that can't support them.

basically, such a restriction is up to the driver.  in the ideal
world, hw_constraints should be able to handle these cases
properly...

 As the main author of the Aureal Vortex driver, its very stupid having
 to handle arbitrary period sizes, introducing a lot of overhead and
 complexity in the driver, while the hardware just is not designed to
 handle period sizes that are not powers of two, due to page boundary
 overlapping trouble. Obviously as a result, OSS works much better, since
 it almost ever chooses the biggest buffer possible, resulting in a sane
 period size. Period sizes of 314.15.14 bytes are just silly, plain
 stupid. The user won't notice any difference if its 256 instead, but
 since the app insist in such period sizes it just fails, and the user
 gets no sound all. The behaviour of the user application in the end
 depends too much on the hardware it is running on.

first, the power of two is not a golden rule for every sound chip.
for some chips, it's difficult to handle such period/buffer sizes.

in theory, we can set the hw_constraint for the buffer/period sizes in
power of two.  yes, i tried it, but it failed.  this is because ALSA
handles the buffer/period sizes in two different units, frames and
time in msec.  IMO, it was a wrong decision to use different units for
the single purpose.  maybe we need a workaround not to mix up these
units in the configurator.


 AFAIK, the ICE1712 has exactly the same hardware restriction. I know
 that the via driver does cope with this, but that particular hardware
 has special hardware resources for such a thing, where other hardware
 don't.

ICE1712 has no problem regarding this.  its problem is that the
max. buffer size is 64k even though it always uses 32bit x 10
channels.

 The cost of allowing any parameter value is not worth it in my opinion.
 Its actually causing a lot of trouble.

not all parameters are accepted.  it depends on the driver
implementation.


please don't misunderstand:  i don't mean that the current ALSA design
is perfect.  it's not at all, as you know :)
however, the basic design of ALSA is that it leaves such a
reststriction purely to the driver implementation.  if your driver
allows everyhing, it's the driver's responsibility to support
everyhing.

unfortunately, the power-of-two restriction doesn't work well because
of the failure of configurator.  it's an exceptional case.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] problems with the mixer

2004-05-18 Thread Takashi Iwai
At Tue, 18 May 2004 17:24:54 +0200,
Aner Gusic wrote:
 
 * Takashi Iwai [EMAIL PROTECTED]:
 
  did you play a 4-channel sample file?
 
 Ah, no I didn't.  What I want is to play 2-channel samples on both
 front and rear speakers and to be able to control the volume
 independently. 

doesn't it work like below?

% aplay -Dfront some-2ch.wav
% aplay -Drear some-2ch.wav


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] spin_lock_irqwhat ?

2004-05-16 Thread Takashi Iwai
At Sat, 15 May 2004 23:37:47 +0200,
Giuliano Pochini wrote:
 
 On Fri, 14 May 2004 12:37:46 +0200
 Takashi Iwai [EMAIL PROTECTED] wrote:
 
prepare and trigger callbacks are already in irq-disabled.
i.e. you need only spin_lock() in them.
  
   Does it mean that ALSA acquires the lock only when it calls PCM callbacks,
   that is trigger(), etc., are atomic only wrt other PCM functions ?
 
  sorry i don't understand your question.
 
  the prepare and the trigger callbacks acquire several locks.
  first, the global rw_lock for the pcm linking (snd_pcm_link_rwlock),
  the group lock the substream belongs to, and the lock for the
  substream itself.  and the first lock/unlock is done with *_irq().
 
 Ok, are those locks acquired also before calling any other interface
 callback (control, midi...) ?  If so, it shouldn't be necessary protecting
 with a spin_lock() the code which touches the hw inside prepare().

no, all of these locks are specific to PCM.
you still likely need another spinlock for protecting the h/w
registers reading/writing.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Emu10k1x driver

2004-05-16 Thread Takashi Iwai
At Sat, 15 May 2004 17:30:52 -0400,
Francisco Moraes wrote:
 
 Takashi Iwai wrote:
 
 Is your patch for kernel 2.6?
 
 
 
 to the latest ALSA cvs.
 you'd better to get the CVS tree (either via cvs or snapshot).
 it already incldues emu10k1x.c.
   
 
 I got it from there but your changes to add the module params don't 
 compile on my system (Red Hat Fedora Core 1 - 2.4.22-2188 kernel).

did you rebuild via cvscompile script?


 There is also a problem with mono streams, so the hw params need to 
 indicate that only stereo is supported.

that's fine.  many hardwares support only stereo indeed.

  Also, is there any advantage in 
 enabling both interrupts in the buffer (loop and half loop)?

yes, definitely.  (IIRC, it IS enabled?)
otherwise the app won't work proprely in most cases.
remember that the sound system is driven by interrupts.
an irq per buffer means that we have only one chance to update the
data in the accurate timinig.

  Also, how 
 important is the definition of period bytes? It seems it should be the 
 same as the buffer size.

no, it should be a half of the buffer size.

  Maybe you can just explain it to me how it 
 relates to the total buffer size being used.

the buffer size is the total size of the memory space you callocate.
when the amount of processed PCM data becomes to the period size, an
irq is issued.  in the case of emu10k1x, hence, period size is ALWAYS
buffer size / 2 (as long as half-interrupt bit is set).


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Emu10k1x driver

2004-05-15 Thread Takashi Iwai
At Sat, 15 May 2004 01:30:51 GMT,
[EMAIL PROTECTED] wrote:
 
 
 the attached patch includes some fixes by me for the latest cvs, and
 changes the periods to 2.  i'll apply it to cvs now.
 
 Is your patch for kernel 2.6?

to the latest ALSA cvs.
you'd better to get the CVS tree (either via cvs or snapshot).
it already incldues emu10k1x.c.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: Alsa-devel digest, Vol 1 #1842 - 14 msgs

2004-05-14 Thread Takashi Iwai
At Thu, 13 May 2004 13:43:28 -0700,
Loc Ho wrote:
 
 Hi,
 
 Your fix of the ALSA memory allocation problem is incorrect. This
 only fixes the problem with the commerical USB Audio driver. It does
 not fix for all drivers. The proper fix is to replace the function
 setup_pcm_id with this one (note the added card-number  24): 

maybe you've already received my last fix - a similar patch was
already on cvs.

it was intentional not to have card number in the id.  it was
basically designed for the card instances with the unique device
pointers, so that the buffer can be reallocated even if the card
number is changed.

the card number is needed only when dev is NULL (ISA) or not unique
(CONTINUOUS).


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] request_mem_region size

2004-05-14 Thread Takashi Iwai
At Fri, 14 May 2004 11:58:37 +0200 (CEST),
Giuliano Pochini wrote:
 
 
 I get the size to be passed to request_mem_region()
 with pci_resource_len(). But that size sometimes
 (depends on the card) is several MBs, while the hw
 registers are just a few bytes above the base
 address. Is it ok using a fixed length ?

no problem as long as it doesn't exceed.
you can reserve the partial areas.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] spin_lock_irqwhat ?

2004-05-14 Thread Takashi Iwai
At Thu, 13 May 2004 20:57:51 +0200,
Giuliano Pochini wrote:
 
 
 On Mon, 10 May 2004 17:08:49 +0200
 Takashi Iwai [EMAIL PROTECTED] wrote:
 
  prepare and trigger callbacks are already in irq-disabled.
  i.e. you need only spin_lock() in them.
 
 Does it mean that ALSA acquires the lock only when it calls PCM callbacks,
 that is trigger(), etc., are atomic only wrt other PCM functions ?

sorry i don't understand your question.

the prepare and the trigger callbacks acquire several locks.
first, the global rw_lock for the pcm linking (snd_pcm_link_rwlock),
the group lock the substream belongs to, and the lock for the
substream itself.  and the first lock/unlock is done with *_irq().


 hdsp.c and rme9652.x use spin_*lock_irq() inside prepare().

oh, it's wrong.  fixed on cvs now.


thanks,

Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: [PATCH]snd-usb-usx2y 0.6.1

2004-05-14 Thread Takashi Iwai
At Fri, 14 May 2004 13:26:53 +0200,
Karsten Wiese wrote:
 
 [1  text/plain; us-ascii (7bit)]
 Hi Takashi,
 
 little fix attached. Please commit with comment
   - avoid entry in system log when device disconnects (for RELEASE build)

applied now.

thanks,

Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: [PATCH] aureon.c - hpamp, adc/dac mute

2004-05-14 Thread Takashi Iwai
At Fri, 14 May 2004 14:48:18 +0200,
Christoph Haderer wrote:
 
 [1  text/plain; us-ascii (7bit)]
 This patch adds a headphone amplifier control and the ability to mute 
 the DAC (all channels at once) and the ADC channels. wm_adc_vol_put had 
 to be changed a little bit because otherwise the ADC-mute bits would be 
 overwritten when changing the ADC-gain. I have also modified 
 wm_adc_mux_info; IMHO the *texts array was wrong before - the texts 
 didn't match the recording source (tested with alsamixer).
 This patch applies cleanly against the alsa source files that came with 
 kernel 2.6.6-mm2.

thanks, applied now to cvs.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Emu10k1x driver

2004-05-14 Thread Takashi Iwai
At Fri, 14 May 2004 11:50:50 GMT,
[EMAIL PROTECTED] wrote:
 
 Here's a revised version of the driver. I found a bug in the
 previous version, not sure why it was working, maybe because I had my
 printk's in it. 
 
 I've also revised the indentation and now supports the 3 PCM
 streams, even though I seem to only be able to hear the first two when
 the mixer is set correctly. 

thanks, the code looks nicer.

i noticed that you set the irq mask IPR_CH_0_LOOP|IPR_CH_0_HALF_LOOP.
does it mean that the chip generates interrupts twice per buffer?
if yes, what we need is to limit the number of periods to 2.


the attached patch includes some fixes by me for the latest cvs, and
changes the periods to 2.  i'll apply it to cvs now.


Takashi
Index: alsa-driver/pci/Kconfig
===
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/pci/Kconfig,v
retrieving revision 1.16
diff -u -r1.16 Kconfig
--- alsa-driver/pci/Kconfig 3 Apr 2004 14:20:01 -   1.16
+++ alsa-driver/pci/Kconfig 14 May 2004 13:27:22 -
@@ -18,4 +18,12 @@
  Say 'Y' or 'M' to include support for RME Hammerfall DSP MADI
  soundcards.
 
+config SND_EMU10K1X
+   tristate EMU10K1X (Dell OEM Version)
+   depends on SND
+   select SND_AC97_CODEC
+   help
+ Say 'Y' or 'M' to include support for Sound Blaster Live Dell
+ OEM version.
+
 endmenu
Index: alsa-driver/pci/emu10k1/Makefile
===
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/pci/emu10k1/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- alsa-driver/pci/emu10k1/Makefile11 Nov 2003 13:09:46 -  1.5
+++ alsa-driver/pci/emu10k1/Makefile14 May 2004 13:30:14 -
@@ -5,6 +5,10 @@
 include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/Makefile.conf
 
+snd-emu10k1x-objs := emu10k1x.o
+
+obj-$(CONFIG_SND_EMU10K1X) += snd-emu10k1x.o
+
 export-objs  := emu10k1_main.o
 
 include $(SND_TOPDIR)/alsa-kernel/pci/emu10k1/Makefile
Index: alsa-driver/pci/emu10k1/emu10k1x.c
===
RCS file: alsa-driver/pci/emu10k1/emu10k1x.c
diff -N alsa-driver/pci/emu10k1/emu10k1x.c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ alsa-driver/pci/emu10k1/emu10k1x.c  14 May 2004 13:32:26 -
@@ -0,0 +1,867 @@
+/*
+ *  Copyright (c) by Francisco Moraes [EMAIL PROTECTED]
+ *  Driver EMU10K1X chips
+ *
+ *  BUGS:
+ *--
+ *
+ *  TODO:
+ *--
+ *
+ *   This program is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation; either version 2 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *
+ */
+#include sound/driver.h
+#include linux/init.h
+#include linux/interrupt.h
+#include linux/pci.h
+#include linux/slab.h
+#include linux/moduleparam.h
+#include sound/core.h
+#include sound/initval.h
+#include sound/pcm.h
+#include sound/ac97_codec.h
+
+MODULE_AUTHOR(Francisco Moraes [EMAIL PROTECTED]);
+MODULE_DESCRIPTION(EMU10K1X);
+MODULE_LICENSE(GPL);
+MODULE_CLASSES({sound});
+MODULE_DEVICES({{Dell Creative Labs,SB Live!});
+
+// module parameters (see Module Parameters)
+static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
+static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
+static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
+static int boot_devs;
+
+module_param_array(index, int, boot_devs, 0444);
+MODULE_PARM_DESC(index, Index value for the EMU10K1X soundcard.);
+MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
+module_param_array(id, charp, boot_devs, 0444);
+MODULE_PARM_DESC(id, ID string for the EMU10K1X soundcard.);
+MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
+module_param_array(enable, bool, boot_devs, 0444);
+MODULE_PARM_DESC(enable, Enable the EMU10K1X soundcard.);
+MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
+
+
+// some definitions were borrowed from emu10k1 driver as they seem to be the same
+//
+/* PCI function 0 registers, address = val + PCIBASE0   
 */
+//
+
+#define PTR0x00/* Indexed register set pointer 
register*/
+   /* NOTE: The CHANNELNUM and 

Re: [Alsa-devel] Emu10k1x driver

2004-05-14 Thread Takashi Iwai
At Fri, 14 May 2004 18:14:47 +0100,
James Courtier-Dutton wrote:
 
 I would like to add some information that might help people modifying 
 this for the Audigy LS.
 
 The outputs for the card work in 2 modes.
 1) Probably analogue on the output jacks.
 snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x70f);
 snd_emu10k1x_ptr_write(chip, 0x45, 0, 0);
  
  
  it's already in emu10k1x.c.
  
  
 2) Probably digital spdif on the output jacks.
 snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x1000f);
 snd_emu10k1x_ptr_write(chip, 0x45, 0, 0x700);
  
  
  it's not.
 
 Those (1) and (2) should work on bother the LS and the Dell OEM.

then, are they exclusive?

 To enable this driver loading for the Audigy LS, have the following PCI IDs.
 static struct pci_device_id snd_emu10k1x_ids[] = {
{ 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },  /* Dell OEM 
 version (EMU10K1X) */
{ 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },  /* Audigy LS */
{ 0, }
 };
  
  
  so, just adding the pci id for audigy LS would suffice at least for
  analog output?
 
 I don't think so, because of all the extra code that will be needed in 
 the interrupt routines.

ok...

(snip)
 Takashi,
 
 I am waiting for someone to donate an Audigy LS to me. I will then be 
 able to build a driver for it.
 It seems that the Audigy LS is quite a lot different from the Dell OEM, 
 so I will probably create a new .c file for it.
 Maybe at a later stage, when everything works well, we might decide to 
 join the two drivers.

that's fine.  meanwhile, emu10k1x.c is already on cvs.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] problems with the mixer

2004-05-14 Thread Takashi Iwai
At Fri, 14 May 2004 20:05:09 +0200,
Aner Gusic wrote:
 
 * Takashi Iwai [EMAIL PROTECTED]:
 
  you can use front, rear and surround40 PCMs.
  then the volumes and the route should be initialized properly.
 
 I've tryed playing some samples with aplay combined with -D parameter,
 e.g. aplay -Dfront foo.wav.  However, what I want is to play a
 sample on both front and rear speakers, but control the sound level
 independently, so what remains is the surround40-pcm.
 
 When I try this (-Dsurround40) I get the following message:
 aplay: set_params:837: Channels count non available
 
did you play a 4-channel sample file?

 I've tried reading documentation in alsa-driver source-tree, but it is
 sparse.  No documentation on the homepage that I found covers what I
 am having problems with. :/  Any suggestions to where I should look?
 Mostly, it should cover pcm:s, this routing stuff and such.

it's not the scope of the driver but the library.
you might find some useful info in ALSA wiki page...


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Firmware uploader

2004-05-13 Thread Takashi Iwai
At Thu, 13 May 2004 09:22:51 +0200 (CEST),
Giuliano Pochini wrote:
 
 
 On 10-May-2004 Takashi Iwai wrote:
  At Sun, 9 May 2004 18:21:21 +0200,
  Giuliano Pochini wrote:
 
  I read /linux/Documentation/firmware_class/README infos about the firmware
  loader. That loader is not used by any of the alsa drivers. Is there a
  reason ? Should I write my own custom loader or is it better using the
  firmware-class one ?
 
  it's planned to move the ALSA firmware stuff to this new one.
  but we'll need a compatibility stuff for older kernels.
 
 Ok, I'll start with the new one. It there a standard daemon that
 monitors /proc and uploads the firmware when requested ?

it's hotplug on 2.6.  no such one for 2.2/2.4.  that's what i wrote as
a compatibility stuff.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALSA Memory Allocation Bug

2004-05-13 Thread Takashi Iwai
At Wed, 12 May 2004 18:40:05 -0700,
Loc Ho wrote:
 
 Hi,
 
 I developed an custom USB Audio driver. In addition, I am also using
 the provided USB Audio driver for commercial USB Audio devices. After
 some testing with the custom USB Audio driver and the provided USB
 Audio driver, there seem to be a problem with the ALSA memory
 allocation routine. In file pcm_memory.c function setup_pcm_id, the id
 is generated using the pcm device ID, stream ID, and substream
 number. This only guarantee that the memory tag ID is unique for one
 card. If I have multiple cards, they will not be unique. Am I correct?

no, usually you have a unique struct device pointer for each card, so
it's no problem.  the tag is a pair of device pointer and id number.

however, if the same struct device is shared among multiple card
instances, you'll need to set up the id field by yourself.  an
exmample is found in mixart driver.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Emu10k1x driver

2004-05-13 Thread Takashi Iwai
At Wed, 12 May 2004 18:36:56 GMT,
[EMAIL PROTECTED] wrote:
 
 
  nice, i'll add this to alsa-driver tree.
  i guess pci/emu10k1 is the best location.
 
 That's fine. I had it under pci on my system just because it was easier.
 
  would you mind to change the indentation level to 8, as described in
 Documentation/CodingStyle?
  kernel people prefer to have the codes with the same style.
 
 No problem but I won't be able to do that for a couple of days
 now. If someone wants to reformat the code, feel free to do it, as I
 haven't changed anything. 

ok, i'll do it when i put this to cvs tree.

  alsaplayer didn't work, not sure why. I've also tested with the pcm
  test in alsa-lib which seems to be jumping, so that's another
  problem. 
 
 Any ideas/suggestions on the alsaplayer? I will test it more once I
 have time, but it bothered me that it didn't work with my driver. 

what alsaplayer tells exactly?  the configuration failure, or you hear
weird sounds?


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALSA Memory Allocation Bug

2004-05-13 Thread Takashi Iwai
At Thu, 13 May 2004 10:45:20 -0700,
Loc Ho wrote:
 
 Hi,
 
 Are you saying that the third parameter for the function
 snd_pcm_new, int device, should be the value of the chip (driver
 context pointer) pointer.

no.

as written in my last mail, both dev and id fields of struct
snd_dma_device are used as the tag of a buffer.  since dev is a
struct device pointer and is usually unique between card instances,
they don't conflict even if id field is identical.


Takashi


---
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALSA Memory Allocation Bug

2004-05-13 Thread Takashi Iwai
At Thu, 13 May 2004 20:06:45 +0200,
I wrote:
 
 [1  text/plain; US-ASCII (7bit)]
 At Thu, 13 May 2004 10:53:48 -0700,
 Loc Ho wrote:
  
  Hi,
  
  Also, after looking at the snd memory allocation routines, the
  unique tag are type, id, and flag. The type is continous. The id is
  formated by the device ID, stream number, and substream number. The
  flag is the kernel memory flag. I already discussed the ID in my
  previous email (see below). Therefore, it will NOT be unique across
  multiple card!!!  
 
 hmm, you're right.
 
 obviously it's a bug of snd-usb-audio.
 the attached patch should fix the problem.

maybe this one is better.
i'll commit this to cvs.


Takashi
Index: alsa-kernel/core/pcm_memory.c
===
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/pcm_memory.c,v
retrieving revision 1.25
diff -u -r1.25 pcm_memory.c
--- alsa-kernel/core/pcm_memory.c   7 Apr 2004 17:49:39 -   1.25
+++ alsa-kernel/core/pcm_memory.c   13 May 2004 18:16:27 -
@@ -224,9 +224,13 @@
  */
 static inline void setup_pcm_id(snd_pcm_substream_t *subs)
 {
-   if (! subs-dma_device.id)
+   if (! subs-dma_device.id) {
subs-dma_device.id = subs-pcm-device  16 |
subs-stream  8 | (subs-number + 1);
+   if (subs-dma_device.type == SNDRV_DMA_TYPE_CONTINUOUS ||
+   subs-dma_device.dev == NULL)
+   subs-dma_device.id |= (subs-pcm-card-number + 1)  24;
+   }
 }
 
 /**


Re: [Alsa-devel] General Info. PCI Audio devices that are handled by the OpenSound OSS drivers, but not handled by ALSA.

2004-05-12 Thread Takashi Iwai
At Wed, 12 May 2004 05:30:43 +0100,
James Courtier-Dutton wrote:

NOT SUPPORTED AT ALL (no datasheet available):

 pci4005,308 NOT-HANDLED als300
 pci10b5,1142 NOT-HANDLED lynxone
 pci10c8,8016 NOT-HANDLED. neomagic


POSSIBLY COMPATIBLE (adding pci id might work):

 pci1023,2002 NOT-HANDLED wave4d

snd-trident

 pci1073,5 NOT-HANDLED ymf724

snd-ymfpci

 pci1106,7059 NOT-HANDLED via8233

snd-via82xx


NO CURRENT VERSION:

 pci1078,103 NOT-HANDLED geode

not supported on ALSA 1.x
there was a patch for ALSA 0.5.x, though.


NEEDS MORE INFO:

 pci1274,8001 NOT-HANDLED apci97
 pci1274,8002 NOT-HANDLED apci97

ensoniq chip?

 pci1412,3630 NOT-HANDLED envy24ht

snd-ice1724, needs more h/w info

 pci1412,d630 NOT-HANDLED envy24
 pci1412,d631 NOT-HANDLED envy24
 pci1412,d632 NOT-HANDLED envy24
 pci1412,d633 NOT-HANDLED envy24
 pci1412,d634 NOT-HANDLED envy24
 pci153b,1115 NOT-HANDLED envy24
 pci153b,112b NOT-HANDLED envy24
 pci153b,1130 NOT-HANDLED envy24

snd-ice1712, needs more h/w info for each


Takashi




---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] status of powermac sound?

2004-05-12 Thread Takashi Iwai
At Wed, 12 May 2004 12:31:54 +0200,
Michel Dänzer wrote:
 
 On Wed, 2004-05-12 at 01:38, Niklas Werner wrote:
  
  is there any progress on the status of full support for the newer devices 
  as snapper, etc (in the AlBooks,..). I'm running the 2.6.5 benh-kernel 
  from bitkeeper and basically the sound only works reliably when using the 
  oss emulation.
  
  I can remember a short time under 2.6.* when alsa output actually worked, 
  though...
 
 I have a
 
 0 [Snapper]: PMac Snapper - PowerMac Snapper
  PowerMac Snapper (Dev 26) Sub-frame 0
 
 in a TiBook IV, and it's been working better than OSS ever did for quite
 a while. My configuration is http://penguinppc.org/~daenzer/asound.conf
 
 The only thing that bothers me is
 https://bugtrack.alsa-project.org/alsa-bug/bug_view_advanced_page.php?bug_id=057,
  but I can live with it.

sorry, forgot to answer BTS.
this bug might have been fixed in the recent CVS version (might be not
:)

please give a try.


Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Emu10k1x driver

2004-05-12 Thread Takashi Iwai
At Wed, 12 May 2004 00:31:43 GMT,
[EMAIL PROTECTED] wrote:
 
 Here's the first pass at the driver. I've tested it mainly with XMMS with the ALSA 
 output plugin.

nice, i'll add this to alsa-driver tree.
i guess pci/emu10k1 is the best location.

would you mind to change the indentation level to 8, as described in
Documentation/CodingStyle?
kernel people prefer to have the codes with the same style.


 alsaplayer didn't work, not sure why. I've also tested with the pcm
 test in alsa-lib which seems to be jumping, so that's another
 problem. 
 
 I've removed the joystick support for now, but the only reason I
 added it was because the intel8x0.c driver has joystick support in
 it. 

as i wrote in another mail, it's better to split it out of the sound
driver as long as it's possible.


thanks,

Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] FM801 Joystick 2.4.26

2004-05-12 Thread Takashi Iwai
At Fri, 7 May 2004 12:38:35 +0700,
Kovalyev S. Sergey wrote:
 
 Hi to all!
 
 I've read the alsa-kernel/Documentation/Joystick.txt
 It says that I have to insert module fm801-gp to enable the joystick, but I did not 
 found this module either in linux kernel 2.4.26 or in alsa-driver 1.0.4, where 
 should I get this?

it's in 2.6 kernel tree.  maybe you can copy and use it.


Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Emu10k1x status

2004-05-11 Thread Takashi Iwai
At Mon, 10 May 2004 19:49:19 -0400,
Francisco Moraes wrote:
 
 Hi everybody,
 
 Just wanted to share the status of the Emu10k1x driver (Dell SB Live! 
 Value). I've finally got PCM playback working at 48000khz and a 32Kb 
 buffer. I haven't tried too much more than this which is hard because of 
 lack of specs for the card.

great, thanks for your work!

 I am doing some clean up and I hope to have a first pass of the drive 
 submitted soon.

yes, please.  we can review the problem.

 By the way, I've also added support for the joystick port on the card. 
 This could have been done by simply adding the PCI ID into the 
 drivers/char/joystick/emu10k1-gp.c driver in the linux kernel. Any 
 suggestions or preferences of whether this should be changed in the 
 kernel driver or in the alsa driver itself like I have at the moment?

no, it's an independent driver.  please submit the patch to the
author of the emu10k1-gp driver (Vojtech).


Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] spin_lock_irqwhat ?

2004-05-10 Thread Takashi Iwai
At Mon, 10 May 2004 16:51:24 +0200 (CEST),
Giuliano Pochini wrote:
 
 
 On 10-May-2004 Takashi Iwai wrote:
 
   Some drivers use spin_lock_irq() a lot, while others always use
   spin_lock_irqsave(). I can't see the difference. When it's safe
   using the _irq() version ?
 
  Only when you know that you are not in interrupt context.
 
  also, not in the context which already disabled irq.
 
 Yes, I read the famous Rusty's unreliable guide. My question
 was ALSA-specific. The point is that I don't know when those
 conditions are true. Can and_pcm_period_elapsed() call anything
 other than the pcm callbacks ?  Does the ALSA middle layer ever
 disable interrupts before calling a driver function ?  If it
 doesn't, I can replace spin_lock_irqsave() with spin_lock_irq()
 almost everything. Some callbacks are atomic according to the
 tutorial, but it doesn't say if interrupts are disabled too.
 Are irq (and preempt) disabled before calling .prepare and
 .trigger callbacks ?

prepare and trigger callbacks are already in irq-disabled.
i.e. you need only spin_lock() in them.
also, ioctl(SNDRV_PCM_IOCTL1_RESET) is in the irq-disabled context.

others are not.

some points to be noted:

- prepare can be non-atomic by setting SNDRV_PCM_INFO_NONATOMIC_OPS to
  pcm-info_flags.  (e.g. usbaudio.c)

- pointer callback is not protected.  but it's called also in the
  interrupt context, so you can't use spin_lock_irq() in general.


Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] spin_lock_irqwhat ?

2004-05-10 Thread Takashi Iwai
At Mon, 10 May 2004 10:31:07 +0200 (METDST),
Clemens Ladisch wrote:
 
 Giuliano Pochini wrote:
  Some drivers use spin_lock_irq() a lot, while others always use
  spin_lock_irqsave(). I can't see the difference. When it's safe
  using the _irq() version ?
 
 Only when you know that you are not in interrupt context.

also, not in the context which already disabled irq.


Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Suggestion regarding alsa driver writing documentation.

2004-05-10 Thread Takashi Iwai
Hi James,

could you create a patch to the source
(alsa-kernel/Documentation/DocBook/writing-an-alsa-driver.tmpl)?

it's just a DocBook format.  the tmpl extension is used to allow the
inclusion from the kernel source, although this document doesn't do
it.


thank,s

Takashi

At Sat, 08 May 2004 19:33:51 +,
James Courtier-Dutton wrote:
 
 I have been helping some people with writing alsa drivers.
 One thing that they did not totally understand from the alsa 
 documentation was the concept of frames.
 To help with this, could we add a html link between in the following 
 document: -
 http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x490.htm
 
 In section: -
 /* pointer callback */
 
 pointing to: -
 http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x537.htm
 
 In Section: -
 PCM Configurations
 
 Where it explains about what a frame is.
 I think it would be helpful to also explain that the document: -
 http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x490.htm
 
 has a line: -
 current_ptr = mychip_get_hw_pointer(chip);
 
 I think that comments should be added close to that line to say: -
 
 The pointer value obtained from the hardware is likely to be a byte 
 offset within the buffer. In order to convert this value to a type 
 snd_pcm_uframes_t , that is required as the return value, use the 
 following code: -
 return bytes_to_frames(substream-runtime, pointer);
 
 An explanation of what a frame is can be found at http://xyz
 
 
 Or just change the document example code: -
 /* pointer callback */
static snd_pcm_uframes_t
snd_mychip_pcm_pointer(snd_pcm_substream_t *substream)
{
mychip_t *chip = snd_pcm_substream_chip(substream);
 -  unsigned int current_ptr;
 +  unsigned int current_byte_ptr;
 
// get the current hardware pointer
 -  current_ptr = mychip_get_hw_pointer(chip);
 -  return current_ptr;
 +  current_byte_ptr = mychip_get_hw_pointer(chip);
 +  return bytes_to_frames(substream-runtime, current_byte_ptr);
 
}
 
 
 Cheers
 James
 
 
 ---
 This SF.Net email is sponsored by Sleepycat Software
 Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
 higher performing products faster, at low TCO.
 http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
 ___
 Alsa-devel mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/alsa-devel
 


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Firmware uploader

2004-05-10 Thread Takashi Iwai
At Sun, 9 May 2004 18:21:21 +0200,
Giuliano Pochini wrote:
 
 I read /linux/Documentation/firmware_class/README infos about the firmware
 loader. That loader is not used by any of the alsa drivers. Is there a
 reason ? Should I write my own custom loader or is it better using the
 firmware-class one ?

it's planned to move the ALSA firmware stuff to this new one.
but we'll need a compatibility stuff for older kernels.

also, the 2.6 firmware loader doesn't work with the builtin driver.
this should be fixed, too.


Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] mixer element types

2004-05-10 Thread Takashi Iwai
At Sat, 08 May 2004 20:32:04 +0200,
Ronald S. Bultje wrote:
 
 Hi,
 
 I'm working on properifying the ALSA support in GNOME Volume Control.
 When opening a sound mixer, I noticed that several elements will be both
 a capture and a playback element. Also, there is separate functions for
 setting the playback and the capture volume. How are those functions of
 the element related? If I set the playback volume, does this affect the
 capture volume on a hardware level? And what is the playback or capture
 part of this element supposed to visualize/abstractize?

the playback and the capture are independent.  they shouldn't affect
with eath other, and that's why there are different functions :)

basically, you should provide separated volume bars and toggle
switches for both playback and capture if two of them are provided.

 Also, I see several non-volume elements (switches? Things such as
 External Amplifier Power Down or 3D - switch). What are those? What do
 they do, what's their function, what do they visualize/abstractize on
 the hardware level?

each meaning depends strongly on the chip/driver.

 I'm asking all this to get an idea of how to picture those in GNOME
 Volume Control (for the first question: each function of the element as
 a separate track? Or all functions together as one track?; for the
 second question: as a checkbox? something else? omit completely?).

remember that the ALSA mixer interface doesn't provide the
well-abstracted mixer stuffs (yet).  they are almost as hardware
provides.  obviously we need another higher level abstraction.

IMO, there is no general design of the mixer, except for the very
basic elements like Master, PCM, etc.
look at Windows mixers - they all look differently.

hence, providing the mixer structure with an external db (e.g. via
XML) according to the driver/chip would be the best solution if you
write a generic mixer app.


Takashi


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Audio and Video sync. Getting Timestamps

2004-05-05 Thread Takashi Iwai
At Wed,  5 May 2004 11:13:20 +0200,
 [EMAIL PROTECTED] wrote:
 
 Mensaje citado por Takashi Iwai [EMAIL PROTECTED]:
 
  At Tue, 27 Apr 2004 20:36:29 +0200,
  Juan Carlos Granda wrote:
   
   [1  text/plain; iso-8859-1 (quoted-printable)]
   
   [2  text/html; iso-8859-1 (quoted-printable)]
   Hi,

   I'm developing a Multi-thread app for capturing audio+video and i have a
  few
   questions. The app is based on 3 threads:

- 1 thread for capturing audio using ALSA lib.
- 1 thread for capturing video using V4L2.
- 1 thread for saving audio+video into an AVI file.

   Both of capturing threads store captured data into a queue and the last
  thread picks
   the data and sync A/V.

   I start audio capturing and then the video. So, i need to known the point
  of the
   stream of audio the video begins.
   I'm readings frames by period size times. My prob is how to get valid ALSA
  timestamps
   to eliminate the previous frames of the period the video starts. I've
  tried
   snd_pcm_status_get_trigger_tstamp but it returns the same timestamp for a
  long period
   of time (13 secs) (is it related to the period or buffer time?). I've
  tried
   snd_pcm_status_get_tstamp too but i obtain a delay of several microseconds
  from the
   period time (50 - 100 more or less) (is it because the clock resolution?).
  
  the alsa-driver can put timestamp at each period update.
  set SND_TSTAMP_MMAP in snd_pcm_sw_params_set_tstamp_mode().
  
  
  Takashi
  
  
 
 I set SND_TSTAMP_MMAP like you told me. What function may i use? I've tried
 snd_pcm_status_get_trigger_tstamp and snd_pcm_status_get_tstamp, and the first
 always return the same timestamp or it changes every 4 or 6 seconds. And the
 second returns the now timestamp. What am i doing wrong?

no, you're not wrong, i overlooked that the SND_PCM_STATUS ioctl calls
the update of timestamp.  so, apparently there is no this timestamp
mode for the period-updates.

but, anyway, you can get the sound frame position and the timestamp at
the same time.  it should suffice to calculate the sync, i believe.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: Takashi, the via82xx patch I gave you is wrong!

2004-05-04 Thread Takashi Iwai
At Mon, 3 May 2004 19:24:33 -0400,
Ivica Ico Bukvic wrote:
 
 Hi Takashi,
 
 I tried all other numbers (1,2,4) and they generate xruns in
 aplay-soundcard which obviously suggests that they do not work. So, I guess
 3 is the only one that works with this particular setup.

thanks for the confirmation.
now fixed on CVS.  snd-via82xx driver should choose the 48k-fixed rate
automatically.


ciao,

Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] Fix a few debug messages in alsa-lib pcm_ladspa

2004-05-04 Thread Takashi Iwai
Hi,

thanks for the patch.  now it's on CVS.


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] busy-wait questions

2004-05-04 Thread Takashi Iwai
At Wed, 28 Apr 2004 23:09:36 +0200,
Giuliano Pochini wrote:
 
 
 
 After a lot of cleanups and coding style changes, my driver still has some
 things that must be fixed properly. Busy-waits are one of those.
 
 The most used busy-waits have a timeout of 10ms and 100ms and they are
 called with a spinlock_irq held or from the irq handler. With my card
 the longest wait I measured was 190us, so I guess it's ok.
 
 But two functions, read_dsp() and write_dsp() have a timeout of 10s. They
 are used exclusively for loading the DSP firmware and the ASICs. They are
 very fast on my card, but other cards (the driver supports 8 cards) may be
 slower. I was thinking about calling the scheduler in case of a long wait,
 but two cards need to reload the ASICs in order to switch between S/PDIF and
 ADAT and one card also has to reload the ASICs when the sample rate crosses
 the 50KHz boundary. Since those operations are protected by a spinlock, it's
 not a great idea to call the scheduler. Any hint ?  Perhaps we could just
 live with it, since the reload is not required very often...

the question is whether you really need spinlock to protect the
context with such a delay.  if the interrupt handler doesn't touch
with this data concurrently, you can protect it with mutex and do
schedule().


 While looking for examples I noticed that all busy waits in the ens1370
 driver have this form:
 
 for (t = 0; t  POLL_COUNT; t++) {
   if (inl())
   break;
 }
 
 IMHO it isn's correct because it waits for an amout of time that depends on
 the processor speed.

yes, it'd be better.  but it won't make big difference between
machines because the PCI bus speed is limited, and the loop count
above is big enough...


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Separate device for spdif on Sis si7012 ?

2004-05-04 Thread Takashi Iwai
At Tue, 27 Apr 2004 21:21:34 +0200,
Robert Rozman wrote:
 
 Hi,
 
 I have Asus pundit and I'm using analog outputs as 3 separate stereo
 channels (with some dmix problems that noone responded :-(  ...). Is it
 possible to ouput another stream to spdif connector on this device ?
 Is spdif supported as separate device ?

no, it's not possible so far.
SIS7012 seems not providing a separate DMA for SPDIF output.
(i cannot tell it's true in 100%, though, because we have no
 datasheet.)


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Audio and Video sync. Getting Timestamps

2004-05-04 Thread Takashi Iwai
At Tue, 27 Apr 2004 20:36:29 +0200,
Juan Carlos Granda wrote:
 
 [1  text/plain; iso-8859-1 (quoted-printable)]
 
 [2  text/html; iso-8859-1 (quoted-printable)]
 Hi,
  
 I'm developing a Multi-thread app for capturing audio+video and i have a few
 questions. The app is based on 3 threads:
  
  - 1 thread for capturing audio using ALSA lib.
  - 1 thread for capturing video using V4L2.
  - 1 thread for saving audio+video into an AVI file.
  
 Both of capturing threads store captured data into a queue and the last thread picks
 the data and sync A/V.
  
 I start audio capturing and then the video. So, i need to known the point of the
 stream of audio the video begins.
 I'm readings frames by period size times. My prob is how to get valid ALSA timestamps
 to eliminate the previous frames of the period the video starts. I've tried
 snd_pcm_status_get_trigger_tstamp but it returns the same timestamp for a long period
 of time (13 secs) (is it related to the period or buffer time?). I've tried
 snd_pcm_status_get_tstamp too but i obtain a delay of several microseconds from the
 period time (50 - 100 more or less) (is it because the clock resolution?).

the alsa-driver can put timestamp at each period update.
set SND_TSTAMP_MMAP in snd_pcm_sw_params_set_tstamp_mode().


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Digi96 driver question

2004-05-04 Thread Takashi Iwai
At Tue, 04 May 2004 17:41:09 +0200,
I wrote:
 
 At Tue, 4 May 2004 14:06:11 +0200,
 Anders Torger wrote:
  
  On Tuesday 04 May 2004 12.48, you wrote:
   in says under known bugs:
   
- 96kHz and 88.2kHz not accessible via PCM interface
   
   What does that mean? The card and driver does work in 96 and 88.2
kHz, I know that since I wrote the driver... but if there is some
sort of bug, I'd like to know.
  
   anders, i don't know, but it might mean that you can't set the SR to
   these values using the PCM interface. the hammerfalls are subject to
   the same limitation in a slightly different way. just a guess.
  
  You are probably right, I don't really know what the is meant by the PCM 
  interface though. If I can run the card in 96 kHz with
  
  aplay -r 96000 ...
  
  (which is possible) does that not mean that the PCM interface supports 
  96 kHz? Or does PCM interface refer to some interface within ALSA I 
  don't know about? I was thinking that PCM interface is the collection 
  of snd_pcm_*() functions, but perhaps I'm mistaken?
  
  The digi96 card runs either in ADAT or S/PDIF mode, it cannot do both at 
  the same time (as the hammerfall can). In ADAT mode, which in the 
  driver is represented as a separate device, it only supports 44.1 and 
  48 kHz. In S/PDIF mode it supports 32 - 96 kHz. I though perhaps this 
  is what has caused the bug report, but that is only a limitation in the 
  hardware, not a bug in the driver.
 
 maybe it's simply outdated.  i'll remove that one if aplay like above
 works.

it turned out that the entry snd-rme9652 matches with snd-rme96.
so, it was targeted to another driver...


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: Takashi, the via82xx patch I gave you is wrong!

2004-05-03 Thread Takashi Iwai
Hi Ico!

At Mon, 3 May 2004 4:49:46 +,
[EMAIL PROTECTED] wrote:
 
 Hi Takashi,
 
 Just realized that the dxs stuff needs to remain 3 (48k-only) after
 all for my notebook (m680x), otherwise I get evil xruns just using
 aplay - soundcard setup. My testing was flawed due to use of the new
 modprobe.conf. Hence, the patch should use the same vendor id/device
 id, but the setup should be 3 (48k-only). 

ok, i can change it to 3.

to be sure: does dxs_support=4 work?  it will allow the variable
bitrates but won't change the rate on AC97 codec.  mysteriously, this
works on some boards fine.  (even VIA guys don't know the reason about
this :)


thanks,

Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Help with supporting Emu10k1x and question

2004-05-03 Thread Takashi Iwai
At Sat, 01 May 2004 20:55:11 -0400,
Francisco Moraes wrote:
 
 Is there a way for find whether DMA is actually working? I think I am in
 the right track, but I'd like to know if there is a way to debug or find
 whether it is doing the expected and tranferring data to the sound card.

well, the practical way is to check the registers in runtime.
you can build a proc file for register dump, so that you can see it
during the operation.  (it's better than printk's from the operational
perspective :)

 Also, is the documentation on the new dma methods available somewhere?

there is no big change regarding the DMA methods.
the DMA buffer allocation was changed, but it's unlikely related with
the emu10k1x chip support...


Takashi


---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Bug #232 has been incorrectly closed.

2004-04-26 Thread Takashi Iwai
At Mon, 26 Apr 2004 12:59:07 +0100,
James Courtier-Dutton wrote:
 
 Bug #232 has been incorrectly closed, but I can't reopen it because I 
 cannot [ Add Bugnote ]. I click on the [ Add Bugnote ] link, but nothing 
 happens.

did you reopen the bug?  (Jaroslav already did it)


 Summary: That sound card still does not work correctly even after using 
 the latest cvs which was supposed to fix the bug.

the symptom sounds like an interrupt problem.
first, try to play with ACPI or PCI IRQ routing boot options.  it
often fixes this kind of bug.


--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org


---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Adding module to ALSA tree with Kconfig script

2004-04-26 Thread Takashi Iwai
At Mon, 26 Apr 2004 09:54:44 -0500,
Perry Gilfillan wrote:
 
 I've looked at the revised Writing an ALSA Driver chapter 14, and 
 still can't get it straight.  The first hurdle is creating a Kconfig 
 script in the alsa-kernel/i2c directory.  This is what I came up with:

i2c directory is for the common i2c modules.  this isn't the place to
put the card driver.  if it's a PCI card, put it under pci directory.
or, if it's a generic driver, you can put it into drivers directory.


 Chapter 14 has the second line written as 'extra-obj-$( ', so I 
 tried it both ways.

argh, it's a typo.  obj-$(CONFIG_) is correct.


 I'm building against a 2.4.25 kernel, so how do I invoke the Kconfig 
 scripts?

ALSA configure script checks Kconfig and generates the proper
configuration for older kernels, too.  you don't need extra setting.


Takashi


---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] dxs_support and via82xx (yet once more)

2004-04-23 Thread Takashi Iwai
At Fri, 23 Apr 2004 4:12:57 +,
[EMAIL PROTECTED] wrote:
 
 Hi all, 
  
 Apologies for my persistence but is this feature 
 broken in the 1.0.4.pre2 drivers or am I simply 
 unable to put the right syntax into the 
 modules.conf? 
  
 alias char-major-116 snd 
 alias char-major-14 soundcore 
 alias snd-card-0 via82xx 
   ^^^
   snd-via82xx
 #I tried every possible option 
 options via82xx dxs_support=1 

this line is useless.

 options snd-card-0 dxs_support=1 
 options snd-via82xx dxs_support=1 
  
 alias sound-slot-0 snd-card-0 
 alias sound-service-0-0 snd-mixer-oss 
 alias sound-service-0-1 snd-seq-oss 
 alias sound-service-0-3 snd-pcm-oss 
 alias sound-service-0-8 snd-seq-oss 
 alias sound-service-0-12 snd-pcm-oss 
  
 Even with all this the syslog still complains: 
 via82xx: Assuming DXS channels with 48k fixed 
 sample rate. 
  Please try dxs_support=1 or 
 dxs_support=4 option 
  and report if it works on your machine. 
  
 What am I doing wrong? 

make sure that there is another defitions of snd-via82xx options in
/etc/modules.conf or its variants.


--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org


---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] dxs_support and via82xx (yet once more)

2004-04-23 Thread Takashi Iwai
At Fri, 23 Apr 2004 12:56:35 -0400,
Ivica Ico Bukvic wrote:
 
   alias char-major-116 snd
   alias char-major-14 soundcore
   alias snd-card-0 via82xx
 ^^^
 snd-via82xx
 
 Hmmm, but somewhere along the road while troubleshooting this/installing
 something told me (a script) that I should drop the snd- prefix. Are you
 saying that I still need snd- prefix? The alsa init does succeed after all
 even with only via82xx (modprobing) so that's why I am asking.

yes, the module name still consists of snd- prefix.
the snd_ prefix was dropped from the module OPTIONS.
(e.g. dxs_support would have been named as snd_dxs_support in the old
 versions.)

   #I tried every possible option
   options via82xx dxs_support=1
  
  this line is useless.
 
 Because it's missing snd- prefix? (I removed the hdsp stuff from the
 modules.conf for the better legibility but using cards without snd- prefix
 seemed to work just fine, so I am guessing that snd- is needed for the
 options call only, or am I misunderstanding this?)

snd- prefix is for the module NAMES, but not for module OPTIONS.
again, there is no via82xx module.  there is only snd-via82xx module.
defining the options for via82xx is useless because options for a
non-existing module will be never referred.


   options snd-card-0 dxs_support=1

this one is also useless.  remove it.
(snd-card-0 is just an alias, not the real module name.)


   options snd-via82xx dxs_support=1
 
 Shouldn't this then work?

yes, in theory it should work.
that's why i asked you to make sure any other definitions exist.
there must be another error in the configuration.


BTW, i assume that are you using 2.4 kernel.  is it right?


Takashi


---
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] plug:iec958 problems

2004-04-22 Thread Takashi Iwai
At Wed, 21 Apr 2004 20:57:37 +0200,
Martin Soto wrote:
 
 Hello Takashi!
 
 On Tue, 2004-04-20 at 12:36, Takashi Iwai wrote:
  At Sat, 17 Apr 2004 22:58:57 +0200,
  Martin Soto wrote:
   As an additional note, this only seems to happen when using plug:iec958.
   Software decoding the AC3 sound and plying through ALSA, works
   flawlessly, despite of the fact that the machine load is higher.
  
  is there any different if you get rid of plug: ?
  as long as the h/w support 16bit LE data, AC3 should work without
  plug.
 
 I just tested. There seems to be no difference. I tried with iec958: and
 spdif: instead of plug:iec958:. The problem persists. 

ok, thanks for the confirmation.

 As I said, putting the process in SCHED_FIFO mode doesn't make any
 difference at all. Almost any machine activity (any process being active
 for more than a fraction of a second) is enough to interrupt the sound.
 Does the library use some auxiliary process to play through spdif?

the problem seems to be hardware-specific.  either the hardware itself
has a problem (e.g. PCI irq routing), or some driver takes the context
for too long time.

did you try the preempt kernel?  it won't solve all the cases but some
of them (the long context without spinlock).


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALI M5451 (CMI 9739): PCM always muted?

2004-04-21 Thread Takashi Iwai
At Wed, 21 Apr 2004 15:28:03 +0400,
Sergey Vlasov wrote:
 
 [1  text/plain; us-ascii (7bit)]
 On Tue, Apr 20, 2004 at 09:25:12PM +0200, Bernhard Rosenkraenzer wrote:
  On Tuesday 20 April 2004 20:39, Sergey Vlasov wrote:
  On an ALI M5451 (Using a CMI 9739 - PCI ID 10b9:5451 Sub-ID
  1019:0f22), snd_ali5451 loads and can adjust mixer settings (except
  for PCM volume, but I think that's a limitation of the hardware), but
  doesn't make any noise - apparently PCM is always muted (volume fixed
  at 0?).
  
   And what does amixer contents show?
  
  numid=35,iface=MIXER,name='IEC958 Playback Switch'
; type=BOOLEAN,access=rw---,values=1
: values=on
  numid=39,iface=MIXER,name='IEC958 Capture Monitor'
; type=BOOLEAN,access=rw---,values=1
: values=on
 
 Did you try to turn these things off?

yes 'iec958 capture monitor' should be off, at least.

  numid=42,iface=MIXER,name='External Amplifier'
; type=BOOLEAN,access=rw---,values=1
: values=on
 
 Or maybe this (who knows where it is hooked really).

this should be on.  (it's no longer 'power down' switch).

--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALI M5451 (CMI 9739): PCM always muted?

2004-04-21 Thread Takashi Iwai
At Wed, 21 Apr 2004 14:04:54 +0200,
Nico Schottelius wrote:
 
 [1  text/plain; us-ascii (quoted-printable)]
 Takashi Iwai [Tue, Apr 20, 2004 at 12:39:35PM +0200]:
  At Sat, 17 Apr 2004 19:45:35 +0200,
  Bernhard Rosenkraenzer wrote:
   
   Hi,
   On an ALI M5451 (Using a CMI 9739 - PCI ID 10b9:5451 Sub-ID 1019:0f22), 
   snd_ali5451 loads and can adjust mixer settings (except for PCM volume, but I 
   think that's a limitation of the hardware), but doesn't make any noise - 
   apparently PCM is always muted (volume fixed at 0?).
  
  there is no PCM volume on CM9739.  it has only PCM mute switch.
  you can mute on/off via 'M' key of alsamixer.
 
 Does that mean I have _no_ possibility to adjust the volume?

right.  it doesn't support the PCM volume but you can basically adjust
the master volume.

 How do I find out if I got the CM9739? This is what lspci shows:

you can see it in /proc/asound/card0/codec97#0/ac97#0-0.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] plug:iec958 problems

2004-04-20 Thread Takashi Iwai
At Sat, 17 Apr 2004 22:58:57 +0200,
Martin Soto wrote:
 
 As an additional note, this only seems to happen when using plug:iec958.
 Software decoding the AC3 sound and plying through ALSA, works
 flawlessly, despite of the fact that the machine load is higher.

is there any different if you get rid of plug: ?
as long as the h/w support 16bit LE data, AC3 should work without
plug.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ice1724, routing oss playing back to spdif

2004-04-20 Thread Takashi Iwai
At Sun, 18 Apr 2004 00:50:32 +0400,
Andrew Gaydenko wrote:
 
 Hi,
 
 The aim is to route oss-only-playing-back-software to spdif out.
 Is it possible? I use ice1724 driver.

it's possible through ALSA-OSS emulation library, but not through the
kernel OSS emulation.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALI M5451 (CMI 9739): PCM always muted?

2004-04-20 Thread Takashi Iwai
At Sat, 17 Apr 2004 19:45:35 +0200,
Bernhard Rosenkraenzer wrote:
 
 Hi,
 On an ALI M5451 (Using a CMI 9739 - PCI ID 10b9:5451 Sub-ID 1019:0f22), 
 snd_ali5451 loads and can adjust mixer settings (except for PCM volume, but I 
 think that's a limitation of the hardware), but doesn't make any noise - 
 apparently PCM is always muted (volume fixed at 0?).

there is no PCM volume on CM9739.  it has only PCM mute switch.
you can mute on/off via 'M' key of alsamixer.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Abadoned driver - who to contact?

2004-04-19 Thread Takashi Iwai
At Fri, 16 Apr 2004 22:06:31 +0200,
Nico Schottelius wrote:
 
 Hello!
 
 Looks like no-one is maintaining the ali5451 driver, which is broken.
 Who to contact / who could know things about it? Matt Wu is not reachable,
 his email disappeared.

report here or ALSA BTS.


thanks,

Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] PATCH Aureal Vortex.

2004-04-19 Thread Takashi Iwai
At Fri, 16 Apr 2004 21:47:20 +0200,
Martin Langer wrote:
 
 On Tue, Apr 13, 2004 at 05:41:48PM +0200, Takashi Iwai wrote:
  
  i removed the definitions of PCI_ID_XXX, since they are
  already in the public header.  for the 2.4 system we have already a
  local pci-ids.h in alsa-driver/pci/au88x0.
 
 Just noticed that one pci id isn't there...

applied to cvs.


thanks,

Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Recent regression of ALC655 on VIA

2004-04-16 Thread Takashi Iwai
At Fri, 16 Apr 2004 15:25:42 +0800,
R CHAN wrote:
 
 Hi, recent Alsa changes (ac97_patch.c) seem to have broken my
 ALC655 ac97 codec on via82xx. The breakage happened around 2.6.5.
 
 Specifically, I can no longer set
 
 Mic As Center/LFE control
 
 Unlike Line-In As Surround it is now reported
 as a volume control with Mono values from 0-0.
 Can't set that bit at all.

try the attached patch.

 Secondly, I can't get 5.1 sound at all - though
 duplicate front does work.

doesn't 'aplay -Dsurroun51 some-6ch-sample.wav' work?


Takashi
Index: alsa-kernel/pci/ac97/ac97_codec.c
===
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v
retrieving revision 1.117
diff -u -r1.117 ac97_codec.c
--- alsa-kernel/pci/ac97/ac97_codec.c   14 Apr 2004 17:23:52 -  1.117
+++ alsa-kernel/pci/ac97/ac97_codec.c   16 Apr 2004 14:28:38 -
@@ -880,7 +880,7 @@
.info = snd_ac97_info_single,
.get = snd_ac97_get_single,
.put = snd_ac97_put_spsa,
-   .private_value = AC97_EXTENDED_STATUS | (4  8) | (3  16) | (0  
24),
+   .private_value = AC97_SINGLE_VALUE(AC97_EXTENDED_STATUS, 4, 3, 0)
},
 };
 
Index: alsa-kernel/pci/ac97/ac97_local.h
===
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_local.h,v
retrieving revision 1.4
diff -u -r1.4 ac97_local.h
--- alsa-kernel/pci/ac97/ac97_local.h   23 Oct 2003 17:00:15 -  1.4
+++ alsa-kernel/pci/ac97/ac97_local.h   16 Apr 2004 14:24:56 -
@@ -22,10 +22,11 @@
  *
  */
 
+#define AC97_SINGLE_VALUE(reg,shift,mask,invert) ((reg) | ((shift)  8) | ((mask)  
16) | ((invert)  24))
 #define AC97_SINGLE(xname, reg, shift, mask, invert) \
 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ac97_info_single, \
   .get = snd_ac97_get_single, .put = snd_ac97_put_single, \
-  .private_value = (reg) | ((shift)  8) | ((mask)  16) | ((invert)  24) }
+  .private_value =  AC97_SINGLE_VALUE(reg, shift, mask, invert) }
 
 /* ac97_codec.c */
 extern const char *snd_ac97_stereo_enhancements[];
Index: alsa-kernel/pci/ac97/ac97_patch.c
===
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v
retrieving revision 1.43
diff -u -r1.43 ac97_patch.c
--- alsa-kernel/pci/ac97/ac97_patch.c   7 Apr 2004 10:03:31 -   1.43
+++ alsa-kernel/pci/ac97/ac97_patch.c   16 Apr 2004 14:26:27 -
@@ -1090,6 +1090,7 @@
.info = snd_ac97_info_single,
.get = snd_ac97_alc650_mic_get,
.put = snd_ac97_alc650_mic_put,
+   .private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
},
 };
 
@@ -1190,6 +1191,7 @@
.info = snd_ac97_info_single,
.get = snd_ac97_alc655_mic_get,
.put = snd_ac97_alc655_mic_put,
+   .private_value = AC97_SINGLE_VALUE(0, 0, 1, 0) /* only mask needed */
},
 };
 


Re: [Alsa-devel] EZ8 ADAT I/O card (ICE1712 chipset)

2004-04-13 Thread Takashi Iwai
Doug,

At Fri, 09 Apr 2004 13:59:58 -0400,
Doug McLain wrote:
 
 Whats the word on this patch? Does something need to change?  Is it ok 
 as is?

sorry i've been too busy for other works for these weeks.
i'll check your patch now.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd_trident in 2.6.5 doesn't work after suspending to disk.

2004-04-13 Thread Takashi Iwai
At Fri, 9 Apr 2004 13:18:42 +0200 (CEST),
Jaroslav wrote:
 
 On Fri, 9 Apr 2004, Jakob Lell wrote:
 
  Hi,
  I'm using Linux 2.6.5 and the driver snd_trident. When I suspend to
  disk (echo -n 4  /proc/acpi/sleep) and resume again, the sound driver
  won't work any more. It will work again after running rmmod
  snd_trident;modprobe snd_trident. However, to do so I have to kill all
  programs using sound (i.e. artsd, mplayer,...). Is there any way to
  make sound work again after suspending without terminating all
  this programs?
 
 The trident driver does not have suspend/resume code yet.

it does, but IIRC it's untested...

BTW, ACPI suspend on 2.6.x seems problematic with the current ALSA
implementation.  i'll work on this, too.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] [PATCH] cleanup pci init routines

2004-04-13 Thread Takashi Iwai
Hi,

thanks for the patch.  i applied it to CVS.  the message doesn't make
sense on 2.6 kernels at all...
(sorry for the delay, i've had no time for ALSA for these weeks.)


ciao,

Takashi


At Sat, 20 Mar 2004 21:15:41 -0500,
Jeff Muizelaar wrote:
 
 the attached patch basically does this for the pci drivers in alsa-kernel


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] sfxload / asfxload page allocation failure

2004-04-13 Thread Takashi Iwai
At Tue, 13 Apr 2004 12:37:10 +0100,
holborn wrote:
 
 
 Hi!
 
 I have problems when i try to load big soundfonts, in older versions i was 
 load this soundfonts without probems.
 
 when i run sfxload or asfxload with PC51f.sf2 (for example ... ) asfxload or 
 sfxload try to load but no returnd to command line. No way to kill the 
 process, no way to load other soundfonts and when i reboot i have this 
 message:

well, it means that your machine has really no RAM available for the
soundfont.  on 2.4 kernel (or older ALSA version), the driver
allocated the pages in atomic, so it doesn't go to sleep.
on 2.6 and current ALSA, the page allocation is done with GFP_KERNEL,
so it may sleep until the page is available.  it can take a long time
but must not be infinitely long.

could you check whether the page allocation failure message already
appeared when sfxload hangs up?
does the message appears once or many times?


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] PATCH Aureal Vortex.

2004-04-13 Thread Takashi Iwai
At Fri, 09 Apr 2004 13:43:03 -0400,
Manuel Jander wrote:
 
 Please apply the following patch. It was designed against linux-2.6.5,
 but applies cleanly against alsa-driver-1.0.4 this way:

applied now.  i removed the definitions of PCI_ID_XXX, since they are
already in the public header.  for the 2.4 system we have already a
local pci-ids.h in alsa-driver/pci/au88x0.


thanks!

Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] sfxload / asfxload page allocation failure

2004-04-13 Thread Takashi Iwai
At Tue, 13 Apr 2004 17:22:52 +0100,
holborn wrote:
 
 On Martes 13 Abril 2004 16:27, Takashi Iwai wrote:
  At Tue, 13 Apr 2004 12:37:10 +0100,
 
 
 
  well, it means that your machine has really no RAM available for the
  soundfont.  on 2.4 kernel (or older ALSA version), the driver
  allocated the pages in atomic, so it doesn't go to sleep.
  on 2.6 and current ALSA, the page allocation is done with GFP_KERNEL,
  so it may sleep until the page is available.  it can take a long time
  but must not be infinitely long.
 
  could you check whether the page allocation failure message already
  appeared when sfxload hangs up?
  does the message appears once or many times?
 
 
 
 Hi ... the message appears after reboot command ... 
 I have load this soundfonts for years :-)
 No problems to load the soundfont in kernel 2.6.4 alsa 1.0.2c but still no 
 load in 2.6.5, i checked in two machines gentoo and Debian .. 
 
 
 I made the sfxload after booting ... 
 
 
 free command after login is:
 
 Mem total 515728used 37940free 477788    in kernel 2.6.5
 Mem total 515728used 38916free 476824    in kernel 2.6.4

hmm, then it shouldn't fail.  
i guess the attached patch fixes the problem.  please give a try.


Takashi
Index: alsa-kernel/core/memalloc.c
===
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/memalloc.c,v
retrieving revision 1.30
diff -u -r1.30 memalloc.c
--- alsa-kernel/core/memalloc.c 7 Apr 2004 17:49:39 -   1.30
+++ alsa-kernel/core/memalloc.c 13 Apr 2004 16:58:05 -
@@ -137,14 +137,17 @@
 dma_addr_t *dma_handle, int flags)
 {
void *ret;
-   u64 dma_mask;
+   u64 dma_mask, coherent_dma_mask;
 
if (dev == NULL || !dev-dma_mask)
return dma_alloc_coherent(dev, size, dma_handle, flags);
dma_mask = *dev-dma_mask;
+   coherent_dma_mask = dev-coherent_dma_mask;
*dev-dma_mask = 0x;/* do without masking */
+   dev-coherent_dma_mask = 0x;/* do without masking */
ret = dma_alloc_coherent(dev, size, dma_handle, flags);
*dev-dma_mask = dma_mask;  /* restore */
+   dev-coherent_dma_mask = coherent_dma_mask; /* restore */
if (ret) {
/* obtained address is out of range? */
if (((unsigned long)*dma_handle + size - 1)  ~dma_mask) {
@@ -154,8 +157,12 @@
}
} else {
/* wish to success now with the proper mask... */
-   if (dma_mask != 0xUL)
+   if (dma_mask != 0xUL) {
+   /* allocation with GFP_ATOMIC to avoid the long stall */
+   flags = ~GFP_KERNEL;
+   flags |= GFP_ATOMIC;
ret = dma_alloc_coherent(dev, size, dma_handle, flags);
+   }
}
return ret;
 }


Re: [Alsa-devel] CMI9780 and ALSA volume control

2004-04-13 Thread Takashi Iwai
At Mon, 12 Apr 2004 11:04:55 +0800,
C.L. Tien [EMAIL PROTECTED] wrote:
 
 9780 has no PCM volume control, master volume control doesn't
 control the PCM, either. This feature is the same as other C-Media
 AC97 Codecs. 
 
 I once posted a patch that tune PCM volume in SW way (change PCM
 data in DMA buffer), but it was not accepted. 

IMO, doing this s/w volume in the driver is not the optimal
solution.  i prefer having this feature in alsa-lib. 

the only drawback of implementing in alsa-lib is that the kernel OSS
emulation cannot support it, and that would surely annoy people.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] power-management code clean up on CVS

2004-04-08 Thread Takashi Iwai
Hi,

this is another big update of the whole trees.
i modified the power-management routines in alsa-kernel and
alsa-driver.  with this change, each card driver needs only suspend
and resume callbacks and a single registration function.
the corresponding section of writing-an-alsa-driver document is also
updated.

i'll try to implement the suspend/resume code of some missing drivers
for software suspend.

the 2.2/2.4 kernels should be ok, but untested yet.  please report if
any problem occurs by this change.


thanks,

Takashi (will be offline for the easter vacation...)


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] OSS mapping for ALSA controls

2004-04-08 Thread Takashi Iwai
At Thu, 8 Apr 2004 10:59:50 +0530,
Pavana Sharma wrote:
 
 yes, I did this as root ..

hmm, it works for me.

# echo 'VOLUME Line Playback 0'  /proc/asound/card0/oss_mixer
# cat /proc/asound/card0/oss_mixer  | grep VOLUME
VOLUME Line Playback 0


Takashi


 -Original Message-
 From: Takashi Iwai [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, April 07, 2004 11:40 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [Alsa-devel] OSS mapping for ALSA controls
 
 
 At Wed, 7 Apr 2004 19:38:18 +0530,
 Pavana Sharma wrote:
  
  Hi,
  
  I am trying to map my ALSA driver (for ARM) controls with OSS default
  controls.
  
  I am using this method, to change/update assignment in /proc file.
  but I am not seeing any changes in my /proc/asound/card0/oss_mixer file.
  % echo 'VOLUME Master Playback 0'  /proc/asound/card0/oss_mixer
 
 it should be ok.  did you do it as root?
 
 
 Takashi
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 Alsa-devel mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/alsa-devel
 


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: Sleep fix for iBook 800 sound

2004-04-07 Thread Takashi Iwai
Hi,

At Wed, 07 Apr 2004 16:35:11 +1000,
Benjamin Herrenschmidt wrote:
 
 On Wed, 2004-04-07 at 16:25, Ian McKellar wrote:
  So, 
  
  I have an iBook 800Mhz and since I've moved to alsa and linux 2.6 I've
  had issues with sound oopsing in sleep, kind of like this:
 
 Is sound working at all ? I suspect you didn't have the i2c-keywest
 module insmod'ed. There is indeed a problem in all our i2c based
 sound drivers where we don't always check that the i2c client was
 instanciated before doing some things...
 
 Takashi, how is this patch ?

yes, the patch is fine, but i guess it won't fix Ian's mixer problem
after resume.  the real problem is that i2c.client is reset to NULL in
sleep_notify callback.

i just took a quick look at dmasound code again, but the code path
looks almost same, i.e.

sleep_notify_callback(PBOOK_WAKE)
- leave_sleep callback
- resume mixer values

maybe dmasound resumes the mixer setting in somewhere else, too?


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] OSS mapping for ALSA controls

2004-04-07 Thread Takashi Iwai
At Wed, 7 Apr 2004 19:38:18 +0530,
Pavana Sharma wrote:
 
 Hi,
 
   I am trying to map my ALSA driver (for ARM) controls with OSS default
 controls.
 
   I am using this method, to change/update assignment in /proc file.
   but I am not seeing any changes in my /proc/asound/card0/oss_mixer file.
   % echo 'VOLUME Master Playback 0'  /proc/asound/card0/oss_mixer

it should be ok.  did you do it as root?


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] new module_param*() functions

2004-04-07 Thread Takashi Iwai
Hi,

i just converted the codes in alsa-kernel tree to use the new
module_param*() functions for 2.6 kernels.  with this change, the boot
parameters can be set up much more easily.

2.2/2.4 kernels should be ok after running cvscompile.  just ignore
the compile warnings 'boot_devs not used' on 2.2/2.4 kernels, it's a
side effect of this conversion.

please report here if you have problems.


thanks,

Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] 1.0.4 snd-pcm.o dma_xxx errors

2004-04-03 Thread Takashi Iwai
At Sat, 3 Apr 2004 21:54:03 +0200 (CEST),
Jaroslav wrote:
 
 On Sat, 3 Apr 2004, Andrew Gaydenko wrote:
 
  Just have tried 1.0.4. etc/init.d/alsasound restart gives:
  
  Starting sound driver: snd-ice1724 
  /lib/modules/2.4.25-lck1/kernel/sound/acore/snd-pcm.o: unresolved symbol 
  snd_dma_alloc_pages_Rsmp_2cbfa9e2
  /lib/modules/2.4.25-lck1/kernel/sound/acore/snd-pcm.o: unresolved symbol 
  snd_dma_set_reserved_Rsmp_77de065d
  
  As you see. I have 2.4.25 kernrl with lck1 patch.
 
 It looks that snd-page-alloc module is old or missing.

alsasound stop won't unload the snd-page-alloc module for keeping
the DMA buffers.  you have to rmmod it manually once when
snd-page-alloc is updated.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] problems using select() on alsa pcm.

2004-03-25 Thread Takashi Iwai
At Thu, 25 Mar 2004 11:25:56 +0100,
Martijn Sipkema wrote:
 
  open pcm, and get a handle.
  
  snd_pcm_poll_descriptors(handle, pfd, err);
  
  Get a poll file scriptor in pfd.
  
  select(nfds, rfds, wfds, efds, tvp);
  
  Is it possible to use this call with alsa ?
  
  select is generally deprecated in linux (linus says so!). but you can
  use the same pfds in select as in poll (select is implemented in the
  kernel using the poll code). the problem is interpreting the results
  you get back (as noted recently for the dmix plugin).
 
 select and pselect do allow for a more accurate timeout specification.

from the spec, yes.  but nsec resolution would be never implemented :)

 Why is select deprecated?

because select is just a wrapper of poll in fact (on linux)?


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Problems running latencytest: error setting freq 1024

2004-03-24 Thread Takashi Iwai
At Tue, 23 Mar 2004 22:42:05 +0100,
Frank Barknecht wrote:
 
 Hallo,
 Paul Davis hat gesagt: // Paul Davis wrote:
 
  $ measure -p ./out/x11.png -o ./out/x11.out -c 0 -f 1024 -n 2 -t 2
  I get this error message: error setting freq 1024
  
  probably a permissions problem. try it as root.
 
 This is while runng at root. (Sorry for the $ I typed that one by
 hand). 
 
 A tip from Tim Goetze to do: 
 
  # echo 2048  /proc/sys/dev/rtc/max-user-freq
 (^ sic!)
 
 didn't help either yet. I did a strace on the measure run now, which
 showed something equally strange (to my eyes): 
 
 mlockall(MCL_CURRENT|MCL_FUTURE)= 0
 sched_get_priority_max(0x1) = 99
 sched_setscheduler(0, 0x1, 0xbfffe254)  = 0
 open(/dev/midi0, O_RDWR)  = 3
 ioctl(3, 0x40047401, 0x400) = -1 ENOTTY (Inappropriate ioctl for device)
 write(2, error setting freq 1024\n, 24) = 24
 exit_group(1)   = ?

please make sure that you loaded latency-test module.


 I'm still puzzled. Why /dev/midi0?

that's because the latency-test kernel module requires a device file
for ioctls.  i chose it simply because the file is unused (it's for
tclmidi).

BTW, i uploaded latencytest-0.5.3.  it includes i/o workloads in
parallel.

http://www.alsa-project.org/~iwai/latencytest-0.5.3.tar.gz


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Problems with the intel8x0 driver

2004-03-18 Thread Takashi Iwai
At Thu, 18 Mar 2004 18:41:00 +0100,
Fredrik Smedberg wrote:
 
 Hi!
 
 i810: Intel ICH4 mmio at 0xfcd80400 and 0xfcd82600
 i810_audio: Primary codec has ID 1
 i810_audio: Audio Controller supports 6 channels.
 i810_audio: Defaulting to base 2 channel mode.
 i810_audio: Resetting connection 0
 i810_audio: Connection 0 with codec id 1
  ^^

you loaded both OSS and ALSA devices.
there is a bug in OSS driver which doesn't check the return value of
resource allocation.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] Problems with the intel8x0 driver

2004-03-18 Thread Takashi Iwai
At Thu, 18 Mar 2004 19:39:15 +0100,
Fredrik Smedberg wrote:
 
 Hi!
 
 The latest test I did with 2.6.5-rc1 I'm very sure I didn't compile
 in anything in the kernel except things I needed + ALSA and I got a
 kernel panic. No OSS included in the kernel or loaded by modules... 

could you get the kernel message with that status, if possible?


Takashi

 
 Thanks,
 Fredrik Smedberg
 
 On Thu, 18 Mar 2004 18:57:54 +0100
 Takashi Iwai [EMAIL PROTECTED] wrote:
 
  At Thu, 18 Mar 2004 18:41:00 +0100,
  Fredrik Smedberg wrote:
   
   Hi!
   
   i810: Intel ICH4 mmio at 0xfcd80400 and 0xfcd82600
   i810_audio: Primary codec has ID 1
   i810_audio: Audio Controller supports 6 channels.
   i810_audio: Defaulting to base 2 channel mode.
   i810_audio: Resetting connection 0
   i810_audio: Connection 0 with codec id 1
^^
  
  you loaded both OSS and ALSA devices.
  there is a bug in OSS driver which doesn't check the return value of
  resource allocation.
  
  
  Takashi
 


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] ALSA driver 1.0.2c: divide by zero oops

2004-03-16 Thread Takashi Iwai
At Tue, 16 Mar 2004 08:45:00 +1030 (CST),
Jonathan Woithe wrote:
 
   I have been trying cinelerra 1.1.9 in OSS mode against the OSS emulation
   driver (snd-pcm-oss) from ALSA driver 1.0.2c. Whenever anything is done to
   start audio playback (such as playing a video clip) the ALSA driver panics
   with a divide by zero error.  The decoded oops is found below.
   
   Under native OSS from 2.4.23 cinelerra works fine.  Furthermore, all other
   OSS applications I've tried against ALSA driver 1.0.2c seem to be fine. 
   Thus the problem seems to be associated with the way cinelerra does things -
   something it does is upsetting ALSA but is fine under native OSS.  Of
   course, even a misbehaving application not running as root should not be
   able to panic the kernel.
  
  sure.  what soundcard/soundchip are you using?
 
 It's an Ensoniq AudioPCI card with the ES-1370 chipset.
 
  also, did you compile with the debug option?
 
 No.  Should I?  I'm guessing you may be after further debugging output
 here - if so, what would you like me to do (after compiling with the debug
 option)?

please turn on the debug option.  it will help to catch the bug there,
at least we can know whether it's really zero division.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: Fw: [Alsa-devel] drivers in alsa-driver tree with 2.6 kernels

2004-03-16 Thread Takashi Iwai
At Tue, 16 Mar 2004 00:14:40 +0100,
Luca Capello wrote:
 
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hello,
 
 on 03/11/04 17:01, Sasha Khapyorsky wrote:
  Takashi, ALSA maintainer, is asking now for confirmations of 'intel8x0m'
  AC97 modem driver usage.
  If you are using this you may report your case to
  [EMAIL PROTECTED] - then the driver will be submitted to
  2.6 linux kernel tree.
 cut
  Begin forwarded message:
 
  Date: Thu, 11 Mar 2004 14:27:59 +0100
  From: Takashi Iwai [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: [Alsa-devel] drivers in alsa-driver tree with 2.6 kernels
 cut
  does anyone use the following drivers with a 2.6 kernel successfully?
  if it's confirmed, i'd like to move them to alsa-kernel tree, so that
  they can be submitted to 2.6 linux tree soon.
 cut
  - snd-intel8x0m
 I successfully used 'snd-intel8x0m' on my ancient laptop, an ASUS M3410C:
  http://luca.pca.it/projects/asus/m3410c/
 
 My success post on the '[EMAIL PROTECTED]' mailing-list is here:
  http://linmodems.org/cgi-bin/ezmlm-cgi?1:mss:13083:200402:pkpdkliklhpapcodpmop
 
 I already posted on '[EMAIL PROTECTED]'
  http://sourceforge.net/mailarchive/forum.php?thread_id=3847625forum_id=1751
 while it seems that my post never reached '[EMAIL PROTECTED]'.
 
 ASAP I'll try with my new laptop (an ASUS M6842NWH, M6800N family), just to have
 another confirmation.

thanks everyone who reported about intel8x0m driver.
it's already in the alsa-kernel tree and Linus' 2.6.5-rc1.

please give a try.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] snd-usb-audio and midisport1x1 little hack fixes hotplug pb

2004-03-16 Thread Takashi Iwai
At Sat, 13 Mar 2004 04:32:34 +0100,
Mathieu Geli wrote:
 
 Ok, I applied your second patch, and get this dmesg output:
 
 drivers/usb/core/usb.c: deregistering driver snd-usb-audio
 ALSA /home/mathieu/alsa-driver/usb/usbaudio.c:2944: snd_usb_audio_disconnect called, 
 refcount = 1
 ALSA /home/mathieu/alsa-driver/usb/usbaudio.c:2944: snd_usb_audio_disconnect called, 
 refcount = 0
 ALSA /home/mathieu/alsa-driver/alsa-kernel/usb/usbmidi.c:148: urb status -104
 ALSA /home/mathieu/alsa-driver/alsa-kernel/usb/usbmidi.c:134: usb_submit_urb: -32

this means that the urbs are still active.  i'm not sure whether these
messages appear after or before calling snd_usbmidi_disconnect(),
though.

 At this point the usb was down not responding anymore, like in the past.
 
 what I did next, is put double each interesting lines printk, what I
 get is, that the rmmod of the driver was hanging on the midi
 ressources cleaning stuff. 
 Hum, first reflex: I just comment out those 3 lines =) and guess
 what.. that works fine now. I tried to plug/unplug several times my
 mouse, the midisport, and everything 
 works fine, so... I don't really know what was the bug's reason, but
 as long as that works I'm happy ;-) 

i also don't know yet why disconnect() call hangs up.
could you check at which point it happens by adding printk()'s in
snd_usbmidi_disconnect()?

the resource release can work even without disconnect() call, since
the clean up will be done later also by the workqueue when all devices
are closed properly.  the disconnect function should shut up possible
hardware features immediately.


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] No more beep under kernel 2.6

2004-03-15 Thread Takashi Iwai
At Fri, 12 Mar 2004 23:48:53 +0100,
Laurent Bigonville wrote:
 
 [1  text/plain; US-ASCII (7bit)]
 Hi,
 
 I have installed the last kernel version and I have no more beep but I 
 still have sounds.(no problem under 2.4)
 I tried both with the included kernel version and some previous version 
 but nothing change...
 I have no more 'beep' slide in the mixer.(I don't have the PCM one 
 either, i don't know if it's related)
 My computer is a mac G4 (the first with AGP), the sound chipset is the 
 screamer one.
 
 Someone have a clue?

the beep function was removed in the 2.6 tree due to the change of
console/input interface.  unfortunately, since i have no powermac
machine now, it's hard to debug...


Takashi


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


  1   2   3   4   5   6   7   8   9   10   >