From: Takashi Iwai <tiwai@suse.de>
To: David Ulricht <david.ulricht434@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: CS8409 Macbook Pro 2016 2017
Date: Fri, 16 Nov 2018 18:31:41 +0100 [thread overview]
Message-ID: <s5hr2flgc8y.wl-tiwai@suse.de> (raw)
In-Reply-To: <CALbf9Myg=XJqiRN2YJAwYqP6hHDGnCwYptQvUT8WMqGmnN_XRQ@mail.gmail.com>
On Fri, 16 Nov 2018 17:50:24 +0100,
David Ulricht wrote:
>
> The stuff in sound/i2c/* are mostly for the i2c bus on a PCI sound
> cards, an implementation independent from the standard i2c stuff.
>
> And, in your case, it's hard to know how the i2c bus is connected.
> If it's controlled over HD-audio GPIO pin (one for clk and one for
> data), then some stuff in sound/i2c can be re-used. Or, if it's on
> another i2c bus, the story will be completely different...
>
> I have the schematics of the CS8409. the i2c is connected to the GPIO of the
> HDA.
>
> MAX98374 has a Reset Low pin which is connected to GPIO 5 on the HDA
> controller CS8409. This must
> be driven high, then wait for 1.5 ms. Only then will the amps be out of
> device shutdown.
> GPIO6 is 8409_I2C_SCL
> GPIO7 is 8409_I2C_SDA
>
> GPIO5 is AUD_SPKRAMP_RESET_L
>
> Knowing GPIO6 is the clock and GPIO7 is the data, how can I use them?
> Can I use hda-verb /dev/snd/hwC0D0 0x01 XXX YYY ? what XXX YYY would be ?
You need to set GPIO mask, direction then data.
0x01 SET_GPIO_MASK 0xXX
0x01 SET_GPIO_DIR 0xXX
0x01 SET_GPIO_DATA 0xXX
The value to be pass is the bits. GPIO0=0x01, GPIO1=0x02, GPIO3=0x04,
...
You can read the data after setting mask and dir by 0x01
GET_GPIO_DATA. Pass 0 for the value, and you'll get a byte value as a
read result.
Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2018-11-16 17:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-04 2:07 CS8409 Macbook Pro 2016 2017 David Ulricht
2018-08-04 2:18 ` David Ulricht
2018-08-04 6:48 ` Takashi Iwai
[not found] ` <CALbf9Mw=Y5ddFZDZQ4_mfYCHxKb9XFHN3v5ge0JaTca7NLMM7A@mail.gmail.com>
2018-08-04 16:26 ` Takashi Iwai
[not found] ` <CALbf9MwN4pEk26R9c2-UMxzvLXQ3OOBTcqgdSvXeFb-dw7-Wnw@mail.gmail.com>
2018-08-04 17:13 ` Takashi Iwai
2018-08-04 20:30 ` David Ulricht
2018-08-05 18:05 ` Takashi Iwai
2018-08-05 18:58 ` David Ulricht
2018-11-16 14:02 ` David Ulricht
2018-11-16 14:36 ` Takashi Iwai
2018-11-16 16:50 ` David Ulricht
2018-11-16 17:31 ` Takashi Iwai [this message]
2018-11-19 17:30 ` David Ulricht
2018-11-19 18:47 ` Takashi Iwai
2018-11-23 17:26 ` David Ulricht
2018-11-27 2:42 ` David Ulricht
2018-08-05 19:32 ` Lukas Wunner
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=s5hr2flgc8y.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=david.ulricht434@gmail.com \
/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