From: Hans Verkuil <hverkuil@xs4all.nl>
To: Divneil Wadhawan <divneil@outlook.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: No audio support in struct v4l2_subdev_format
Date: Fri, 04 Jul 2014 12:38:02 +0200 [thread overview]
Message-ID: <53B6840A.20102@xs4all.nl> (raw)
In-Reply-To: <BAY176-W32B9E16B0436D20DF363BEA9000@phx.gbl>
Hi Divneil,
On 07/04/2014 12:24 PM, Divneil Wadhawan wrote:
>
>
> Hi Hans,
>
>
>> I don't understand the problem. When the application starts the first thing it should
>> do is to call VIDIOC_QUERY_DV_TIMINGS: that will tell it if any signal is present.
>
> I guess dv timings will be valid for DVI too. If yes, then there is no audio.
>
> There's no video device for this, just subdev.
>
>
>
>> An alternative might be to extend v4l2_src_change_event_subscribe() and have it honor
>> the V4L2_EVENT_SUB_FL_SEND_INITIAL flag: if set, it should issue this event at once.
>> That might actually be a nice improvement.
>
> Okay, if it gives the already fired event, then it's good.
It should generate an initial SOURCE_CHANGE event with 'changes' set to
V4L2_EVENT_SRC_CH_RESOLUTION. That way the application that just subscribed to this
event with V4L2_EVENT_SUB_FL_SEND_INITIAL will get an initial event.
>
>
> There is one concern for this v4l2_src_change_event_subscribe().
>
> I was using v4l2_subscribed_event_ops for storing the "struct v4l2_subscribed_event sev."
>
>
> Later take out from list so, that I can call v4l2_event_queue() from the async event handler.
>
>
> I didn't had to worry for addition/deletion of "sev" from my list as this was managed by event framework calling these ops.
>
> So, now with v4l2_src_change_event_subscribe(), I cannot use the ops, and I have to manage "fh" using list.
>
> This addition deletion must now be handled by me, and cannot be taken care by v4l2_event_subdev_unsubscribe().
I hate to say this, but I have no idea what you mean. Can you show some code?
>
> I hope I have not missed any trivial stuff ;)
>
>
>
>> But what has that to do with audio?
>
> For video, we have VIDIOC_SUBDEV_G_FMT, for audio, there's nothing.
But shouldn't that be handled by an alsa driver? That's what someone has to
figure out: what goes in alsa and what still has to be provided by V4L2. For HDMI
output in e.g. an nvidia card the audio is fully handled by alsa AFAIK.
Obviously the hdmi driver has to work together with the alsa driver since it has
to exchange the audio infoframe information, but that's internal to the kernel.
To my knowledge nobody has really worked on this.
Regards,
Hans
next prev parent reply other threads:[~2014-07-04 10:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 6:49 No audio support in struct v4l2_subdev_format Divneil Wadhawan
2014-07-04 7:54 ` Hans Verkuil
2014-07-04 9:30 ` Divneil Wadhawan
2014-07-04 9:54 ` Hans Verkuil
2014-07-04 10:24 ` Divneil Wadhawan
2014-07-04 10:38 ` Hans Verkuil [this message]
2014-07-04 11:38 ` Divneil Wadhawan
2014-07-05 8:41 ` Hans Verkuil
2014-07-07 4:59 ` Divneil Wadhawan
2014-07-09 10:55 ` Divneil Wadhawan
2014-07-09 11:26 ` Hans Verkuil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B6840A.20102@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=divneil@outlook.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox