On 14/01/18 17:13, Terry Coles wrote:
I have used both aplay -l and aplay -L, but neither help. Here is a couple of
segments from the relevant output for the two devices:

<Start>
<First>
sysdefault:CARD=Device
     USB PnP Sound Device, USB Audio
     Default Audio Device

......

plughw:CARD=Device,DEV=0
     USB PnP Sound Device, USB Audio
     Hardware device with all software conversions

<Second>
sysdefault:CARD=Device_1
     USB PnP Sound Device, USB Audio
     Default Audio Device
front:CARD=Device_1,DEV=0

....

plughw:CARD=Device_1,DEV=0
     USB PnP Sound Device, USB Audio
     Hardware device with all software conversions
<End>

As you can see, the only difference between the two entries is the _1 after
Card=Device.  That doesn't tie up with the ID Numbers in lsusb either.

Of course, if I knew the name of the device that was connected to the channel
that I wanted, then aplay -D might be useful.....  :-)


The IDs in lsusb won't help, they are the vendor ID and device ID for that type of card, not that instance in your machine.

It looks like aplay -D can use the whole device string, eg. "plughw:CARD=Device,DEV=0" but mpg123 can't...

I've done some more experimenting and I can see how to do it... I think...
First list devices with 'aplay -l' (lowercase). On here I get this:

card 0: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Device [USB Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

There's three cards here, and each has one device.
The middle one (HDMI), is card 1, device 3. I can play through that with:
mpg123 -o alsa -a hw:1,3 /path/to/audio

Or if I want the USB device:
mpg123 -o alsa -a hw:2,0 /path/to/audio

If I wanted the internal card that would be hw:0,0, but there's nothing plugged in to it right now... :)

--

Andrew.


--
Next meeting:  Bournemouth, Tuesday, 2018-01-09 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
New thread:  mailto:dorset@mailman.lug.org.uk / CHECK IF YOU'RE REPLYING
Reporting bugs well:  http://goo.gl/4Xue     / TO THE LIST OR THE AUTHOR

Reply via email to