seem jack detection problem of your headphone http://mailman.alsa-project.org/pipermail/alsa- devel/2013-May/062362.html
follow Takashi Iwai procedure to trace the verbs while plugging the headphone try hdajackretask to disable jack detection of headphone and set Misc = NO_PRESENCE (bit 8 of pin default) of headphone node (change pin default to 0x02214520) to disable jack detection ode 0x1b [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out Control: name="Headphone Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Front Headphone Jack", index=0, device=0 Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x0001373c: IN OUT HP EAPD Detect Vref caps: HIZ 50 GRD 80 100 EAPD 0x2: EAPD Pin Default 0x02214420: [Jack] HP Out at Ext Front Conn = 1/8, Color = Green DefAssociation = 0x2, Sequence = 0x0 Pin-ctls: 0xc0: OUT HP VREF_HIZ Unsolicited: tag=01, enabled=1 Power states: D0 D1 D2 D3 EPSS Power: setting=D0, actual=D0 Connection: 5 0x0c 0x0d 0x0e 0x0f 0x26* ( 0.671| 0.000) D: [pulseaudio] module-alsa-card.c: Jack 'Front Headphone Jack' is now plugged in ( 0.671| 0.000) D: [pulseaudio] device-port.c: Setting port analog-output-headphones to status yes ( 0.671| 0.000) D: [pulseaudio] module-switch-on-port-available.c: finding port analog-output-headphones ( 0.671| 0.000) D: [alsa-sink-ALC898 Analog] alsa-sink.c: Cutting sleep time for the initial iterations by half. ( 0.671| 0.000) D: [alsa-sink-ALC898 Analog] alsa-mixer.c: Activating path analog-output-headphones 0.680| 0.005) D: [pulseaudio] module-alsa-card.c: Jack 'Front Headphone Jack' is now unplugged ( 0.680| 0.000) D: [pulseaudio] device-port.c: Setting port analog-output-headphones to status no ( 0.680| 0.000) D: [pulseaudio] module-switch-on-port-available.c: finding port analog-output-headphones ( 0.680| 0.000) D: [alsa-sink-ALC898 Analog] alsa-mixer.c: Activating path analog-output ( 0.680| 0.000) D: [alsa-sink-ALC898 Analog] alsa-mixer.c: Path analog-output (Analog Out ( 0.776| 0.092) D: [pulseaudio] module-alsa-card.c: Jack 'Front Headphone Jack' is now plugged in ( 0.776| 0.000) D: [pulseaudio] device-port.c: Setting port analog-output-headphones to status yes ( 0.776| 0.000) D: [pulseaudio] module-switch-on-port-available.c: finding port analog-output-headphones ( 0.776| 0.000) D: [alsa-sink-ALC898 Analog] alsa-mixer.c: Activating path analog-output-headphones ( 0.797| 0.017) D: [pulseaudio] module-alsa-card.c: Jack 'Front Headphone Jack' is now unplugged ( 0.797| 0.000) D: [pulseaudio] device-port.c: Setting port analog-output-headphones to status no ( 0.797| 0.000) D: [pulseaudio] module-switch-on-port-available.c: finding port analog-output-headphones ( 0.797| 0.000) D: [alsa-sink-ALC898 Analog] alsa-mixer.c: Activating path analog-output -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1248116 Title: PulseAudio switch rapidly port making the sound horrible To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1248116/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs