[Alsa-devel] plughw or hw?
Hi! I'm porting my application from ALSA-0.5 to ALSA-0.9 and I don't understand ASCII identifier of the PCM handle which is a parameter of the snd_pcm_open function. I'd like to implement an user friendly sound card configuration dialog. This is a screenshot of the previous one: http://www.eminent.sk/s-lab/images/creox4.png What is a difference between an ASCII identifier plughw:0,0 and hw:0,0? And what the output of 'aplay -L' means? I just want to know a number of installed sound cards and number of subdevices for every card and I'd like to have a possibility to open the right card and a subdevice according user's choice. I think that ALSA-0.5 interface was much better in these things... Thank you for each answer! jozef kosoru http://www.pobox.sk/ - prvy slovensky freemail ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] plughw or hw?
What is a difference between an ASCII identifier plughw:0,0 and hw:0,0? And what the output of 'aplay -L' means? a hw device is totally constrained by the hardware characteristics of the underlying audio interface. if the device has 26 channels, then it must be used with 26 channels; if it only supports interleaved access, it must be used with interleaved access; if it doesn't support 16 bit output, you can't use it with 16 bit output. a plug device is unconstrained by all this. you can ask for any configuration you want, and ALSA will provide it for you. a plughw device is a slightly specialized version of a plug device, differing only in that the underlying PCM device being accessed is of type hw. it has the same freedom as a plug device in all other ways. as a programmer, you do not need to worry about any of this. honest. I just want to know a number of installed sound cards and number of subdevices for every card and I'd like to have a possibility to open the right card and a subdevice according user's choice. I think that ALSA-0.5 interface was much better in these things... well, most of us disagree with you, and some of us, rather vigorously. in ALSA 0.9, you do not attempt to scan all cards and pick one. this is something that cannot be done reliably or usefully in many situations. you allow the user to specify the *name* of a PCM device they wish to use. these names correspond to entries in their ~/.asoundrc file, and may contain configurations that your program can't even imagine. case in point: my machine has (sometimes): 2 Hammerfall cards, 1 Trident 4D-NX card, 1 Tropez+. The tropez audio playback is currently broken, so i never use it for that (but it has a decent wavetable synth and 2 MIDI ports); the hammerfall outputs are semi-permanently wired to my mixer and the the inputs of everything are up on a patch bay. occasionally, i run both hammerfalls as a single PCM device at 96kHz, more often as two separate devices. you will not be able to write a user friendly configuration program for my system. you can't do it in general, because the ALSA plug layer offers a totally flexible layer that allows an audio interface to appear to have any characteristics that you want. instead, just let your program take it from a user that when they tell it to use the ALSA PCM device foo that they know what they're doing. if the user does not specify a name, use default and it will work 99.8% of the time. the current setup of the default device is a plughw device using the first audio interface. it will work with any sample rate, any sample format, any type of access (interleaved, noninterleaved, read/write or mmap). --p ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Four channel support
I've noticed that a lot of the cards ALSA supports are capable of four or more channel audio. However, in at least two cases that I've investigated in depth, the driver supports only two channels (maestro3 and cs46xx). Why is the four-channel sound capability of these cards not implemented? Is it a lack of hardware, documentation, or manpower? If manpower, how much effort would be required to implement it? I'm looking into buying one or the other of these cards, and would certainly like to be able to and use it to its full potential. -- -Steven In a time of universal deceit, telling the truth is a revolutionary act. -- George Orwell He's alive. He's alive! Oh, that fellow at RadioShack said I was mad! Well, who's mad now? -- Montgomery C. Burns ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] plughw or hw?
On Sun, 16 Dec 2001, Paul Davis wrote: What is a difference between an ASCII identifier plughw:0,0 and hw:0,0? And what the output of 'aplay -L' means? a hw device is totally constrained by the hardware characteristics of the underlying audio interface. if the device has 26 channels, then it must be used with 26 channels; if it only supports interleaved access, it must be used with interleaved access; if it doesn't support 16 bit output, you can't use it with 16 bit output. a plug device is unconstrained by all this. you can ask for any configuration you want, and ALSA will provide it for you. a plughw device is a slightly specialized version of a plug device, differing only in that the underlying PCM device being accessed is of type hw. it has the same freedom as a plug device in all other ways. as a programmer, you do not need to worry about any of this. honest. I just want to know a number of installed sound cards and number of subdevices for every card and I'd like to have a possibility to open the right card and a subdevice according user's choice. I think that ALSA-0.5 interface was much better in these things... well, most of us disagree with you, and some of us, rather vigorously. in ALSA 0.9, you do not attempt to scan all cards and pick one. this is something that cannot be done reliably or usefully in many situations. you allow the user to specify the *name* of a PCM device they wish to use. these names correspond to entries in their ~/.asoundrc file, and may contain configurations that your program can't even imagine. case in point: my machine has (sometimes): 2 Hammerfall cards, 1 Trident 4D-NX card, 1 Tropez+. The tropez audio playback is currently broken, so i never use it for that (but it has a decent wavetable synth and 2 MIDI ports); the hammerfall outputs are semi-permanently wired to my mixer and the the inputs of everything are up on a patch bay. occasionally, i run both hammerfalls as a single PCM device at 96kHz, more often as two separate devices. you will not be able to write a user friendly configuration program for my system. you can't do it in general, because the ALSA plug layer offers a totally flexible layer that allows an audio interface to appear to have any characteristics that you want. instead, just let your program take it from a user that when they tell it to use the ALSA PCM device foo that they know what they're doing. if the user does not specify a name, use default and it will work 99.8% of the time. the current setup of the default device is a plughw device using the first audio interface. it will work with any sample rate, any sample format, any type of access (interleaved, noninterleaved, read/write or mmap). Interesting - and explains why I am having a hard time learning to use the alsa library. Could you explain to me how to do the following: the user has a TV capture card with audio-out that is plugged in into one of the sound cards installed in the system. I need to ask user which card and which input s/he plugged the TV audio into. How do I do that ? (Preferably without the user messing around with configuration files or entering names from keyboard). thanks ! Vladimir Dergachev --p ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel