alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Gonzalo Garramuño" <ggarra13@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Clemens Ladisch <clemens@ladisch.de>
Subject: Re: Switching from default to plughw:0,0
Date: Sun, 11 Sep 2016 14:40:53 -0300	[thread overview]
Message-ID: <a479dadf-8028-b717-bec9-d27ffed396ca@gmail.com> (raw)
In-Reply-To: <18fe27d1-5962-16fd-f0f0-d6bf0fb95444@ladisch.de>



El 11/09/16 a las 07:58, Clemens Ladisch escribió:
> When PulseAudio is configured as the default, it can be accessed through the ALSA API.
How exactly?
>
> Anyway, the correct name for the default device is "default".
>
> To get a list of devices, see "aplay -L".
Here's the output of aplay -L
$ aplay -L

default
     Playback/recording through the PulseAudio sound server
null
     Discard all samples (playback) or generate zero samples (capture)
pulse
     PulseAudio Sound Server
sysdefault:CARD=PCH
     HDA Intel PCH, ALC1150 Analog
     Default Audio Device
front:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     Front speakers
surround21:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Digital
     IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     Direct sample mixing device
dmix:CARD=PCH,DEV=1
     HDA Intel PCH, ALC1150 Digital
     Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     Direct sample snooping device
dsnoop:CARD=PCH,DEV=1
     HDA Intel PCH, ALC1150 Digital
     Direct sample snooping device
hw:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     Direct hardware device without any conversions
hw:CARD=PCH,DEV=1
     HDA Intel PCH, ALC1150 Digital
     Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
     HDA Intel PCH, ALC1150 Analog
     Hardware device with all software conversions
plughw:CARD=PCH,DEV=1
     HDA Intel PCH, ALC1150 Digital
     Hardware device with all software conversions
hdmi:CARD=NVidia,DEV=0
     HDA NVidia, HDMI 0
     HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
     HDA NVidia, HDMI 1
     HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
     HDA NVidia, HDMI 2
     HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
     HDA NVidia, HDMI 3
     HDMI Audio Output
dmix:CARD=NVidia,DEV=3
     HDA NVidia, HDMI 0
     Direct sample mixing device
dmix:CARD=NVidia,DEV=7
     HDA NVidia, HDMI 1
     Direct sample mixing device
dmix:CARD=NVidia,DEV=8
     HDA NVidia, HDMI 2
     Direct sample mixing device
dmix:CARD=NVidia,DEV=9
     HDA NVidia, HDMI 3
     Direct sample mixing device
dsnoop:CARD=NVidia,DEV=3
     HDA NVidia, HDMI 0
     Direct sample snooping device
dsnoop:CARD=NVidia,DEV=7
     HDA NVidia, HDMI 1
     Direct sample snooping device
dsnoop:CARD=NVidia,DEV=8
     HDA NVidia, HDMI 2
     Direct sample snooping device
dsnoop:CARD=NVidia,DEV=9
     HDA NVidia, HDMI 3
     Direct sample snooping device
hw:CARD=NVidia,DEV=3
     HDA NVidia, HDMI 0
     Direct hardware device without any conversions
hw:CARD=NVidia,DEV=7
     HDA NVidia, HDMI 1
     Direct hardware device without any conversions
hw:CARD=NVidia,DEV=8
     HDA NVidia, HDMI 2
     Direct hardware device without any conversions
hw:CARD=NVidia,DEV=9
     HDA NVidia, HDMI 3
     Direct hardware device without any conversions
plughw:CARD=NVidia,DEV=3
     HDA NVidia, HDMI 0
     Hardware device with all software conversions
plughw:CARD=NVidia,DEV=7
     HDA NVidia, HDMI 1
     Hardware device with all software conversions
plughw:CARD=NVidia,DEV=8
     HDA NVidia, HDMI 2
     Hardware device with all software conversions
plughw:CARD=NVidia,DEV=9
     HDA NVidia, HDMI 3
     Hardware device with all software conversions


>
> Regards,
> Clemens
Thanks, Clemens.  My code works with the "default" device.  On the 
gnome-control-center, I am able to switch the default device and all 
works fine.

My problem is when I want my program to specify the device to use 
directly from the GUI: plughw:0,0.  The device is in control of 
pulseaudio and does not release it until about 7 seconds go by with no 
audio.  I tried a similar set up in vlc and the result was the same (vlc 
reported that it could not open the device), so I know it is not my code.

Let me know how can I control pulseaudio to close immediately the 
virtual device it opens.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2016-09-11 17:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-10 23:33 Switching from default to plughw:0,0 Gonzalo Garramuño
2016-09-10 23:46 ` Clemens Ladisch
2016-09-11  1:20   ` Gonzalo Garramuño
     [not found]   ` <19f3ac8e-cd79-2b03-824f-330350c5bc82@gmail.com>
2016-09-11 10:58     ` Clemens Ladisch
2016-09-11 17:40       ` Gonzalo Garramuño [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a479dadf-8028-b717-bec9-d27ffed396ca@gmail.com \
    --to=ggarra13@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).