All of lore.kernel.org
 help / color / mirror / Atom feed
* snd_device_name_hint problems
@ 2009-09-11  9:45 David Henningsson
  2009-09-12  4:09 ` Raymond Yau
  0 siblings, 1 reply; 4+ messages in thread
From: David Henningsson @ 2009-09-11  9:45 UTC (permalink / raw)
  To: alsa-devel

Hello,

First; I'm not completely sure how much of this is your issue, and how
much is my distribution's fault (Ubuntu). If you believe my problems is
due to bugs in the distribution, please say so.

I'm working with a small recording application and I want to enumerate
possible recording sources/devices, just to put in a combobox. In my
computer I have two soundcards, one on the motherboard and one PCI
soundcard (ESI Juli@). I also have Pulseaudio installed, so the devices
I want to show up are those three - and possibly alternatives under
these, such as analog/digital inputs.

According to Lennart's guide to sound API's, snd_device_name_hint is the
way to go, as both snd_card_xxx and snd_config_xxx are deprecated.
(Speak up if you don't agree.)

So assuming I do about the same as "arecord -L" does, I get the
following output (descriptions omitted) :

front:CARD=Juli,DEV=0
surround40:CARD=Juli,DEV=0
surround41:CARD=Juli,DEV=0
surround50:CARD=Juli,DEV=0
surround51:CARD=Juli,DEV=0
surround71:CARD=Juli,DEV=0
iec958:CARD=Juli,DEV=0
null
front:CARD=CK804,DEV=0
surround40:CARD=CK804,DEV=0
surround41:CARD=CK804,DEV=0
surround50:CARD=CK804,DEV=0
surround51:CARD=CK804,DEV=0
surround71:CARD=CK804,DEV=0

I have two problems with this: first thing is that the "pulse" device is
not listed. I think that could be solved either by setting
"defaults.namehint.showall" to on, or by setting the name hint of the
pulse device to be included in the "basic" devices. Would you recommend
doing either one of those, and if so, which one?

Second problem is that I don't have surround input on either of my
soundcards, so most of the device options above do not make any sense.
Even if I try, I have a hard time recording from them (arecord fails to
record it with various errors, such as "Sample format non available").
If I instead use "plughw:CARD=name", recording works.

To sum it up, the output I would like to have, is at least these three:

plughw:CARD=Juli
plughw:CARD=CK804
pulse

How do I/we get there?

// David

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

* Re: snd_device_name_hint problems
  2009-09-11  9:45 snd_device_name_hint problems David Henningsson
@ 2009-09-12  4:09 ` Raymond Yau
  2009-09-12  7:23   ` David Henningsson
  0 siblings, 1 reply; 4+ messages in thread
From: Raymond Yau @ 2009-09-12  4:09 UTC (permalink / raw)
  To: alsa-devel

It seem to me that name hint is not suitable for displaying recording
devices

It's other rare for an user to recording from the same source by more than
one applications.

You can get low latency by using hw device since PA use maximum buffer in
order to save power comsumption for those notebook / netbook.

If your application require high quality (bypass any SRC) , you may need to
capture using hardware rate and format instead of using plughw


For the surround51 in the movie , the LFE is generated in the studio instead
of recording in real life

In the past , AC97 codec has only one ADC , you can select one capture
source only.
so most of the sound card using AC97 codec can capture stereo only

The other high end sound card (e.g. ice1712) can only capture in 12 channels

For HDA , it support multiple streamming. some  HDA codecs (e.g. alc88x and
ad198x) have 3 ADC ( which you can capture three stereo streams concurrently
from internal mic, external mic and line in )


The main problem of the recording audio application is unable to select the
correct mixer control of the three capture sources



2009/9/11 David Henningsson <launchpad.web@epost.diwic.se>

> Hello,
>
> First; I'm not completely sure how much of this is your issue, and how
> much is my distribution's fault (Ubuntu). If you believe my problems is
> due to bugs in the distribution, please say so.
>
> I'm working with a small recording application and I want to enumerate
> possible recording sources/devices, just to put in a combobox. In my
> computer I have two soundcards, one on the motherboard and one PCI
> soundcard (ESI Juli@). I also have Pulseaudio installed, so the devices
> I want to show up are those three - and possibly alternatives under
> these, such as analog/digital inputs.
>
> According to Lennart's guide to sound API's, snd_device_name_hint is the
> way to go, as both snd_card_xxx and snd_config_xxx are deprecated.
> (Speak up if you don't agree.)
>
> So assuming I do about the same as "arecord -L" does, I get the
> following output (descriptions omitted) :
>
> front:CARD=Juli,DEV=0
> surround40:CARD=Juli,DEV=0
> surround41:CARD=Juli,DEV=0
> surround50:CARD=Juli,DEV=0
> surround51:CARD=Juli,DEV=0
> surround71:CARD=Juli,DEV=0
> iec958:CARD=Juli,DEV=0
> null
> front:CARD=CK804,DEV=0
> surround40:CARD=CK804,DEV=0
> surround41:CARD=CK804,DEV=0
> surround50:CARD=CK804,DEV=0
> surround51:CARD=CK804,DEV=0
> surround71:CARD=CK804,DEV=0
>
> I have two problems with this: first thing is that the "pulse" device is
> not listed. I think that could be solved either by setting
> "defaults.namehint.showall" to on, or by setting the name hint of the
> pulse device to be included in the "basic" devices. Would you recommend
> doing either one of those, and if so, which one?
>
> Second problem is that I don't have surround input on either of my
> soundcards, so most of the device options above do not make any sense.
> Even if I try, I have a hard time recording from them (arecord fails to
> record it with various errors, such as "Sample format non available").
> If I instead use "plughw:CARD=name", recording works.
>
> To sum it up, the output I would like to have, is at least these three:
>
> plughw:CARD=Juli
> plughw:CARD=CK804
> pulse
>
> How do I/we get there?
>
> // David
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>

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

* Re: snd_device_name_hint problems
  2009-09-12  4:09 ` Raymond Yau
