[pulseaudio-discuss] Headset-detection

Himanshu Chug himanshu.chug at gmail.com
Mon Jul 18 02:31:59 PDT 2011


Currently I am trying standard headset with mic (3.5 mm) and not USB
headset.
*
on ubuntu 10.10 desktop*

-module-udev-detect is loaded
-I am trying out use-case of headset plug/unplug , when music is playing on
totem player the audio is getting routed to headset automatically when HS is
plugged-in. (which is expected :-) )
-here I am expecting to see an new sink device in the list-sinks which is
not happening?

*on device with 2.6.35 kernel and PA 0.9.21*

- module-udev-detect is loaded
- audio is NOT getting routed to headset automatically when HS is
plugged-in, while playing music through gst-launch ? Not sure why ?
- here also I am expecting to see an new sink device in the list-sinks which
is not happening?


*here is the list-sinks output (of ubuntu10.10) it remains same irrespective
of doing headset plugin/plugout :*

1 sink(s) available.
  * index: 0
    name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
    driver: <module-alsa-card.c>
    flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9959
    volume: 0:  65% 1:  65%
            0: -11.41 dB 1: -11.41 dB
            balance 0.00
    base volume: 100%
                 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 0 KiB
    max rewind: 0 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
    card: 0 <alsa_card.pci-0000_00_1b.0>
    module: 4
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = "AD198x Analog"
        alsa.id = "AD198x Analog"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "HDA Intel"
        alsa.long_card_name = "HDA Intel at 0xdfdfc000 irq 43"
        alsa.driver_name = "snd_hda_intel"
        device.bus_path = "pci-0000:00:1b.0"
        sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
        device.bus = "pci"
        device.vendor.id = "8086"
        device.vendor.name = "Intel Corporation"
        device.product.id = "27d8"
        device.product.name = "N10/ICH 7 Family High Definition Audio
Controller"
        device.form_factor = "internal"
        device.string = "front:0"
        device.buffering.buffer_size = "352768"
        device.buffering.fragment_size = "176384"
        device.access_mode = "mmap+timer"
        device.profile.name = "analog-stereo"
        device.profile.description = "Analog Stereo"
        device.description = "Internal Audio Analog Stereo"
        alsa.mixer_name = "Analog Devices AD1984"
        alsa.components = "HDA:11d41984,10280220,00100400"
        module-udev-detect.discovered = "1"
        device.icon_name = "audio-card-pci"
    ports:
        analog-output: Analog Output (priority 9900)
        analog-output-headphones: Analog Headphones (priority 9000)
    active port: <analog-output>


*Device*

>>> list-sinks
1 sink(s) available.
  * index: 0
    name: <alsa_output.hw_0_0>
    driver: <module-alsa-sink.c>
    flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
    state: SUSPENDED
    suspend cause: IDLE
    priority: 9000
    volume: 0: 100% 1: 100%
            0: 0.00 dB 1: 0.00 dB
            balance 0.00
    base volume: 100%
                 0.00 dB
    volume steps: 65537
    muted: no
    current latency: 0.00 ms
    max request: 127 KiB
    max rewind: 127 KiB
    monitor source: 0
    sample spec: s16le 2ch 44100Hz
    channel map: front-left,front-right
                 Stereo
    used by: 0
    linked by: 0
    configured latency: 0.00 ms; range is 0.50 .. 742.31 ms
    module: 4
    properties:
        alsa.resolution_bits = "16"
        device.api = "alsa"
        device.class = "sound"
        alsa.class = "generic"
        alsa.subclass = "generic-mix"
        alsa.name = ""
        alsa.id = "McBSP2-STDac cpcap stdac-0"
        alsa.subdevice = "0"
        alsa.subdevice_name = "subdevice #0"
        alsa.device = "0"
        alsa.card = "0"
        alsa.card_name = "motsnd"
        alsa.long_card_name = "Motorola MAPPHONE"
        device.string = "hw:0,0"
        device.buffering.buffer_size = "130944"
        device.buffering.fragment_size = "65472"
        device.access_mode = "mmap+timer"
        device.description = "motsnd"
        device.icon_name = "audio-card"


any idea, what went wrong ?

Best Regards,
Himanshu



On Sun, Jul 17, 2011 at 3:34 AM, Colin Guthrie <gmane at colin.guthr.ie> wrote:

> 'Twas brillig, and Himanshu Chug at 14/07/11 11:36 did gyre and gimble:
> > Hi Colin
> >
> > Thanks for information.
> >
> > we were using an old kernel which doesnt have proper udev support
> > (something like that I come to know from our kernel team.. :( ), then I
> > migrated to latest kernel and now module-udev-detect is built getting
> > loaded along with other modules :-)
>
> Ahh good :)
>
> > Next..
> >
> > I am trying to plug-in/out accessory headset , I guess it should reflect
> > in pacmd list-sinks or pacmd list-sources? but I am not sure, how to
> > view the updated list of sinks/sources after plugin/out ?
>
> Yeah, those commands should show you your updated devices after
> plug/unplug.
>
> > also , you mention one comment on my default.pa that ..
> > "load-module module-alsa-sink device=hw:0,0"
> > "OK, so here you've modified the default.pa file
> > for your system. You
> > shouldn't have to do this. It implies a static configuration that
> > obviously won't work with hotplug by itself...."
> >
> > is this affecting ???
>
> It shouldn't affect hotplug of USB stuff, just your internal card. That
> said you should still remove that line as it's not needed.
>
> I actually clarified the wording on the wiki page that lead you to add
> this line as another user on IRC got caught out by it too. Hopefully
> it's clearer now.
>
>
> So, the problem of your USB not showing up is presumably still there..
>
> If udev is working correctly now, then I'd run PA manually via
> pulseaudio -vvvvv and look for the debug that should spew out when you
> do the plug/unplug.
>
> My initial guess at the problem would be one of permissions. i.e. your
> user may not be allowed to access this new device node that is created.
> In a typical desktop env, udev will use udev-acl to give your user
> permission via an ACL on the device node. PA will only add a sink/source
> if your user actually has permission to open the device.
>
> This last bit is just a guess tho'. Hope it helps.
>
> Col
>
>
> --
>
> Colin Guthrie
> gmane(at)colin.guthr.ie
> http://colin.guthr.ie/
>
> Day Job:
>  Tribalogic Limited [http://www.tribalogic.net/]
> Open Source:
>  Mageia Contributor [http://www.mageia.org/]
>  PulseAudio Hacker [http://www.pulseaudio.org/]
>  Trac Hacker [http://trac.edgewall.org/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110718/d31a5f44/attachment-0001.htm>


More information about the pulseaudio-discuss mailing list