Bug 5398

Summary: ES1988 Allegro-1 : No sound after boot if headphone pluged
Product: Drivers Reporter: Oleksij Rempel (fishor) (bug-track)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: REJECTED UNREPRODUCIBLE    
Severity: normal CC: akpm, bunk, tiwai
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.16.5 Subsystem:
Regression: --- Bisected commit-id:
Attachments: lspci
Fix volume initialization

Description Oleksij Rempel (fishor) 2005-10-08 02:07:18 UTC
Distribution:Ubuntoo Breazy
Hardware Environment: notebook samsung nv5000, sound: ES1988 Allegro-1
Software Environment:alsa 1.0.9
Problem Description:
No sound after boot if headphone pluged.Only chenching volume halp to make it
back .If phone not pluged - every thing working properly.
This laptop have headphone output with usb for remotecontrol. I never use this
controll - I jast don't have it. Plugging the headphone enabling usb-device:
T:  Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#=  7 Spd=12  MxCh= 0
D:  Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=04e8 ProdID=5001 Rev= 1.00
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
May be here is the problem.

I'm reporting this bug becouse windows don't have this problem.
Comment 1 Oleksij Rempel (fishor) 2005-10-08 02:08:00 UTC
Created attachment 6259 [details]
lspci
Comment 2 Oleksij Rempel (fishor) 2005-10-08 02:18:43 UTC
This bug looks fany but this is realy problem for me. I tryed "alsactl restore"
but it's not help. I'f i cheng master it make only 50% back and after this i
need to change PCM too after this is workin. With change i meen one point up or
down. If volume is hi it's make realy streng impuls, after chang, wich can
braece the pnones. 
Comment 3 Andrew Morton 2005-10-10 20:27:43 UTC
Did any earlier version of the kernel work correctly?  If so, which
versions?
Comment 4 Oleksij Rempel (fishor) 2005-10-11 03:10:35 UTC
Tested kernels: ubuntu-2.6.12-9-686; and vanilla 2.6.13; 2.6.14-rc1;2.6.14-rc3.

I made more test to finde the problem, loaded module after boot, disabled usb
and etc.
If heaphone pluged before power_on - come this problem. If after power_on but
before kernel init all working properly.

Test One: plug in headphone, start laptop, kernel init, load module snd_mastro3,
come sound impuls!!! (with test two or with windows there is no impuls), alsactr
restore, play (no sound), alsamixer +1 ore -1 volume and pcm, play (working :-)) )

Test Two: Start, plug in, kernel init, load module, alsactl restore, play (working)

May be on test one sound chip come with wrong configuration. 
Comment 5 Oleksij Rempel (fishor) 2005-10-15 04:44:00 UTC
I made smole script wich help me boot with sound, and placet it to /etc/rc2.d/
directory.
=================================start=======================================
#!/bin/bash
echo "Chonfiguring alsa"

alsactl restore
amixer set PCM,0 1+ # I tryed with 1%+ but it dasn't halp, only 1+ ore 1-
amixer set PCM,0 1-

amixer set Master,0 1+
amixer set Master,0 1-

alsactl restore
=============================end=====================================
Comment 6 Takashi Iwai 2005-10-17 03:18:10 UTC
How about the patch below?
Comment 7 Takashi Iwai 2005-10-17 03:18:59 UTC
Created attachment 6324 [details]
Fix volume initialization
Comment 8 Oleksij Rempel (fishor) 2005-10-17 07:10:43 UTC
I tryed this patch too and it didn't helped.
I tryed other script wich "reset" sound card.

alsactl power off && alsactl poweron

it's help to restore sound after boot. 
Comment 9 Oleksij Rempel (fishor) 2005-10-20 03:58:16 UTC
I think this is power managmen issue. 
Windows on sturt_up fter two second disable and enable agene some divices: like
usb, lan and may be sound (last one i can't check. Other i checked with
multimetr).  The same issue with on power off: windows disable usb, lan and
sound  before compleet poweroff (tested)

Why there is no sound after boot?
Becouse Jack Sense set to "On" on power_on - sound card starting not properly
(jast bugy hardware), and need to be reseted, jast like with "alsactl power off
&& alsactl poweron" script. 

May be it's will be properly to reset devices like this before enabling.
Comment 10 Adrian Bunk 2006-04-15 06:02:08 UTC
Is this issue still present in kernel 2.6.16.5?
Comment 11 Oleksij Rempel (fishor) 2006-04-15 08:04:14 UTC
Yes. It is.
Comment 12 Adrian Bunk 2006-04-15 08:23:43 UTC
Thanks for this information.

For the record, this is also tracked as
   https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1484
Comment 13 Oleksij Rempel (fishor) 2007-02-01 00:20:48 UTC
i don't have this hardware anymore.