[pulseaudio-discuss] giving custom names to devices

Colin Guthrie gmane at colin.guthr.ie
Mon Jun 22 01:00:34 PDT 2009


'Twas brillig, and Jost-Philip Matysik at 20/06/09 00:07 did gyre and 
gimble:
> Hi!
> 
> Mark Greenwood wrote:
>> Something I wondered about was whether it would be possible to give
>> devices user-defined names. This would help specifically when network
>> sinks are in use, so that I could send audio to 'Kitchen' instead of
>> 'powermac snapper (00:10) on mac'... trips off the tongue a little
>> easier, is all :)
>>
>> Mark
> 
> Is there any news on this? For me it's just cosmetics, but I'm
> sorry to report routing her audio from "PAPLAY:STDIN" to
> "USB_0777:x3425" just to have music in the kitchen is something my
> girlfriend won't accept as practical any time soon...

While still "manual" you can "fix" things up with pacmd - see below.

> I believe it should be possible using virtual ALSA devices (like the
> ones used to combine 3 stereo cards into multichannel). As I understand
> it it should be possible to create a virtual device with a catchy name
> in .asoundrc and then patch all channels through to the hardware
> device. But I've never really dealt with alsa configuration so I don't
> know how these virtual devices handle sample rate and bitrate etc, and
> considering that hardware autodetect works really great in Pulseaudio
> it seems like a lot of work and opportunity for desaster when all I
> want is customize a display name...

While this should be do-able it wont really work easily as the devices 
will not be auto-detected.

It's possible to update the proplist automatically for the sink to 
change the names:

If you know the name or index of your sink, just issue:

update-sink-proplist 0 device.description="My Preferred Name"
  of
update-sink-proplist 
alsa_output.usb_device_499_3003_Ser_00_em_if0_sound_card_0 
device.description="My Preferred Name"

Both should work and the second approach should be more consistent.

If you run this at login, it will still around for the duration of 
pulseaudio being alive.

Not sure if there is a more comprehensive way of doing this but I've got 
some things I want to work on that are kinda related to this so I'll see 
what can be done....


Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list