* notifying userspace of hwparams change
@ 2017-10-03 16:11 Tim Harvey
2017-10-05 13:19 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Tim Harvey @ 2017-10-03 16:11 UTC (permalink / raw)
To: alsa-devel
Greetings,
I've got an HDMI receiver chip I'm working on a driver for which
provides the audio signal from the HDMI source. An HDMI source can be
a variety of sample-rates, channels, widths, and formats. If I
understand correctly I need to register the device as supporting all
the possible rates/channels/formats then constrain these to what is
actually available at the time in the startup callback with
snd_pcm_hw_contstraint_minmax and snd_pcm_hw_constraint_mask.
How do I notify userspace when the chip tells me that the HDMI audio
source rate/channels/format has changed?
I know on the Video side the driver sends a V4L2_EVENT_SOURCE_CHANGE
event to userspace when input format/resolution has changed so that
userspace can stop streaming, call VIDIOC_QUERY_DV_TIMINGS and then
VIDIOC_S_DV_TIMINGS with new timings.
Regards,
Tim
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: notifying userspace of hwparams change
2017-10-03 16:11 notifying userspace of hwparams change Tim Harvey
@ 2017-10-05 13:19 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2017-10-05 13:19 UTC (permalink / raw)
To: Tim Harvey; +Cc: alsa-devel
On Tue, 03 Oct 2017 18:11:50 +0200,
Tim Harvey wrote:
>
> Greetings,
>
> I've got an HDMI receiver chip I'm working on a driver for which
> provides the audio signal from the HDMI source. An HDMI source can be
> a variety of sample-rates, channels, widths, and formats. If I
> understand correctly I need to register the device as supporting all
> the possible rates/channels/formats then constrain these to what is
> actually available at the time in the startup callback with
> snd_pcm_hw_contstraint_minmax and snd_pcm_hw_constraint_mask.
>
> How do I notify userspace when the chip tells me that the HDMI audio
> source rate/channels/format has changed?
>
> I know on the Video side the driver sends a V4L2_EVENT_SOURCE_CHANGE
> event to userspace when input format/resolution has changed so that
> userspace can stop streaming, call VIDIOC_QUERY_DV_TIMINGS and then
> VIDIOC_S_DV_TIMINGS with new timings.
This is one thing we need to address, but currently there is no
notification mechanism for such changes. Or, better to say, we don't
expect that the hw_constraint may change during the PCM operation.
When HDMI/DP is concerned, usually they have disconnect/reconnect
before such hw_constraint change happens, so we can expect user-space
doing re-opening the device in anyway.
But, the device disconnection is another issue to be improved.
We're currently allowing the disconnection of the whole card,
triggered by snd_card_disconnect(), but not in each component level.
So it depends on the driver / device whether the current
implementation works well or not.
thanks,
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-05 13:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-03 16:11 notifying userspace of hwparams change Tim Harvey
2017-10-05 13:19 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.