ALSA: hda: avoid reset of sdo_limit
Subsystems (2)
PATCH 1/1 ALSA: hda: avoid reset of sdo_limit
By default 'sdo_limit' is initialized with a default value of '8' as per spec. This is overridden in cases where a different value is required. However this is getting reset when snd_hdac_bus_init_chip() is called again, which happens during runtime PM cycle. Avoid reset by not initializing to default value everytime.
--- sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/hda/hdac_controller.c +2 -1
@@ -538,7 +538,8 @@ bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset)* { ((num_channels * bits_per_sample * rate/48000) / * number of SDOs) >= 8 } */ - bus->sdo_limit =8 ; +if (!bus->sdo_limit) + bus->sdo_limit =8 ;return true; }
Signature · 1 line
2.7.4
Quoted 10 lines · Sameer Pujar
By default '
sdo_limit' is initialized with a default value of '8' as per spec. This is overridden in cases where a different value is required. However this is getting reset whensnd_hdac_bus_init_chip()is called again, which happens during runtime PM cycle. Avoid reset by not initializing to default value everytime.Fixes 67ae482a59e9 ("ALSA: hda: add member to store ratio for stripe control")Cc <[email protected]>Signed-off-by Sameer Pujar <[email protected]>
How about to move the default sdo_limit setup into snd_hdac_bus_init() instead? That's the place to be called only once.
thanks,
Takashi
Quoted 21 lines
--- sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)sound/hda/hdac_controller.c +2
-1@@ -538,7 +538,8 @@ bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset)* { ((num_channels * bits_per_sample * rate/48000) / * number of SDOs) >= 8 } */ - bus->sdo_limit =8 ; +if (!bus->sdo_limit) + bus->sdo_limit =8 ;return true; }Signature · 1 line
2.7.4
Quoted 11 lines · Takashi Iwai
External email: Use caution opening links or attachments
Quoted 6 lines · Sameer Pujar
By default '
sdo_limit' is initialized with a default value of '8' as per spec. This is overridden in cases where a different value is required. However this is getting reset whensnd_hdac_bus_init_chip()is called again, which happens during runtime PM cycle. Avoid reset by not initializing to default value everytime.
Quoted 5 lines
Quoted 3 lines
Fixes 67ae482a59e9 ("ALSA: hda: add member to store ratio for stripe control")Cc <[email protected]>Signed-off-by Sameer Pujar <[email protected]>How about to move the default
sdo_limitsetup intosnd_hdac_bus_init()instead? That's the place to be called only once.
A better choice. Thanks for the suggestion. Will publish v2.
Quoted 28 lines
thanks,
Takashi
Quoted 21 lines
--- sound/hda/hdac_controller.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)sound/hda/hdac_controller.c +2
-2@@ -538,7 +538,8 @@ bool snd_hdac_bus_init_chip(struct hdac_bus *bus, bool full_reset)* { ((num_channels * bits_per_sample * rate/48000) / * number of SDOs) >= 8 } */ - bus->sdo_limit =8 ; +if (!bus->sdo_limit) + bus->sdo_limit =8 ;return true; } --2.7.4