@ 2009-09-12  7:23   ` David Henningsson
  2009-09-20  9:31     ` Raymond Yau
  0 siblings, 1 reply; 4+ messages in thread
From: David Henningsson @ 2009-09-12  7:23 UTC (permalink / raw)
  To: Raymond Yau; +Cc: alsa-devel

Raymond Yau skrev:
> It seem to me that name hint is not suitable for displaying recording
> devices

But what should I then use? snd_card_xxx will not show the pulse device,
snd_names_list is deprecated, and snd_config_xxx is not recommended either.

> You can get low latency by using hw device since PA use maximum buffer in
> order to save power comsumption for those notebook / netbook.
> 
> If your application require high quality (bypass any SRC) , you may need to
> capture using hardware rate and format instead of using plughw

I will not need low latency for this application, but avoiding SRC would
probably be a good thing. But I assume the plug handling does not do any
SRC if it can avoid it by adjusting the hardware?

> For HDA , it support multiple streamming. some  HDA codecs (e.g. alc88x and
> ad198x) have 3 ADC ( which you can capture three stereo streams concurrently
> from internal mic, external mic and line in )
> 
> The main problem of the recording audio application is unable to select the
> correct mixer control of the three capture sources

What I would like would my enumeration function to return in this case
would be four entries, one for each ADC and one for them all combined (6
channels, multi-channel recording).

// David

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

* Re: snd_device_name_hint problems
  2009-09-12  7:23   ` David Henningsson
@ 2009-09-20  9:31     ` Raymond Yau
  0 siblings, 0 replies; 4+ messages in thread
From: Raymond Yau @ 2009-09-20  9:31 UTC (permalink / raw)
  To: alsa-devel

The name hint does not define any device for recording

if you run alsa-lib/test/namehint.c , you should notice that front device is
used for "Front Speakers".

Most likely you cannot use this "front" device for recording

The "pulse" device is in the list since I am using Fedora 10


 ./namehint
NAMEfront:CARD=au8830,DEV=0|DESCAureal Vortex au8830, adb
Front speakers
NAMEsurround40:CARD=au8830,DEV=0|DESCAureal Vortex au8830, adb
4.0 Surround output to Front and Rear speakers
NAMEiec958:CARD=au8830,DEV=0|DESCAureal Vortex au8830, spdif
IEC958 (S/PDIF) Digital Audio Output|IOIDOutput
NAMEnull|DESCDiscard all samples (playback) or generate zero samples
(capture)
NAMEpulse|DESCPulseAudio Sound Server
NAMEdefault|DESCDefault
NAMEfront:CARD=Intel,DEV=0|DESCHDA Intel, AD198x Analog
Front speakers
NAMEsurround40:CARD=Intel,DEV=0|DESCHDA Intel, AD198x Analog
4.0 Surround output to Front and Rear speakers
NAMEsurround41:CARD=Intel,DEV=0|DESCHDA Intel, AD198x Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
NAMEsurround50:CARD=Intel,DEV=0|DESCHDA Intel, AD198x Analog
5.0 Surround output to Front, Center and Rear speakers
NAMEsurround51:CARD=Intel,DEV=0|DESCHDA Intel, AD198x Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
NAMEsurround71:CARD=Intel,DEV=0|DESCHDA Intel, AD198x Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
NAMEiec958:CARD=Intel,DEV=0|DESCHDA Intel, AD198x Digital
IEC958 (S/PDIF) Digital Audio Output



arecord --list-device
**** List of CAPTURE Hardware Devices ****

card 1: Intel [HDA Intel], device 0: AD198x Analog [AD198x Analog]
  Subdevices: 3/3
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
card 1: Intel [HDA Intel], device 1: AD198x Digital [AD198x Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


2009/9/12 David Henningsson <launchpad.web@epost.diwic.se>

> Raymond Yau skrev:
> > It seem to me that name hint is not suitable for displaying recording
> > devices
>
> But what should I then use? snd_card_xxx will not show the pulse device,
> snd_names_list is deprecated, and snd_config_xxx is not recommended either.
>
> > You can get low latency by using hw device since PA use maximum buffer in
> > order to save power comsumption for those notebook / netbook.
> >
> > If your application require high quality (bypass any SRC) , you may need
> to
> > capture using hardware rate and format instead of using plughw
>
> I will not need low latency for this application, but avoiding SRC would
> probably be a good thing. But I assume the plug handling does not do any
> SRC if it can avoid it by adjusting the hardware?
>
> > For HDA , it support multiple streamming. some  HDA codecs (e.g. alc88x
> and
> > ad198x) have 3 ADC ( which you can capture three stereo streams
> concurrently
> > from internal mic, external mic and line in )
> >
> > The main problem of the recording audio application is unable to select
> the
> > correct mixer control of the three capture sources
>
> What I would like would my enumeration function to return in this case
> would be four entries, one for each ADC and one for them all combined (6
> channels, multi-channel recording).
>
> // David
>
>

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

end of thread, other threads:[~2009-09-20  9:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11  9:45 snd_device_name_hint problems David Henningsson
2009-09-12  4:09 ` Raymond Yau
2009-09-12  7:23   ` David Henningsson
2009-09-20  9:31     ` Raymond Yau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.