← Back to team overview

touch-packages team mailing list archive

[Bug 1007866] Re: System mode: SHM avaliblity.

 

Cool.

I think the safe way to do it is much more complicated than just turning
on the existing SHM vector.

>From what I understand it should work like so...

Client connect to stream or dgram socket and (post auth) establishes
that both parties believe they are on he same host and server offers to
create SHM buffers for the client to use.  The client may close the
socket once SHM is setup, if it's done.

Server should be able to query the socket, worst case using ident, to
see what user is on the other end and set perms appropriately.  The
server might trust the client to supply perms and does so while applying
a mask for sanity purposes.

SHM buffers are per socket connection/pid and a single pid can ask for
more than one, with some upper limit defined to prevent DOS.

This adds more commands into the PA server and client, but I feel that
both modes would benefit from a more robust SHM system.  Having more
than a single thread(client/server threads makes for a minimum of two)
introduces locking concerns that just add latency.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to pulseaudio in Ubuntu.
https://bugs.launchpad.net/bugs/1007866

Title:
  System mode: SHM avaliblity.

Status in pulseaudio package in Ubuntu:
  Confirmed

Bug description:
  Hello,
    Let start with the most basic, I fully understand that System mode is taboo and unsupported by upstream.  I understand there reasoning, well I don't get the part about "You shouldn't use system mode because we refuse to offer SHM support for it."  That's just the pot calling the kettle black.

  In any case I'm using PA in system mode because I haven't been able to
  use dmix for various reasons, the closest I got was after 5 or 6 hacks
  I got silence and surround sound was forever out of my reach.   I'm
  sure there are other vary rare cases where System mode may be the only
  logical option.  What I needed out of dmix was to mix sound from
  several users, libvirt and others.

  Regardless of why, you should just take it on my authority that I have
  good reason for configuring a system this way.

  Attached you should find my /etc/default/pulseaudio file, it clearly
  is configured to forcibly enable SHM.  However as the documentation
  suggests this feature is disabled in system mode.  I know X does SHM
  and it nearly always runs as another user, so it should be technically
  possible...  Politics and opinions aside.

  Would a patch for this be accepted into Ubuntu?

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: pulseaudio 1:1.1-0ubuntu15
  ProcVersionSignature: Ubuntu 3.2.0-23.31-lowlatency-pae 3.2.14
  Uname: Linux 3.2.0-23-lowlatency-pae i686
  AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
  ApportVersion: 2.0.1-0ubuntu5
  Architecture: i386
  ArecordDevices:
   **** List of CAPTURE Hardware Devices ****
   card 0: SB [HDA ATI SB], device 0: VT2020 Analog [VT2020 Analog]
     Subdevices: 2/2
     Subdevice #0: subdevice #0
     Subdevice #1: subdevice #1
  AudioDevicesInUse:
   USER        PID ACCESS COMMAND
   /dev/snd/controlC1:  cheako     6904 F.... xfce4-volumed
   /dev/snd/controlC0:  cheako     6904 F.... xfce4-volumed
  Card0.Amixer.info:
   Card hw:0 'SB'/'HDA ATI SB at 0xfe3f8000 irq 16'
     Mixer name	: 'VIA VT2020'
     Components	: 'HDA:11060441,104383e4,00100100'
     Controls      : 46
     Simple ctrls  : 24
  Card1.Amixer.info:
   Card hw:1 'HDMI'/'HDA ATI HDMI at 0xfe9ec000 irq 88'
     Mixer name	: 'ATI R6xx HDMI'
     Components	: 'HDA:1002aa01,00aa0100,00100000'
     Controls      : 6
     Simple ctrls  : 1
  Card1.Amixer.values:
   Simple mixer control 'IEC958',0
     Capabilities: pswitch pswitch-joined penum
     Playback channels: Mono
     Mono: Playback [on]
  Date: Sat Jun  2 11:36:09 2012
  PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: No PulseAudio daemon running, or not running as session daemon.
  SourcePackage: pulseaudio
  UpgradeStatus: Upgraded to precise on 2012-01-03 (151 days ago)
  dmi.bios.date: 02/17/2011
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: 1902
  dmi.board.asset.tag: To Be Filled By O.E.M.
  dmi.board.name: Crosshair IV Formula
  dmi.board.vendor: ASUSTeK Computer INC.
  dmi.board.version: Rev 1.xx
  dmi.chassis.asset.tag: Asset-1234567890
  dmi.chassis.type: 3
  dmi.chassis.vendor: Chassis Manufacture
  dmi.chassis.version: Chassis Version
  dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr1902:bd02/17/2011:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnCrosshairIVFormula:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
  dmi.product.name: System Product Name
  dmi.product.version: System Version
  dmi.sys.vendor: System manufacturer
  modified.conffile..etc.default.pulseaudio: [modified]
  modified.conffile..etc.pulse.daemon.conf: [modified]
  modified.conffile..etc.pulse.system.pa: [modified]
  mtime.conffile..etc.default.pulseaudio: 2012-06-01T23:52:21.454150
  mtime.conffile..etc.pulse.daemon.conf: 2012-05-04T20:03:56.466470
  mtime.conffile..etc.pulse.system.pa: 2012-05-31T19:30:49.734907

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1007866/+subscriptions